.stocks-home-wrapper {
    max-width: 100%;
}

.stocks-home-wrapper h2 {
    margin-bottom: 20px;
    text-align: center;
}

.stocks-top-movers {
    margin-top: 30px;
}

/* الجدول */
.stocks-top-movers table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 14px;
    direction: rtl;
}

.stocks-top-movers th,
.stocks-top-movers td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.stocks-top-movers th {
    background-color: #f8f8f8;
    font-weight: bold;
}

/* صفوف الرابحين */
.stocks-top-movers h3 {
    margin: 15px 0 10px;
    font-size: 18px;
}

/* لون النص للرابحين والخاسرين */
.stocks-top-movers tbody tr td:last-child {
    font-weight: bold;
}
.stocks-top-movers tbody tr td:last-child:after {
    content: '';
}

.stocks-top-movers tbody tr td:last-child {
    color: #333;
}

/* تمييز الرابحين */
.stocks-top-movers table:first-of-type tbody tr td:last-child {
    color: #0a880a;
}

/* تمييز الخاسرين */
.stocks-top-movers table:last-of-type tbody tr td:last-child {
    color: #c00;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .stocks-top-movers table,
    .stocks-top-movers thead,
    .stocks-top-movers tbody,
    .stocks-top-movers th,
    .stocks-top-movers td,
    .stocks-top-movers tr {
        display: block;
        width: 100%;
    }
    .stocks-top-movers thead tr {
        display: none;
    }
    .stocks-top-movers td {
        padding: 10px;
        text-align: right;
        position: relative;
        border: 1px solid #ddd;
    }
    .stocks-top-movers td:before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: #666;
    }
}


/* السهم */
.stock-search-box .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* النص */
.stock-search-box .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #333;
  line-height: 28px;
  padding-left: 2px;
}

/* القائمة المنسدلة */
.stock-search-box .select2-container--default .select2-results__option {
  padding: 10px;
  font-size: 15px;
  border-bottom: 1px solid #f2f2f2;
}

/* عند التمرير */
.stock-search-box .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #0073e6;
  color: white;
}

/* العنصر المختار */
.stock-search-box .select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: #e6f0ff;
  color: #0073e6;
}


.change-percent .positive {
    color: #28a745;
    font-weight: bold;
}

.change-percent .negative {
    color: #dc3545;
    font-weight: bold;
}

.change-percent .neutral {
    color: #6c757d;
    font-weight: bold;
}

/* للجداول المتجاوبة */
@media (max-width: 768px) {
    .change-percent span {
        display: inline-block;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 12px;
    }
    
    .change-percent .positive {
        background-color: rgba(40, 167, 69, 0.1);
    }
    
    .change-percent .negative {
        background-color: rgba(220, 53, 69, 0.1);
    }
    
    .change-percent .neutral {
        background-color: rgba(108, 117, 125, 0.1);
    }
}

.change-percent{
  min-width:100px;
}


.change-price{
  min-width:110px;
}


/* تصميم Select2 البسيط والـ Responsive */
.stock-search-box .select2-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}

.stock-search-box .select2-selection--single {
    width: 100% !important;
    height: 45px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 0 40px 0 12px !important;
    font-size: 15px !important;
    line-height: 43px !important;
    direction: rtl;
}

.stock-search-box .select2-selection--single:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
}

.stock-search-box .select2-selection__rendered {
    color: #374151 !important;
    padding: 0 !important;
    line-height: 43px !important;
    text-align: right;
}

.stock-search-box .select2-selection__placeholder {
    color: #9ca3af !important;
}

.stock-search-box .select2-selection__arrow {
    height: 43px !important;
    left: 8px !important;
    right: auto !important;
}

.stock-search-box {
    max-width: 100%;
    overflow-x: hidden;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .stock-search-box .select2-selection--single {
        height: 42px !important;
        font-size: 14px !important;
        line-height: 40px !important;
        padding: 0 35px 0 10px !important;
    }
    
    .stock-search-box .select2-selection__rendered {
        line-height: 40px !important;
    }
    
    .stock-search-box .select2-selection__arrow {
        height: 40px !important;
        left: 6px !important;
    }
}

@media (max-width: 480px) {
    .stock-search-box .select2-selection--single {
        height: 40px !important;
        font-size: 13px !important;
        line-height: 38px !important;
    }
    
    .stock-search-box .select2-selection__rendered {
        line-height: 38px !important;
    }
    
    .stock-search-box .select2-selection__arrow {
        height: 38px !important;
    }
}



    .stocks-table-container {
        background: #ffffff;
        border-radius: 5px;
        margin: 25px 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid #f1f5f9;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .stocks-table-container:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }

    .table-header {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        padding: 25px 30px;
        border-bottom: 1px solid #e2e8f0;
    }

    .gainers-table .table-header {
        background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
        border-bottom-color: #a7f3d0;
    }

    .losers-table .table-header {
        background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
        border-bottom-color: #fca5a5;
    }

    .header-content {
        text-align: center;
    }

    .table-title {
        color: #1e293b;
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 8px 0;
        letter-spacing: -0.5px;
    }

    .gainers-table .table-title {
        color: #065f46;
    }

    .losers-table .table-title {
        color: #991b1b;
    }

    .table-subtitle {
        color: #64748b;
        font-size: 14px;
        margin: 0;
        font-weight: 400;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .stocks-flat-table {
        width: 100%;
        border-collapse: collapse;
    }

    .stocks-flat-table th {
        background: #f8fafc;
        color: #374151;
        font-weight: 600;
        font-size: 14px;
        padding: 16px 20px;
        text-align: right;
        border-bottom: 2px solid #e5e7eb;
        letter-spacing: -0.3px;
        white-space: nowrap;
    }

    .stock-row {
        transition: all 0.2s ease;
        border-bottom: 1px solid #f3f4f6;
    }

    .stock-row:hover {
        background: #fafbfc;
        transform: translateX(3px);
    }

    .stock-row:nth-child(even) {
        background: rgba(248, 250, 252, 0.5);
    }

    .stock-row:nth-child(even):hover {
        background: #fafbfc;
    }

    .stocks-flat-table td {
        padding: 16px 20px;
        color: #4b5563;
        font-size: 14px;
        line-height: 1.5;
        vertical-align: middle;
    }

    .symbol-cell {
    font-weight: 600;
    color: #1f2937;
}

.rank-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.symbol-text {
    font-size: 13px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

    .rank-badge {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 700;
        flex-shrink: 0;
    }

    .gainers-table .rank-badge {
        background: linear-gradient(135deg, #10b981, #059669);
    }

    .losers-table .rank-badge {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }

    .symbol-text {
        font-family: 'SF Mono', Monaco, 'Courier New', monospace;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .company-link {
        text-decoration: none;
        color: inherit;
        display: block;
        transition: color 0.2s ease;
    }

    .company-link:hover {
        color: #3b82f6;
    }

    .company-name-ar {
        display: block;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 2px;
    }

    .company-name-en {
        display: block;
        font-size: 12px;
        color: #6b7280;
        font-weight: 400;
    }

    .market-cell {
        color: #6b7280;
        font-size: 13px;
    }

    .price-cell {
        font-weight: 600;
        color: #1f2937;
    }

    .currency {
        font-size: 12px;
        color: #6b7280;
        margin-right: 4px;
    }

    .change-container {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 5px;
        font-weight: 600;
        justify-content: center;
        min-width: 80px;
    }

    .change-container.positive {
        background: rgba(16, 185, 129, 0.1);
        color: #059669;
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .change-container.negative {
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .change-container.neutral {
        background: rgba(107, 114, 128, 0.1);
        color: #6b7280;
        border: 1px solid rgba(107, 114, 128, 0.2);
    }

    .change-arrow {
        font-size: 12px;
    }

    .change-value {
        font-size: 13px;
    }

    /* تحسينات للشاشات الصغيرة */
    @media (max-width: 768px) {
        .stocks-table-container {
            margin: 15px 0;
            border-radius: 5px;
        }
        
        .table-header {
            padding: 20px;
        }
        
        .table-title {
            font-size: 20px;
        }
        
        .table-subtitle {
            font-size: 13px;
        }
        
        .stocks-flat-table th,
        .stocks-flat-table td {
            padding: 12px 15px;
            font-size: 13px;
        }
        
        .symbol-cell {
            gap: 8px;
        }
        
        .rank-badge {
            width: 20px;
            height: 20px;
            font-size: 11px;
        }
        
        .company-name-ar {
            font-size: 13px;
        }
        
        .company-name-en {
            font-size: 11px;
        }
    }

    @media (max-width: 480px) {
        .table-wrapper {
            overflow-x: scroll;
        }
        
        .stocks-flat-table {
            min-width: 600px;
        }
        
        .stocks-flat-table th,
        .stocks-flat-table td {
            padding: 10px 12px;
            font-size: 12px;
        }
    }

    /* تأثير التحميل */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .stocks-table-container {
        animation: fadeIn 0.5s ease-out;
    }


.stock-price-hero {
    background: #f8fafc;
    border-radius: 5px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 0 0 1px #e2e8f0, 0 10px 25px rgba(0, 0, 0, 0.04);
    color: #0f172a;
    position: relative;
    overflow: hidden;
    border: none;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.company-identity {
    flex: 1;
}

.company-name {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1e293b;
}

.stock-symbol {
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.last-update {
    display: flex;
    align-items: center;
    background: #e2e8f0;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #475569;
}

.update-icon {
    margin-left: 5px;
}

.price-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.current-price-section, .change-section {
    background: #f1f5f9;
    border-radius: 5px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.current-price-section:hover, .change-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.price-label, .change-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #64748b;
}

.price-icon, .change-icon {
    font-size: 18px;
    margin-left: 8px;
}

.price-value {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-amount {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}

.currency-badge {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.change-values {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.change-amount {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.change-percent {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    padding: 12px 18px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.range-item:hover {
    background: #e2e8f0;
    transform: scale(1.02);
}

.range-label {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.range-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.high-price {
    color: #16a34a;
}

.low-price {
    color: #eab308;
}

/* ألوان التغير */
.change-section.positive .change-amount,
.change-section.positive .change-percent {
    color: #16a34a;
}

.change-section.negative .change-amount,
.change-section.negative .change-percent {
    color: #dc2626;
}

.change-section.neutral .change-amount,
.change-section.neutral .change-percent {
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .stock-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .price-display {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .price-range {
        grid-template-columns: 1fr;
    }
}

.company-description {
    background: #ffffff;
    border-radius: 5px;
    padding: 25px 30px;
    margin: 20px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    position: relative;
    transition: all 0.3s ease;
}

.company-description:hover {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.company-description::before {
    content: '📄';
    position: absolute;
    top: -8px;
    right: 20px;
    background: #ffffff;
    padding: 0 8px;
    font-size: 16px;
}

.company-description p {
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
    text-align: justify;
    letter-spacing: 0.2px;
}

.company-description p::first-line {
    font-weight: 500;
    color: #1f2937;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .company-description {
        padding: 20px;
        border-radius: 5px;
        margin: 15px 0;
    }
    
    .company-description p {
        font-size: 14px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .company-description {
        padding: 18px;
        border-radius: 5px;
    }
    
    .company-description p {
        font-size: 13px;
    }
}

/* تأثير التحميل */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.company-description {
    animation: fadeIn 0.4s ease-out;
}



.company-info-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 5px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.company-info-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.info-title {
    color: #2c3e50;
    font-size: 26px;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 15px;
    font-style: italic;
}

.info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.info-section {
    background: white;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #007cba;
}

.info-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.general-info {
    border-top-color: #28a745;
}

.contact-info {
    border-top-color: #17a2b8;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-icon {
    font-size: 24px;
    margin-left: 12px;
}

.section-title {
    color: #2c3e50;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 5px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border-color: #007cba;
    transform: translateX(5px);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
    min-width: 140px;
}

.label-icon {
    font-size: 18px;
    margin-left: 8px;
}

.label-text {
    font-size: 14px;
}

.info-value {
    color: #2c3e50;
    font-weight: 500;
    text-align: left;
    flex: 1;
    margin-right: 15px;
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    min-height: 20px;
}

.website-link {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.website-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.phone-number {
    letter-spacing: 1px;
    direction: ltr;
}

.location-info {
    font-style: italic;
}

/* تأثيرات خاصة للقيم الفارغة */
.info-value:empty::after {
    content: "غير متوفر";
    color: #6c757d;
    font-style: italic;
    opacity: 0.7;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .company-info-container {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .info-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .info-label {
        min-width: auto;
        width: 100%;
    }
    
    .info-value {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }
    
    .info-title {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .info-sections {
        grid-template-columns: 1fr;
    }
    
    .company-info-container {
        border-radius: 10px;
        padding: 15px;
    }
    
    .info-section {
        padding: 15px;
    }
}

/* تأثيرات إضافية للتفاعل */
.info-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #007cba, #28a745);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-item {
    position: relative;
    overflow: hidden;
}

.info-item:hover::before {
    opacity: 1;
}

/* تحسين عرض الروابط */
.info-value a {
    color: #007cba;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 5px;
}

.info-value a:hover {
    background: rgba(0, 124, 186, 0.1);
    color: #0056b3;
    text-decoration: underline;
}