﻿/* جهت‌دهی کلی بخش به صورت راست‌چین */
.category-advanced-section {
    direction: rtl !important;
    text-align: right !important;
}

/* عنوان سکشن */
.category-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
    margin: 0;
}

    .category-main-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 3px;
        background-color: #f05922;
        border-radius: 2px;
    }

/* دکمه اصلی دراپ‌داون راست‌چین */
.dropdown-toggle-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 20px 10px 45px; /* فضا برای فلش در سمت چپ */
    width: 220px; /* عرض ثابت و مناسب برای هم‌ترازی */
    text-align: right;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .dropdown-toggle-btn:hover {
        border-color: #f05922;
    }

    /* آیکون فلش (شورون) در سمت چپ دکمه */
    .dropdown-toggle-btn i {
        position: absolute;
        left: 18px; /* قرارگیری در سمت چپ در حالت RTL */
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        transition: transform 0.3s ease;
    }

/* استایل منوی بازشوی مطلق (Absolute) برای عدم تغییر ارتفاع سطر */
.dropdown-menu-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    margin-top: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    z-index: 1050; /* قرارگیری روی کارت‌ها */
    /* انیمیشن باز و بسته شدن روان */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-in-out;
}

/* حالت فعال منوی دراپ‌داون */
.dropdown-open .dropdown-menu-list {
    max-height: 350px;
    opacity: 1;
}

.dropdown-open .dropdown-toggle-btn {
    border-color: #f05922;
    box-shadow: 0 0 0 3px rgba(240, 89, 34, 0.1);
}

    .dropdown-open .dropdown-toggle-btn i {
        transform: translateY(-50%) rotate(180deg);
    }

/* آیتم‌های داخل دراپ‌داون */
.ct-menu-btn {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: right;
    width: 100%;
    transition: all 0.2s ease;
}

    .ct-menu-btn:hover {
        background: #f8fafc;
        color: #f05922;
    }

    .ct-menu-btn.active {
        background: rgba(240, 89, 34, 0.05);
        color: #f05922;
        font-weight: 700;
    }

/* تب‌های افقی بالای صفحه */
.top-tab-btn {
    background: #4f535c;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.25s ease;
}

    .top-tab-btn:hover {
        background: #626772;
    }

    .top-tab-btn.active {
        background: #f05922 !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(240, 89, 34, 0.3);
    }

/* گرید کارت‌های مربعی بزرگتر و تمام‌عرض */
.category-tile-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1.15 / 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: block;
    text-decoration: none !important;
}

.tile-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 56, 82, 0.78);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 0.4s ease;
    text-align: center;
    z-index: 2;
}

.tile-icon-container {
    width: 52px;
    height: 52px;
    border: 2px solid #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 22px;
    transition: all 0.3s ease;
}

.tile-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    margin: 0;
    padding: 0 10px;
}

.category-tile-card:hover .tile-bg-image {
    transform: scale(1.08);
}

.category-tile-card:hover .tile-overlay {
    background: linear-gradient(135deg, rgba(240, 89, 34, 0.85), rgba(210, 60, 10, 0.95));
}

.category-tile-card:hover .tile-icon-container {
    transform: scale(1.1);
    background: #ffffff;
    color: #f05922;
}

/* واکنش‌گرایی موبایل */
.overflow-auto-mobile {
    scrollbar-width: none;
}

    .overflow-auto-mobile::-webkit-scrollbar {
        display: none;
    }

@media (max-width: 767px) {
    .overflow-auto-mobile {
        overflow-x: auto;
        padding-bottom: 8px;
        width: 100%;
    }

    .dropdown-toggle-btn {
        width: 100%; /* در موبایل به صورت تمام عرض در می‌آید */
    }
}



/*------ newest homepage------------------*/
.newest-group-badge.active {
    background-color: #f05922 !important;
    color: #fff !important;
    border-color: #f05922 !important;
}

/*-------GetVideo------------------------*/
.course-lessons-accordion .accordion-body.active {
    background-color: #f0592220; /* یک رنگ پس‌زمینه ملایم برای آیتم فعال */
}

    .course-lessons-accordion .accordion-body.active .title-area {
        color: #f05922;
        font-weight: bold;
    }
