/* تنظیمات کلی تب‌ها */
.header-classic #Header .top_bar_left, .header-classic #Header .top_bar_right {
    background-color: #2191bc !important;
}
#Wrapper .contact-header{
    display: flex;
    flex-direction: column;
    align-content: stretch;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}
#search-button{
    background: #1155b1 !important;
}
.tabs {
    display: flex;
    justify-content: center; /* مرکز کردن تب‌ها در دسکتاپ */
    gap: 0.5rem;
    flex-wrap: nowrap; /* تب‌ها در یک ردیف در دسکتاپ */
    overflow-x: auto; /* امکان اسکرول افقی در دسکتاپ */
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    position: sticky;
    top: 115px;
    z-index: 2;
    direction: rtl; /* اطمینان از جهت RTL */
}

/* غیرفعال کردن اسکرولبار */
.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex-shrink: 0; /* جلوگیری از کوچک شدن تب‌ها در دسکتاپ */
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    background: transparent;
    font-family: 'MiSans Arabic', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    color: #333;
    text-align: center;
    white-space: nowrap; /* جلوگیری از شکستن متن */
    transition: all 0.3s ease;
}

.tab:hover {
    background: #e8ecef;
}

.tab.active {
    background: linear-gradient(90deg, #003087, #0055b7);
    color: #fff;
    font-weight: 600;
}

/* غیرفعال کردن گرادیان در تب‌ها */
.mobile-left-gradient {
    display: none !important; /* گرادیان غیرفعال شود */
}

#electronics.active {
    background: unset !important;
}

.contact- header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
    padding: 0 1rem;
}

.contact-title-primary {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003087;    text-align: center;
    margin: 0;
}

.contact-title-secondary {
    font-size: 1.5rem;
    font-weight: 600; text-align: center;
    color: #333;
    margin: 0;
}

.contact-description {
    font-size: 1.1rem; text-align: center;
    color: #666;
    max-width: 500px;
    margin: 0;
}

.search-container {
    max-width: 500px;
    margin: 1rem auto; /* کاهش margin برای فضای بهتر */
    position: sticky;
    top: 60px; /* اگر هدر ثابت دارید، این مقدار را به ارتفاع هدر تغییر دهید */
    z-index: 3; /* بالاتر از .tabs و سایر عناصر */
    display: flex;
    align-items: center;
    padding: 0.5rem 0; /* تنظیم فاصله عمودی */
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e8ecef;
    border-radius: 50px;
    font-family: 'MiSans Arabic', sans-serif;
    font-size: 1rem;
    color: #333;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #003087;
}

.search-button {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, #003087, #0055b7);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'MiSans Arabic', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(90deg, #002066, #003f87);
}

.search-icon {
    display: none;
}

.class-schedule {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.schedule-title {
    text-align: center;
    line-height: 34px;
    font-size: 1.75rem;
    font-weight: 700;
    color: #003087;
    margin-bottom: 2rem;
}

.schedule-table-wrapper {
    overflow-x: auto;
    position: relative;
}

.schedule-table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-family: 'MiSans Arabic', sans-serif;
    border-radius: 12px;
    overflow: hidden;
}

.schedule-table thead > tr > th {
    color: #fff !important;
}

.schedule-table thead {
    background: linear-gradient(90deg, #003087, #0055b7);
    color: #fff;
}

.schedule-table tbody {
    background: #f5f6f8;
}

.schedule-table tbody > tr > td {
    color: #002aa0;
}

.schedule-table tbody > tr > td > a {
    color: #0A246A;
}

.schedule-table th, .schedule-table td {
    padding: 1rem;
    border-right: 2px solid #fff;
    font-size: 1rem;
    vertical-align: middle;
}

.schedule-table tbody tr {
    border-bottom: 2px solid #fff;
    transition: background 0.2s ease;
}

.schedule-table tbody tr:hover {
    background: #e8ecef;
}

.price_istaal .original-price {
    text-decoration: line-through;
    text-decoration-color: #0d48a1;
    text-decoration-thickness: 2px;
    color: #666;
}

.discounted-price {
    color: #d32f2f;
    font-weight: 600;
}

.no-courses {
    padding: 2rem;
    font-size: 1.1rem;
    color: #666;
}

.tabs-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content-wrapper {
    margin-top: 2rem;
}

.tab-content {
    margin-bottom: 2rem;
}

#Wrapper, #Wrapper > main, #Wrapper > main > .tabs-wrapper {
    overflow: visible !important;
}

#search-button::before {
    background: #0A246A !important;
    opacity: 1 !important;
}

.tabs-wrapper > .tabs > .tab {
    margin-bottom: 0 !important;
}

/* تنظیمات برای موبایل (768px و کمتر) */
@media (max-width: 768px) {
    .tabs {
        gap: 0.5rem;
        padding: 0.5rem;
        border-radius: 25px;
        justify-content: space-between; /* تب‌ها به‌صورت یکنواخت پخش شوند */
        flex-wrap: wrap; /* تب‌ها به ردیف بعدی منتقل شوند */
        overflow-x: hidden; /* حذف اسکرول افقی */
    }

    .tab {
        flex: 0 0 calc(33.33% - 0.5rem); /* 3 تب در هر ردیف */
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem; /* فونت کوچک‌تر برای خوانایی */
    }

    /* تنظیم تب آخر در ردیف دوم برای پر کردن عرض */
    .tab:nth-child(7) {
        flex: 0 0 calc(33.33% - 0.5rem);
    }

    .contact-title-primary {
        font-size: 1.8rem;
    }

    .contact-title-secondary {
        font-size: 1.2rem;
    }

    .contact-description {
        font-size: 1rem;
    }

    .search-container {
        max-width: 90%;
        margin-bottom: 0;
    }

    .search-input {
        display: flex;
        gap: 0.5rem;
    }

    .search-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .class-schedule {
        padding: 1rem;
        margin: 0 1rem 2rem;
    }

    .schedule-title {
        font-size: 1.5rem;
    }

    .schedule-table th, .schedule-table td {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* تنظیمات برای موبایل‌های کوچک‌تر (450px و کمتر) */
@media (max-width: 450px) {
    .tabs {
        padding: 0.3rem;
    }

    .tab {
        flex: 0 0 calc(33.33% - 0.5rem);
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem; /* فونت حتی کوچک‌تر */
    }

    .contact-title-primary {
        font-size: 1.6rem;
    }

    .contact-title-secondary {
        font-size: 1.1rem;
    }

    .contact-description {
        font-size: 0.9rem;
    }

    .search-input {
        font-size: 0.85rem;
        padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    }

    .search-button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .schedule-table th, .schedule-table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media screen and (min-width: 1500px) {
    #price_page {
        max-width: 95%;
        width: 1500px;
        margin: 0 auto;
    }
}