        /* --- 1. General setting --- */
        :root {
            --primary-blue: #1e3a8a;
            --primary-blue-dark: #172554;
            --accent-yellow: #facc15;
            --text-dark: #1f2937;
        }

        body {
            font-family: 'Roboto', sans-serif;
            background-color: #f8f9fa;
            overflow-x: hidden;
        }

        html[lang="ar"] body {
            font-family: 'Cairo', sans-serif !important;
        }

        /* --- 2. Preloader --- */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #1e3a8a;
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            transition: opacity 0.5s ease-out, visibility 0.5s;
        }

        .loader-logo {
            font-family: 'Merriweather', serif;
            font-size: 3rem;
            color: white;
            margin-bottom: 20px;
            animation: pulse 1.5s infinite;
        }

        html[lang="ar"] .loader-logo { font-family: 'Cairo', sans-serif; }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-top: 5px solid var(--accent-yellow);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

        /* --- 3. Enhanced Navbar --- */
        .navbar {
            background-color: #2c4580;
            padding: 15px 0;
            transition: all 0.4s ease;
        }

        .navbar.scrolled {
            background-color: rgba(44, 69, 128, 0.9);
            backdrop-filter: blur(10px);
            padding: 10px 0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        
        .brand-logo {
            font-family: 'Merriweather', serif;
            font-weight: 700;
            font-size: 1.7rem;
            color: #fff;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: 0.6s;
        }
        .brand-logo:hover { color: var(--accent-yellow); }
        html[lang="ar"] .brand-logo { font-family: 'Cairo', sans-serif; }
        
        .brand-logo i { color: var(--accent-yellow); }

        .nav-link {
            color: rgba(255,255,255,0.85) !important;
            font-weight: 500;
            margin: 0 10px;
            position: relative;
            transition: color 0.3s;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: var(--accent-yellow);
            transition: width 0.3s ease;
        }
        
        html[lang="ar"] .nav-link::after { left: auto; right: 0; }

        .nav-link:hover { color: #fff !important; }
        .nav-link:hover::after { width: 100%; }

        .btn-lang {
            border: 1px solid rgba(255,255,255,0.4);
            color: #fff;
            margin-right: 10px;
            border-radius: 20px;
            padding: 5px 15px;
            transition: 0.3s;
            cursor: pointer;
            font-weight: bold;
        }
        html[lang="ar"] .btn-lang { margin-right: 0; margin-left: 10px; font-family: 'Roboto', sans-serif; }
        
        .btn-lang:hover { background: rgba(255,255,255,0.1); }

        .btn-login {
            border: 1px solid #fff;
            color: #fff;
            margin-right: 10px;
            padding: 6px 20px;
            border-radius: 5px;
            transition: all 0.3s;
        }
        html[lang="ar"] .btn-login { margin-right: 0; margin-left: 10px; }

        .btn-login:hover { background-color: #fff; color: var(--primary-blue); }

        .btn-signup {
            background-color: var(--accent-yellow);
            color: #2c4580;
            font-weight: bold;
            padding: 6px 20px;
            border: none;
            border-radius: 5px;
            transition: transform 0.2s;
        }
        .btn-signup:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4); }

        /* --- 4. Enhanced Slider (Carousel) --- */
        .carousel-item {
            height: 600px;
            background-color: #000;
        }

        .carousel-img {
            height: 100%;
            width: 100%;
            object-fit: cover;
            opacity: 0.5;
        }

        .carousel-caption {
            bottom: 35%;
            z-index: 10;
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }
        
        .hero-title span { color: var(--accent-yellow); }

        .carousel-control-prev-icon, .carousel-control-next-icon {
            filter: invert(1) grayscale(100%) brightness(200%);
            width: 3rem;
            height: 3rem;
        }
        /* --- 5. Sections & Cards --- */
        .section-title {
            color: #2c4580;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
            position: relative;
            display: inline-block;
        }

        .section-divider {
            height: 4px;
            width: 60px;
            background-color: var(--accent-yellow);
            margin: 0 auto 40px;
            border-radius: 2px;
        }

        .course-card {
            border: none;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
            transition: all 0.4s ease;
            height: 100%;
            background: white;
            position: relative;
            top: 0;
        }

        .course-card:hover {
            top: -10px;
            box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        }

        .course-img-wrapper {
            overflow: hidden;
            height: 180px;
        }

        .course-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s;
        }

        .course-card:hover .course-img { transform: scale(1.1); }

        .badge-level {
            background-color: #1e3a8a;
            color: white;
            font-size: 0.75rem;
            padding: 5px 12px;
            border-radius: 20px;
            display: inline-block;
            margin-bottom: 10px;
            font-weight: 500;
        }

        /* --- 6. Modules Section --- */
        .modules-section {
            padding: 100px 0;
            background-color: #fff;
        }

        .check-item {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 15px;
            color: #444;
            font-size: 1.1rem;
        }

        .check-item i { color: var(--accent-yellow); font-size: 1.3rem; }

        .btn-demo {
            background-color: #2c4580;
            color: white;
            padding: 12px 30px;
            border-radius: 5px;
            margin-top: 20px;
            display: inline-block;
            text-decoration: none;
            transition: 0.3s;
            border: 2px solid #2c4580;
        }
        
        .btn-demo:hover {
            background-color: transparent;
            color: #2c4580;
        }

        .btn-view-all {
            background-color: #2c4580;
            color: white;
            padding: 12px 40px;
            border-radius: 50px;
            text-decoration: none;
            transition: 0.3s;
            font-weight: 600;
        }
        
        .btn-view-all:hover {
            background-color: var(--accent-yellow);
            color: #2c4580;
        }
        /* section ai and bank */
        /* --- Repository Section Styles --- */
.repo-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%;
}

.repo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.1);
    border-bottom: 4px solid var(--accent-yellow);
}

.repo-card.active-card {
    background: linear-gradient(135deg, #2c4580 0%, #1e3a8a 100%);
    color: white;
}

.repo-card.active-card h4, 
.repo-card.active-card p {
    color: white;
}

.repo-card.active-card .text-secondary {
    color: rgba(255,255,255,0.8) !important;
}

.repo-icon-box {
    width: 70px;
    height: 70px;
    background-color: #f0f4ff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin: 0 auto;
    transition: 0.3s;
}

.repo-card.active-card .repo-icon-box {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-yellow);
}

.repo-link {
    text-decoration: none;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 15px;
    display: inline-block;
    transition: 0.3s;
}

.repo-link:hover {
    color: var(--accent-yellow);
}

/* RTL Flip for Arrow Icon */
html[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* --- AI Section Dark Styles --- */
.ai-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* نمط خلفية خفيف (اختياري لجمالية أكثر) */
.ai-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(250, 204, 21, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.ai-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-yellow);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.ai-image-wrapper {
    position: relative;
    display: inline-block;
}

.ai-floating-img {
    position: relative;
    z-index: 2;
    max-width: 80%;
    animation: floating 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.3));
}

.ai-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(44, 69, 128, 0.6) 0%, transparent 70%);
    z-index: 1;
    filter: blur(40px);
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

        /* --- 7. Footer --- */
        footer {
            background-color: #1f2937;
            color: #d1d5db;
            padding-top: 80px;
            padding-bottom: 30px;
        }

        footer h5 {
            color: var(--accent-yellow);
            font-weight: 600;
            margin-bottom: 25px;
        }

        footer ul { padding: 0; list-style: none; }
        footer ul li { margin-bottom: 12px; }
        footer ul li a {
            color: #9ca3af;
            text-decoration: none;
            transition: 0.3s;
            display: inline-block;
        }
        html[lang="en"] footer ul li a:hover { transform: translateX(5px); }
        html[lang="ar"] footer ul li a:hover { transform: translateX(-5px); }

        .social-icons a {
            color: #9ca3af;
            font-size: 1.5rem;
            margin-right: 20px;
            transition: 0.3s;
        }
        html[lang="ar"] .social-icons a { margin-right: 0; margin-left: 20px; }
        
        .social-icons a:hover { color: var(--accent-yellow); transform: translateY(-3px); }

        .newsletter-input {
            border: none;
            padding: 12px;
            width: 100%;
            border-radius: 4px 0 0 4px;
            outline: none;
        }
        html[lang="ar"] .newsletter-input { border-radius: 0 4px 4px 0; }
        
        .btn-subscribe {
            background-color: #2c4580;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 0 4px 4px 0;
            transition: 0.3s;
        }
        html[lang="ar"] .btn-subscribe { border-radius: 4px 0 0 4px; }
        
        .btn-subscribe:hover { background-color: var(--accent-yellow); color: #2c4580; }

        /* Responsive Tweaks */
        @media (max-width: 768px) {
            .hero-title { font-size: 2.5rem; }
            .carousel-item { height: 400px; }
            .carousel-caption { bottom: 20%; }
        }

        /* --- 8. About Section (New Styling) --- */
.about-section {
    position: relative;
    padding: 100px 0;
    background-color: #fff;
    overflow: hidden;
}

/* تصميم الصورة المتداخلة مثل النموذج المرفق */
.about-img-wrapper {
    position: relative;
    z-index: 1;
    padding-bottom: 30px; 
    padding-left: 30px; /* مساحة للخلفية الزرقاء */
}

html[dir="rtl"] .about-img-wrapper {
    padding-left: 0;
    padding-right: 30px;
}

.about-img-wrapper::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%;
    height: 80%;
    background-color: var(--primary-blue); /* لون الهوية بدل الرمادي في الصورة */
    z-index: -1;
    border-radius: 10px;
}

html[dir="rtl"] .about-img-wrapper::before {
    left: auto;
    right: 0;
}

.about-img {
    border-radius: 10px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.15); */
    width: 100%;
    object-fit: cover;
}

/* قسم الشكر والتقدير */
.contributors-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--accent-yellow);
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 5px 5px 0;
}

html[dir="rtl"] .contributors-box {
    border-left: none;
    border-right: 4px solid var(--accent-yellow);
    border-radius: 5px 0 0 5px;
}

.contributor-name {
    font-weight: bold;
    color: var(--primary-blue);
    display: inline-block;
    margin: 0 10px;
}

/* --- Footer Collaboration Logos --- */
.footer-logo-box {
    width: 80px;
    height: 80px;
    background-color: #fff;
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.footer-logo-box:hover {
    transform: translateY(-3px);
}

/* --- 9. Smooth Scroll Fixes --- */
html {
    scroll-behavior: smooth;
    /* هذا الكود يمنع القائمة الثابتة من تغطية العنوان عند الضغط */
    scroll-padding-top: 90px; 
}

/* library.php */
/* --- 4. Enhanced Slider (Carousel) --- */
.carousel-item {
    height: 600px;
    background-color: #000;
}

.carousel-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.carousel-caption {
    bottom: 35%;
    z-index: 10;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-title span { color: var(--accent-yellow); }

.carousel-control-prev-icon, .carousel-control-next-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
    width: 3rem;
    height: 3rem;
}

/* --- 5. Sections & Cards --- */
.section-title {
    color: #2c4580;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent-yellow);
    margin: 0 auto 40px;
    border-radius: 2px;
}

.course-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    background: white;
    position: relative;
    top: 0;
}

.course-card:hover {
    top: -10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.course-img-wrapper {
    overflow: hidden;
    height: 180px;
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover .course-img { transform: scale(1.1); }

.badge-level {
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
}

/* --- 6. Modules Section --- */
.modules-section {
    padding: 100px 0;
    background-color: #fff;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.1rem;
}

.check-item i { color: var(--accent-yellow); font-size: 1.3rem; }

.btn-demo {
    background-color: #2c4580;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    margin-top: 20px;
    display: inline-block;
    text-decoration: none;
    transition: 0.3s;
    border: 2px solid #2c4580;
}

.btn-demo:hover {
    background-color: transparent;
    color: #2c4580;
}

.btn-view-all {
    background-color: #2c4580;
    color: white;
    padding: 12px 40px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 600;
}

.btn-view-all:hover {
    background-color: var(--accent-yellow);
    color: #2c4580;
}
/* Responsive Tweaks */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .carousel-item { height: 400px; }
    .carousel-caption { bottom: 20%; }
}

/* --- 8. About Section (New Styling) --- */
.about-section {
    position: relative;
    padding: 100px 0;
    background-color: #fff;
    overflow: hidden;
}

/* تصميم الصورة المتداخلة مثل النموذج المرفق */
.about-img-wrapper {
    position: relative;
    z-index: 1;
    padding-bottom: 30px; 
    padding-left: 30px; /* مساحة للخلفية الزرقاء */
}

html[dir="rtl"] .about-img-wrapper {
    padding-left: 0;
    padding-right: 30px;
}

.about-img-wrapper::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%;
    height: 80%;
    background-color: var(--primary-blue); /* لون الهوية بدل الرمادي في الصورة */
    z-index: -1;
    border-radius: 10px;
}

html[dir="rtl"] .about-img-wrapper::before {
    left: auto;
    right: 0;
}

.about-img {
    border-radius: 10px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.15); */
    width: 100%;
    object-fit: cover;
}

/* قسم الشكر والتقدير */
.contributors-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--accent-yellow);
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 5px 5px 0;
}

html[dir="rtl"] .contributors-box {
    border-left: none;
    border-right: 4px solid var(--accent-yellow);
    border-radius: 5px 0 0 5px;
}

.contributor-name {
    font-weight: bold;
    color: var(--primary-blue);
    display: inline-block;
    margin: 0 10px;
}

/* --- 9. Smooth Scroll Fixes --- */
html {
    scroll-behavior: smooth;
    /* هذا الكود يمنع القائمة الثابتة من تغطية العنوان عند الضغط */
    scroll-padding-top: 90px; 
}

/* --- 10. Library Page Specific Styles --- */
.library-hero-section {
    padding-top: 140px; /* Offset for fixed navbar */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
}

/* Department Cards */
.dept-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.dept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(44, 69, 128, 0.15);
    border-color: var(--primary-blue);
}

.dept-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-right: 20px;
    flex-shrink: 0;
}

html[lang="ar"] .dept-icon-wrapper {
    margin-right: 0;
    margin-left: 20px;
}

/* Specific colors for departments */
.bg-chem { background: linear-gradient(45deg, #3b82f6, #2563eb); }
.bg-math { background: linear-gradient(45deg, #f59e0b, #d97706); }
.bg-cs { background: linear-gradient(45deg, #10b981, #059669); }
.bg-phy { background: linear-gradient(45deg, #8b5cf6, #7c3aed); }
.bg-eco { background: linear-gradient(45deg, #84cc16, #65a30d); }
.bg-geo { background: linear-gradient(45deg, #ec4899, #db2777); }
.bg-path { background: linear-gradient(45deg, #ef4444, #dc2626); }
.eco-bg {background: linear-gradient(45deg, #84cc16, #65a30d);}

.dept-content {
    flex-grow: 1;
}

.dept-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--primary-blue-dark);
}

.dept-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.dept-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    color: var(--primary-blue);
}

html[lang="ar"] .dept-arrow {
    transform: translateX(10px);
}

.dept-card:hover .dept-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Department Page Styles (Fixed Tabs Visibility) --- */

/* 1. حاوية التبويبات - Tab Container */
.custom-tabs {
    background-color: #ffffff;
    padding: 8px;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.08); /* حدود خفيفة للحاوية */
    display: inline-flex;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    flex-wrap: wrap; /* لضمان عدم خروج الأزرار في الشاشات الصغيرة */
    justify-content: center;
}

/* 2. شكل الزر غير المفعل - Inactive Button (التعديل الأساسي هنا) */
.custom-tabs .nav-link {
    background-color: #d5d7d8; /* خلفية رصاصية فاتحة بدلاً من الشفافة */
    color: var(--primary-blue); /* لون النص أزرق غامق ليظهر بوضوح */
    font-weight: 700;
    border-radius: 40px;
    padding: 12px 30px;
    margin: 0;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* تأثير عند مرور الماوس - Hover */
.custom-tabs .nav-link:hover {
    background-color: #e2e6ea; /* تغميق الخلفية قليلاً عند التمرير */
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
}

/* 3. الزر النشط - Active State */
.custom-tabs .nav-link.active {
    background-color: var(--primary-blue); /* الخلفية الزرقاء الغامقة */
    color: var(--accent-yellow); /* النص الأصفر */
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
    transform: translateY(0);
    border-color: var(--primary-blue);
}

/* 4. تنسيق البطاقات */
.resource-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
    opacity: 0;
    transition: 0.3s;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.resource-card:hover::before {
    opacity: 1;
}

/* Helper backgrounds for icons */
.bg-primary-subtle { background-color: #dbeafe; }
.bg-warning-subtle { background-color: #fef9c3; }
.bg-success-subtle { background-color: #dcfce7; }
.bg-danger-subtle { background-color: #fee2e2; }

/* --- Dynamic Expansion Section Styles --- */

.dynamic-expansion-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease-in-out;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* كلاس التفعيل */
.dynamic-expansion-section.active {
    max-height: 2000px; /* رقم كبير ليسمح بتمدد المحتوى */
    opacity: 1;
    margin-top: 30px;
    padding: 30px;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

/* تصميم شبكة الكورسات */
.course-grid-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-grid-item:hover {
    background: #fff;
    border-color: var(--primary-blue);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.1);
}

.course-icon {
    width: 45px;
    height: 45px;
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.course-info h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text-dark);
}

.course-info span {
    font-size: 0.8rem;
    color: #6c757d;
}

/* تصميم قائمة الملفات (عندما تضغط على كورس) */
.file-list-container {
    animation: fadeIn 0.5s ease;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: 0.2s;
}

.file-item:hover {
    background-color: #f1f5f9;
}

.file-name i {
    color: #dc3545; /* PDF Red Color */
    margin-right: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* زر العودة */
.btn-back-grid {
    color: var(--primary-blue);
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    display: inline-block;
}
.btn-back-grid:hover { text-decoration: underline; }

/* AIAgent */
.blur-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    height: 100vh;
}

/* تحسينات خاصة بصفحة الـ AI */
.feature-box {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow: 0 15px 40px rgba(30, 58, 138, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: #f0f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-blue);
    margin-bottom: 20px;
    transition: 0.3s;
}

.feature-box:hover .feature-icon {
    background: var(--primary-blue);
    color: var(--accent-yellow);
    transform: rotateY(360deg);
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #111827 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

/* --- Policy Modal Styles --- */
.policy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 37, 84, 0.85); /* Dark Blue Transparent */
    backdrop-filter: blur(8px); /* Blur Effect */
    z-index: 10000; /* Above everything */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.policy-modal-overlay.show {
    opacity: 1;
}

.policy-modal-content {
    background: #fff;
    width: 90%;
    max-width: 550px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(50px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.policy-modal-overlay.show .policy-modal-content {
    transform: translateY(0) scale(1);
}

.policy-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: 30px 20px 20px;
    text-align: center;
    color: white;
    position: relative;
}

.policy-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: var(--accent-yellow);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}

.policy-header h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.policy-body {
    padding: 25px;
    max-height: 300px; /* Scrollable area */
    overflow-y: auto;
    background-color: #f9fafb;
}

.policy-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.policy-section:last-child {
    border-bottom: none;
}

.policy-section h5 {
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.policy-section p {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.lead-text {
    text-align: center;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 20px;
}

.policy-footer {
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.small-disclaimer {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.btn-policy {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.btn-policy:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.2);
}

/* Custom Scrollbar for the text area */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* تحسين خلفية الصفحة */
.soon-container {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* تأثيرات حركة المعدات */
.tools-animation {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    position: relative;
}

.main-tool {
    animation: wrench-move 2s infinite ease-in-out;
    display: inline-block;
}

.gear-tool {
    font-size: 2rem;
    color: var(--accent-yellow);
    position: absolute;
    top: -10px;
    right: 40%;
    animation: spin 3s linear infinite;
}

@keyframes wrench-move {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(20deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 {
    color: var(--primary-blue-dark);
    font-weight: 900;
    margin-bottom: 1rem;
}

 p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.btn-home {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-home:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

/* شعار سجاج في الأسفل */
.brand-footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    font-weight: bold;
    color: #d1d5db;
}

/* دوائر جمالية في الخلفية */
.bg-circle {
    position: absolute;
    z-index: 0;
    background: var(--primary-blue);
    opacity: 0.05;
    border-radius: 50%;
}

/* --- Profile Pop-up Styles --- */
.profile-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(23, 37, 84, 0.8);
    backdrop-filter: blur(8px);
    z-index: 11000;
    display: none; /* مخفي افتراضياً */
    justify-content: center;
    align-items: center;
}

.profile-card {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: 25px;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 80px; height: 80px;
    background: var(--accent-yellow);
    color: var(--primary-blue-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 10px;
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4);
}

.profile-body {
    padding: 25px;
    background: #f9fafb;
}

.info-group {
    margin-bottom: 15px;
}

.info-group label {
    display: block; font-size: 0.85rem;
    color: #6b7280; margin-bottom: 5px; font-weight: 600;
}

.info-box {
    background: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: flex; justify-content: space-between; align-items: center;
}

.info-value { font-weight: 700; color: var(--text-dark); }
.info-locked { color: #9ca3af; font-size: 0.8rem; }

.btn-edit-small {
    background: none; border: none; color: var(--primary-blue);
    cursor: pointer; font-size: 0.9rem; font-weight: bold;
}

.btn-edit-small:hover { text-decoration: underline; color: var(--accent-yellow); }

.password-masked { letter-spacing: 3px; font-family: sans-serif; }

.verification-area {
    display: none; /* تظهر فقط عند طلب تغيير الباسورد */
    margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc;
}

.profile-footer {
    padding: 15px; text-align: center; background: #fff;
}

.btn-close-profile {
    background: #e5e7eb; color: #4b5563;
    border: none; padding: 10px 25px; border-radius: 50px;
    font-weight: 600; cursor: pointer; transition: 0.3s;
}

.btn-close-profile:hover { background: #d1d5db; }
/* تنسيق حقل الإدخال عند التعديل */
.edit-username-input {
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 5px 10px;
    width: 100%;
    outline: none;
    font-family: 'Cairo', sans-serif;
}

.save-edit-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 4px 12px;
    margin-left: 5px;
    cursor: pointer;
}

.cancel-edit-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 4px 12px;
    cursor: pointer;
}

/* --- Sijjaj Virtual Lab Section (Clean & Light Scientific Theme) --- */
.lab-section-light {
    background-color: #f1f5f9; /* خلفية رمادية فاتحة جداً تفصل عن الأقسام الأخرى */
    position: relative;
    overflow: hidden;
}

/* حاوية القسم البيضاء الأنيقة */
.lab-card-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

/* نص التدرج للعنوان */
.lab-gradient-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* البادج العلوي الفاتح */
.lab-badge-light {
    display: inline-flex;
    align-items: center;
    background-color: #eff6ff;
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* صورة المختبر */
.lab-preview-box {
    position: relative;
    display: inline-block;
    padding: 10px;
    width: 500px;
}

.lab-main-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border: 3px solid #ffffff;
    transition: transform 0.4s ease;
}

.lab-preview-box:hover .lab-main-img {
    transform: scale(1.02);
}

/* الشارة العائمة التفاعلية */
.lab-floating-badge-light {
    position: absolute;
    bottom: -5px;
    left: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    z-index: 2;
}

html[dir="rtl"] .lab-floating-badge-light {
    left: auto;
    right: 20px;
}

.badge-dot {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* كروت المميزات الأربعة */
.lab-feature-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f8fafc;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
    height: 100%;
}

.lab-feature-box:hover {
    background-color: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

/* دوائر الأيقونات الملونة */
.lab-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bg-blue-subtle { background-color: #dbeafe; }
.bg-green-subtle { background-color: #dcfce7; }
.bg-yellow-subtle { background-color: #fef9c3; }
.bg-purple-subtle { background-color: #ede9fe; color: #7c3aed; }
.text-indigo { color: #6366f1; }

/* زر الدخول الرئيسي للمختبر */
.btn-lab-action {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-lab-action:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1e3a8a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25) !important;
}

/* ========================================================
   💎 1. زر الجوهرة التفاعلي في الـ Navbar
   ======================================================== */
.gem-subscription-btn {
    border: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* الجوهرة الرصاصية (غير مشترك) */
.gem-silver-inactive {
    color: #94a3b8;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.gem-silver-inactive:hover {
    color: #cbd5e1;
    transform: scale(1.15) rotate(10deg);
}

/* الجوهرة الذهبية المتوهجة (مشترك مفعل) */
.gem-gold-active {
    color: #facc15;
    animation: goldGemGlow 2s infinite ease-in-out;
}

.gem-gold-active:hover {
    transform: scale(1.25) rotate(-10deg);
}

@keyframes goldGemGlow {
    0% {
        filter: drop-shadow(0 0 4px #eab308) drop-shadow(0 0 10px rgba(250, 204, 21, 0.6));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 12px #facc15) drop-shadow(0 0 20px rgba(250, 204, 21, 0.9));
        transform: scale(1.1);
    }
    100% {
        filter: drop-shadow(0 0 4px #eab308) drop-shadow(0 0 10px rgba(250, 204, 21, 0.6));
        transform: scale(1);
    }
}

/* ========================================================
   📦 2. نافذة الاشتراكات المنبثقة (Pop-up Modal)
   ======================================================== */
.sub-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10500;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sub-modal-overlay.show {
    opacity: 1;
}

.sub-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sub-modal-overlay.show .sub-modal-container {
    transform: scale(1);
}

.sub-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    padding: 35px 20px 25px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.btn-close-sub {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

html[dir="rtl"] .btn-close-sub {
    right: auto;
    left: 20px;
}

.btn-close-sub:hover {
    background: rgba(239, 68, 68, 0.8);
}

.sub-crown-icon {
    width: 60px;
    height: 60px;
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 12px;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.4);
}

/* بطاقات الخطط */
.sub-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 25px;
    transition: all 0.3s ease;
}

.sub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.sub-card-popular {
    border: 2px solid #facc15;
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.15);
}

.popular-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.sub-plan-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
}

.badge-basic { background: #f1f5f9; color: #475569; }
.badge-popular { background: #fef9c3; color: #854d0e; }
.badge-business { background: #e0e7ff; color: #3730a3; }

.sub-price-tag .price-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
}

.sub-price-tag .price-cur {
    font-size: 0.9rem;
    color: #64748b;
}

.sub-card-features ul li {
    padding: 6px 0;
    font-size: 0.9rem;
}

/* --- زر التفكير العميق (Deep Thinking Toggle) --- */
.btn-thinking-toggle {
    background: rgba(99, 102, 241, 0.08);
    border: 1.5px solid transparent;
    color: #64748b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.15rem;
    position: relative;
}

.btn-thinking-toggle:hover {
    background: rgba(99, 102, 241, 0.18);
    color: #6366f1;
    transform: scale(1.08);
}

/* عند تفعيل وضع التفكير العميق */
.btn-thinking-toggle.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff !important;
    border-color: #facc15;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    animation: thinkingGlow 2s infinite ease-in-out;
}

@keyframes thinkingGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.8), 0 0 5px #facc15; transform: scale(1.05); }
}

/* تحسين حاوية البروفايل لتناسب المحتوى */
.profile-card {
    max-height: 90vh;
    overflow-y: auto;
}

.profile-body {
    padding: 20px 25px;
}

/* بطاقة تفاصيل الاشتراك */
.profile-sub-box {
    border-radius: 12px;
    padding: 14px 16px;
    transition: 0.3s ease;
}

.profile-sub-box.sub-active {
    background: #ffffff;
    border: 1.5px solid #facc15;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.15);
}

.profile-sub-box.sub-inactive {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.btn-sub-now {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1e3a8a !important;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-sub-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(234, 179, 8, 0.35) !important;
}

/* بطاقة نافذة المشترك الفعّال */
.active-sub-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 30px 25px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.sub-modal-overlay.show .active-sub-card {
    transform: scale(1);
}

.active-sub-badge-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #d97706;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

/* صندوق اقتراح الباقة الأعلى */
.upgrade-proposal-box {
    background: #fffdf5;
    border: 2px solid #facc15;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.12);
}

.upgrade-proposal-box.border-indigo {
    background: #f8faff;
    border: 2px solid #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.12);
}

/* --- Join Sijjaj Team Section --- */
.join-team-section {
    background-color: #fff;
    position: relative;
}

.join-team-wrapper {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.team-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.team-mini-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.team-form-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.team-form-card .form-control,
.team-form-card .form-select {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 9px 14px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.team-form-card .form-control:focus,
.team-form-card .form-select:focus {
    background-color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.btn-join-team-submit {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1e3a8a !important;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-join-team-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4) !important;
}