/* Premium HSL Design System - "منصة الدكتور في اللغة العربية" */

:root {
    /* Color Palette - Vibrant sky blue and warm yellow accents */
    --primary-color: #0284c7; /* Sky 600 - Rich blue */
    --primary-hover: #0369a1; /* Sky 700 */
    --primary-light: rgba(2, 132, 199, 0.08);
    --secondary-color: #ffffff;
    --accent-yellow: #eab308; /* Yellow 500 */
    --accent-yellow-hover: #ca8a04; /* Yellow 600 */
    
    /* Backgrounds & Cards - Soft light blue-gray background to pop white cards */
    --bg-color: #f8fafc; /* Slate 50 */
    --bg-glow: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.05) 0%, transparent 60%);
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0; /* Slate 200 */
    --input-focus-border: #0284c7;

    /* Text Colors */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --text-white: #ffffff;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px rgba(2, 132, 199, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);
    --glass-border: rgba(2, 132, 199, 0.08);
}

/* Dark Mode Variables - Modern high-contrast space-theme */
[data-theme="dark"] {
    --primary-color: #38bdf8; /* Sky 400 - High brightness cyan */
    --primary-hover: #7dd3fc; /* Sky 300 */
    --primary-light: rgba(56, 189, 248, 0.15);
    --secondary-color: #0f172a; /* Slate 900 */
    --accent-yellow: #facc15; /* Yellow 400 */
    --accent-yellow-hover: #fef08a; /* Yellow 200 */

    --bg-color: #030712; /* Slate 950 - Deep rich black-blue */
    --bg-glow: radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.08) 0%, transparent 80%);
    --card-bg: #0f172a; /* Slate 900 */
    --nav-bg: rgba(3, 7, 18, 0.85);
    --border-color: #1e293b; /* Slate 800 */
    --input-focus-border: #38bdf8;

    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --text-white: #ffffff;


    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Outfit', sans-serif;
    /* ملاحظة: أُزيل transition العام من هنا لأنه يسبب Glitch وتهنيج أثناء التمرير
       وتم نقل الـ transitions المطلوبة لكل عنصر بشكل منفصل */
}

/* Targeted theme transitions — فقط للعناصر التي تحتاجها حقاً */
body,
#header,
.course-card,
.stat-card,
.advisor-card,
input, textarea, select, button,
.hb-dropdown,
.pwa-inner,
.nav-user-chip,
.hb-item,
.logo {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* عناصر تحتاج will-change للأنيميشن السلس */
.course-card { will-change: transform, box-shadow; }
.hero-main-img { will-change: transform; }
.fi3d { will-change: transform; }

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-glow);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    height: 60px;
}

/* Shining bottom line under the header */
#header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--accent-yellow), var(--primary-color), transparent);
    background-size: 200% 100%;
    animation: shine-border 3s linear infinite;
    box-shadow: 0 1px 12px var(--primary-color);
    transition: box-shadow 0.3s ease;
}

/* Clicking effect on header: flash the glow */
#header:active::after {
    box-shadow: 0 0 20px 4px var(--primary-color), 0 0 10px 2px var(--accent-yellow);
}

@keyframes shine-border {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


.header-container {
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Design */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 44px;
    width: 44px;
    border-radius: 50%;
    object-fit: contain;
    background-color: #030713;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 159, 255, 0.2);
    padding: 1px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text-inline {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.logo-sub {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo-sub-inline {
    font-size: 1rem;
    font-weight: 700;
}

.header-logo-side {
    display: flex;
    align-items: center;
    /* In RTL layout this sits on the RIGHT visually */
}

.header-actions-side {
    display: flex;
    align-items: center;
    gap: 12px;
    /* In RTL layout this sits on the LEFT visually */
}

/* Keep old classes for any refs */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* ══ Theme Toggle في الهيدر ══ */
.header-theme-wrap {
    display: flex;
    align-items: center;
}

.header-theme-btn {
    display: flex;
    align-items: center;
    gap: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-main);
}

.header-theme-btn:hover .htb-track {
    box-shadow: 0 0 10px rgba(2,132,199,0.35);
}

/* Icon inside the dot */
.htb-icon {
    display: none; /* hidden - icon shown inside dot via JS */
}

/* hide the old text label always */
.htb-label {
    display: none !important;
}

/* ── New sleek toggle track ── */
.htb-pill {
    width: 56px;
    height: 30px;
    border-radius: 15px;
    /* Light mode = warm golden gradient */
    background: linear-gradient(135deg, #f59e0b, #eab308);
    position: relative;
    transition: background 0.4s cubic-bezier(0.4,0,0.2,1),
                box-shadow  0.35s ease;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15),
                0 0 10px rgba(234,179,8,0.35);
}

/* track = the pill itself */
.htb-track {
    /* alias used via wrapper class */
}

[data-theme="dark"] .htb-pill {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.25),
                0 0 12px rgba(2,132,199,0.45);
}

/* Icons painted via pseudo on pill */
.htb-pill::before {
    content: "\f185"; /* fa-sun */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.62rem;
    color: rgba(255,255,255,0.9);
    opacity: 1;
    transition: opacity 0.3s ease, left 0.3s ease, right 0.3s ease;
}

[data-theme="dark"] .htb-pill::before {
    content: "\f186"; /* fa-moon */
    right: auto;
    left: 7px;
}

.htb-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25),
                0 0 0 2px rgba(255,255,255,0.3);
    transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1),
                background 0.3s ease;
}

[data-theme="dark"] .htb-dot {
    transform: translateX(26px);
    background: #f0f9ff;
}


.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 12px;
    transition: background 0.25s ease;
    padding: 0;
    position: relative;
}

.hamburger-btn:hover {
    background: rgba(2, 132, 199, 0.08);
}

.hb-line {
    display: block;
    height: 3px;
    border-radius: 3px;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1),
                opacity   0.25s ease,
                width     0.3s ease;
}

/* السطر الأول — ذهبي */
.hb-line-1 {
    width: 28px;
    background: linear-gradient(90deg, #eab308, #fcd34d);
    box-shadow: 0 0 6px rgba(234,179,8,0.55);
}

/* السطر الثاني — أزرق سماوي */
.hb-line-2 {
    width: 22px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    box-shadow: 0 0 6px rgba(2,132,199,0.55);
    align-self: flex-end;
    margin-left: auto;
    margin-right: 4px;
}

/* السطر الثالث — تدرج ذهبي سماوي */
.hb-line-3 {
    width: 26px;
    background: linear-gradient(90deg, #7dd3fc, #eab308);
    box-shadow: 0 0 6px rgba(125,211,252,0.5);
}

/* حالة مفتوح — تحويل لـ X */
.hamburger-btn.is-open .hb-line-1 {
    transform: translateY(8px) rotate(45deg);
    width: 28px;
    background: linear-gradient(90deg, #eab308, #38bdf8);
}
.hamburger-btn.is-open .hb-line-2 {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-btn.is-open .hb-line-3 {
    transform: translateY(-8px) rotate(-45deg);
    width: 28px;
    align-self: center;
    margin: 0;
}

/* ══ القايمة المنسدلة ══ */
.hb-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 210px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 8px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.12),
        0 0 0 1px rgba(2,132,199,0.12);
    direction: rtl;
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.4,0,.2,1);
    z-index: 2000;
}

/* سهم صغير فوق القايمة */
.hb-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 18px;
    width: 14px;
    height: 14px;
    background: var(--card-bg);
    border-radius: 3px;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(2,132,199,0.07);
}

.hb-dropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 14px;
    transition: background 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.hb-item:hover {
    transform: translateX(-3px);
}

/* بند سجل الدخول — أزرق */
.hb-login {
    background: rgba(2,132,199,0.06);
}
.hb-login:hover {
    background: rgba(2,132,199,0.13);
}
.hb-login .hb-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(2,132,199,0.35);
}
.hb-login .hb-item-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0284c7;
    flex: 1;
}
.hb-login .hb-item-arrow {
    color: rgba(2,132,199,0.45);
    font-size: 0.7rem;
}

/* بند اعمل حساب — ذهبي */
.hb-register {
    background: rgba(234,179,8,0.06);
}
.hb-register:hover {
    background: rgba(234,179,8,0.13);
}
.hb-register .hb-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eab308, #fcd34d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(234,179,8,0.35);
}
.hb-register .hb-item-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: #b45309;
    flex: 1;
}
.hb-register .hb-item-arrow {
    color: rgba(234,179,8,0.5);
    font-size: 0.7rem;
}

.hb-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
    border-radius: 1px;
}

/* ── صف الوضع الليلي/النهاري ── */
.hb-theme {
    cursor: pointer;
    user-select: none;
    background: rgba(125,211,252,0.06);
}
.hb-theme:hover {
    background: rgba(125,211,252,0.13);
    transform: translateX(-3px);
}
.hb-theme-icon {
    background: linear-gradient(135deg, #7dd3fc, #0284c7) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(2,132,199,0.35) !important;
    transition: background 0.3s ease;
}
[data-theme="dark"] .hb-theme-icon {
    background: linear-gradient(135deg, #1e293b, #38bdf8) !important;
}
.hb-theme .hb-item-text {
    color: #0284c7;
    flex: 1;
}
[data-theme="dark"] .hb-theme .hb-item-text {
    color: #38bdf8;
}

/* بيل toggle صغير */
.hb-theme-pill {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.hb-theme-dot {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
[data-theme="dark"] .hb-theme-pill {
    background: #0284c7;
}
[data-theme="dark"] .hb-theme-dot {
    transform: translateX(16px);
}

/* Switch (Theme Switcher) */
.theme-switch-container {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 32px;
    position: relative;
    width: 64px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #cbd5e1;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 24px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 24px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.sun-icon, .moon-icon {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-icon {
    color: #eab308;
}

.moon-icon {
    color: #f1f5f9;
}

/* Search Button */
.search-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.search-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Navigation Auth Buttons */
.nav-login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--accent-yellow);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: 0.3s;
}

.nav-login-link:hover {
    background-color: rgba(248, 194, 26, 0.08);
}

.btn-signup {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background-color: var(--primary-color);
    color: var(--text-white);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 159, 255, 0.15);
    transition: 0.3s;
}

.btn-signup:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 159, 255, 0.25);
}

.nav-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 7px 12px 7px 16px;
    box-shadow: var(--shadow-sm);
}

.nav-user-chip:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nav-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 6px 16px var(--primary-light);
}

.nav-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.nav-user-meta strong {
    font-size: 0.92rem;
    font-weight: 800;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-meta small {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Search Overlay Styling */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s ease;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.search-modal {
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-40px);
    transition: 0.4s ease;
}

.search-overlay.active .search-modal {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: -60px;
    left: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
}

.search-form {
    display: flex;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-form input {
    flex: 1;
    padding: 16px 24px;
    font-size: 1.15rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.search-form button {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 64px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: 0.3s;
}

.search-form button:hover {
    background: var(--primary-hover);
}

/* Forgot Password Modal */
.forgot-modal {
    width: 90%;
    max-width: 480px;
    position: relative;
    transform: translateY(-40px);
    transition: 0.4s ease;
}

.forgot-password-overlay.active .forgot-modal,
#forgot-password-overlay.active .forgot-modal {
    transform: translateY(0);
}

.forgot-modal-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
}

.forgot-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.forgot-modal-title i {
    color: var(--primary-color);
}

.forgot-modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.forgot-modal-alert {
    display: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.forgot-modal-alert.ok {
    display: block;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.forgot-modal-alert.err {
    display: block;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.forgot-modal-card .auth-form {
    gap: 20px;
}

/* Main Container & Page Switcher Layout */
main {
    padding-top: 60px;
    min-height: calc(100vh - 60px);
}

.view-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 1. Home / Hero View Layout */
#home-view {
    position: relative;
}

[data-theme="dark"] #home-view {
    background: none;
}
[data-theme="dark"] #home-view::after {
    display: none;
}

.hero-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 100px 24px;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    gap: 20px;
    min-height: calc(100vh - 180px);
    overflow: visible;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--primary-color);
}

.hero-title .highlight-gold {
    /* تدرج يشبه شريط الهيدر: أزرق → ذهبي → أزرق */
    background: linear-gradient(
        90deg,
        var(--primary-color)   0%,
        #38bdf8               20%,
        #eab308               45%,
        #fde68a               60%,
        #0284c7               80%,
        var(--accent-yellow)  100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: none;
    animation: titleShine 4s linear infinite;
    filter: drop-shadow(0 2px 10px rgba(2,132,199,0.3));
}

@keyframes titleShine {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-title-sub {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 10px;
}

.hero-author {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-author::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    display: inline-block;
    border-radius: 2px;
}

/* Left Hero Visual Blob Layout */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.blob-wrapper {
    position: relative;
    width: 660px;
    height: 620px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    background: transparent;
    /* يمنع "تقطيع" المدرس عن باقي الخلفية أثناء السحب/السكرول على الموبايل */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Background blob - مش محتاجينه */
.blob-bg { display: none; }

/* Teacher background circle — HIDDEN: replaced by side decorative elements */
.blob-image-container {
    display: none;
}

/* إخفاء الدائرة الكبيرة خلف المدرس */
.hero-bg-circle,
.hero-bg-circle-inner {
    display: none !important;
}

/* صورة الدكتور — شفافة أصلاً */
.hero-main-img {
    position: absolute;
    width: 580px;
    height: auto;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    display: block;
    will-change: transform;
    mix-blend-mode: normal;
    filter: drop-shadow(0 28px 56px rgba(0,0,0,0.18)) drop-shadow(0 8px 20px rgba(2,132,199,0.10));
    transition: filter 0.6s ease;
}

[data-theme="dark"] .hero-main-img {
    mix-blend-mode: normal;
    filter: drop-shadow(0 28px 56px rgba(0,0,0,0.40)) drop-shadow(0 8px 20px rgba(2,132,199,0.20));
}

.hero-main-img:hover {
    filter: drop-shadow(0 32px 64px rgba(0,0,0,0.28)) drop-shadow(0 10px 28px rgba(2,132,199,0.2));
}

@keyframes hero-parallax-idle {
    0%, 100% { filter: drop-shadow(0 28px 56px rgba(0,0,0,0.22)) drop-shadow(0 8px 20px rgba(2,132,199,0.12)); }
    50%       { filter: drop-shadow(0 32px 64px rgba(0,0,0,0.26)) drop-shadow(0 10px 28px rgba(2,132,199,0.18)); }
}

/* ══════════════════════════════════════════════════════
   TECH AURA SYSTEM — بديل الدائرة الكاملة
   ══════════════════════════════════════════════════════ */

/* إخفاء العناصر القديمة */
.blob-bg { display: none; }
.blob-image-container { display: none; }
.blob-ring-wrapper { display: none; }
.blob-color-ring { display: none; }
.blob-pulse-ring { display: none; }

/* ── Glow هالة خلف المدرس ── */
.teacher-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(55px);
    z-index: 1;
}
.teacher-glow-head {
    width: 340px;
    height: 280px;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(2,132,199,0.26) 0%, rgba(56,189,248,0.14) 45%, rgba(234,179,8,0.05) 70%, transparent 100%);
    animation: glowPulse 4s ease-in-out infinite;
    filter: blur(42px);
}
.teacher-glow-left {
    width: 200px;
    height: 300px;
    top: 30%;
    left: 8%;
    background: radial-gradient(circle, rgba(234,179,8,0.12) 0%, transparent 70%);
    animation: glowPulse 5s ease-in-out infinite 1s;
}
.teacher-glow-right {
    width: 200px;
    height: 300px;
    top: 30%;
    right: 8%;
    background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
    animation: glowPulse 5s ease-in-out infinite 2s;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50%       { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}
.teacher-glow-left  { animation: glowPulseSide 5s ease-in-out infinite 1s; }
.teacher-glow-right { animation: glowPulseSide 5s ease-in-out infinite 2s; }
@keyframes glowPulseSide {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.2); }
}

/* ── Light Trails SVG ── */
.hero-light-trails {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.lt-path {
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0;
    animation: trailDraw 5s ease-in-out infinite;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}
.lt-line {
    stroke-width: 1;
    stroke-linecap: round;
    opacity: 0;
    animation: lineFade 4s ease-in-out infinite;
}

.lt-blue  { stroke: #0284c7; }
.lt-cyan  { stroke: #38bdf8; }
.lt-gold  { stroke: #eab308; }
.lt-delay1 { animation-delay: 1.6s; }
.lt-delay2 { animation-delay: 3.2s; }

@keyframes trailDraw {
    0%        { opacity: 0; stroke-dashoffset: 200; }
    15%       { opacity: 0.7; }
    60%       { opacity: 0.5; stroke-dashoffset: 0; }
    85%       { opacity: 0; stroke-dashoffset: -200; }
    100%      { opacity: 0; stroke-dashoffset: -200; }
}
@keyframes lineFade {
    0%, 100%  { opacity: 0; transform: scaleX(0.4); }
    30%, 70%  { opacity: 0.35; transform: scaleX(1); }
}

/* ── Particles نقاط ضوئية متحركة ── */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}
.hp {
    position: absolute;
    border-radius: 50%;
    animation: particleDrift ease-in-out infinite;
}
/* كل نقطة بموضع ولون وحجم وتأخير مختلف */
.hp-1  { width:6px;  height:6px;  background:#0284c7; left:12%; top:18%; animation-duration:6s;   animation-delay:0s; }
.hp-2  { width:4px;  height:4px;  background:#eab308; left:82%; top:22%; animation-duration:7s;   animation-delay:1s; }
.hp-3  { width:5px;  height:5px;  background:#38bdf8; left:8%;  top:55%; animation-duration:5.5s; animation-delay:2s; }
.hp-4  { width:3px;  height:3px;  background:#fcd34d; left:88%; top:60%; animation-duration:8s;   animation-delay:0.5s; }
.hp-5  { width:7px;  height:7px;  background:#0ea5e9; left:20%; top:80%; animation-duration:6.5s; animation-delay:1.5s; }
.hp-6  { width:4px;  height:4px;  background:#eab308; left:75%; top:78%; animation-duration:5s;   animation-delay:3s; }
.hp-7  { width:5px;  height:5px;  background:#7dd3fc; left:35%; top:8%;  animation-duration:7.5s; animation-delay:0.8s; }
.hp-8  { width:3px;  height:3px;  background:#0284c7; left:65%; top:12%; animation-duration:9s;   animation-delay:2.5s; }
.hp-9  { width:6px;  height:6px;  background:#fde68a; left:5%;  top:35%; animation-duration:6s;   animation-delay:4s; }
.hp-10 { width:4px;  height:4px;  background:#38bdf8; left:92%; top:40%; animation-duration:7s;   animation-delay:1.2s; }
.hp-11 { width:5px;  height:5px;  background:#eab308; left:50%; top:92%; animation-duration:5.5s; animation-delay:3.5s; }
.hp-12 { width:3px;  height:3px;  background:#0284c7; left:28%; top:88%; animation-duration:8s;   animation-delay:0.3s; }

@keyframes particleDrift {
    0%   { transform: translate(0,0) scale(1);    opacity:0; }
    10%  { opacity: 0.9; }
    50%  { transform: translate(var(--px,12px), var(--py,-18px)) scale(1.3); opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { transform: translate(0,0) scale(1);    opacity: 0; }
}
.hp-1  { --px: 14px;  --py: -20px; }
.hp-2  { --px: -12px; --py: -15px; }
.hp-3  { --px: 18px;  --py: -10px; }
.hp-4  { --px: -16px; --py: 12px;  }
.hp-5  { --px: 10px;  --py: -22px; }
.hp-6  { --px: -14px; --py: -18px; }
.hp-7  { --px: -8px;  --py: 14px;  }
.hp-8  { --px: 12px;  --py: 16px;  }
.hp-9  { --px: 20px;  --py: -8px;  }
.hp-10 { --px: -18px; --py: 10px;  }
.hp-11 { --px: -6px;  --py: -16px; }
.hp-12 { --px: 16px;  --py: -12px; }

/* ── أشكال هندسية شفافة ── */
.hero-geo {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    animation: geoDrift ease-in-out infinite;
}

/* مربعات */
.geo-sq-1 {
    width: 28px; height: 28px;
    border: 1.5px solid rgba(2,132,199,0.35);
    border-radius: 4px;
    left: 7%; top: 62%;
    animation-duration: 7s; animation-delay: 0s;
    transform-origin: center;
}
.geo-sq-2 {
    width: 18px; height: 18px;
    border: 1.5px solid rgba(234,179,8,0.4);
    border-radius: 3px;
    left: 85%; top: 30%;
    animation-duration: 9s; animation-delay: 2s;
}

/* معينات */
.geo-dia-1 {
    width: 16px; height: 16px;
    border: 1.5px solid rgba(234,179,8,0.5);
    transform: rotate(45deg);
    left: 88%; top: 64%;
    animation-duration: 6s; animation-delay: 1s;
}
.geo-dia-2 {
    width: 12px; height: 12px;
    border: 1.5px solid rgba(56,189,248,0.5);
    transform: rotate(45deg);
    left: 10%; top: 30%;
    animation-duration: 8s; animation-delay: 3s;
}
.geo-dia-3 {
    width: 20px; height: 20px;
    border: 1.5px solid rgba(234,179,8,0.35);
    transform: rotate(45deg);
    left: 48%; top: 90%;
    animation-duration: 7s; animation-delay: 1.5s;
}

/* دوائر صغيرة */
.geo-circ-1 {
    width: 22px; height: 22px;
    border: 1.5px solid rgba(56,189,248,0.4);
    border-radius: 50%;
    left: 4%; top: 20%;
    animation-duration: 5s; animation-delay: 0.5s;
}
.geo-circ-2 {
    width: 14px; height: 14px;
    border: 1.5px solid rgba(234,179,8,0.45);
    border-radius: 50%;
    left: 82%; top: 85%;
    animation-duration: 6.5s; animation-delay: 2.5s;
}
.geo-circ-3 {
    width: 30px; height: 30px;
    border: 1px solid rgba(2,132,199,0.2);
    border-radius: 50%;
    left: 55%; top: 5%;
    animation-duration: 10s; animation-delay: 4s;
}

/* مثلث — بـ clip-path */
.geo-tri-1 {
    width: 20px; height: 18px;
    background: transparent;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid rgba(56,189,248,0.3);
    left: 78%; top: 18%;
    animation-duration: 8s; animation-delay: 1.8s;
}

@keyframes geoDrift {
    0%, 100% { opacity: 0.5; transform: translateY(0px) rotate(var(--gr, 0deg)); }
    33%       { opacity: 0.9; transform: translateY(-12px) rotate(calc(var(--gr, 0deg) + 15deg)); }
    66%       { opacity: 0.6; transform: translateY(-6px) rotate(calc(var(--gr, 0deg) - 8deg)); }
}
.geo-dia-1 { --gr: 45deg; }
.geo-dia-2 { --gr: 45deg; }
.geo-dia-3 { --gr: 45deg; }
.geo-sq-1  { --gr: 0deg;  }
.geo-sq-2  { --gr: 12deg; }

/* ══ عناصر زخرفية جانبية (قديمة — مخفية) ══ */
.hero-deco-left,
.hero-deco-right { display: none; }

.hero-deco-left  { left: -10px; }
.hero-deco-right { right: -10px; }

.hero-deco-orb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-yellow, #eab308);
    opacity: 0.7;
    animation: deco-pulse 3s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(234,179,8,0.55);
}

.hero-deco-orb.blue {
    background: #38bdf8;
    box-shadow: 0 0 12px rgba(56,189,248,0.55);
    animation-delay: 1.5s;
}

.hero-deco-orb.sm {
    width: 6px;
    height: 6px;
    opacity: 0.5;
}

.hero-deco-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(234,179,8,0.5), transparent);
    border-radius: 2px;
}

.hero-deco-diamond {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(234,179,8,0.7);
    transform: rotate(45deg);
    animation: deco-spin 8s linear infinite;
}

.hero-deco-diamond.blue {
    border-color: rgba(56,189,248,0.7);
    animation-direction: reverse;
}

.hero-deco-arc {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-top-color: rgba(234,179,8,0.5);
    border-right-color: rgba(234,179,8,0.3);
    border-radius: 50%;
    animation: deco-spin 5s linear infinite;
}

.hero-deco-arc.blue {
    border-top-color: rgba(56,189,248,0.5);
    border-right-color: rgba(56,189,248,0.3);
    animation-direction: reverse;
    animation-duration: 6s;
}

.hero-deco-dots {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-deco-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(234,179,8,0.6);
    display: block;
    animation: deco-pulse 2.5s ease-in-out infinite;
}
.hero-deco-dots span:nth-child(2) { animation-delay: 0.4s; background: rgba(56,189,248,0.6); }
.hero-deco-dots span:nth-child(3) { animation-delay: 0.8s; }

.hero-deco-letter {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(234,179,8,0.45);
    animation: deco-float-letter 4s ease-in-out infinite;
    user-select: none;
}
.hero-deco-letter.blue {
    -webkit-text-stroke: 1.5px rgba(56,189,248,0.45);
    animation-delay: 2s;
}

@keyframes deco-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.3); }
}

@keyframes deco-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes deco-float-letter {
    0%, 100% { transform: translateY(0px); opacity: 0.5; }
    50%       { transform: translateY(-10px); opacity: 0.85; }
}

/* ── بطاقات ميزات عائمة حول الدائرة ── */
.hero-feature-card {
    position: absolute;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 6;
    white-space: nowrap;
    animation: featureFloat ease-in-out infinite;
    animation-duration: var(--fc-dur, 4s);
    animation-delay: var(--fc-delay, 0s);
    direction: rtl;
    border: 1.5px solid var(--fc-border, rgba(2,132,199,0.25));
    box-shadow: 0 4px 16px var(--fc-glow, rgba(2,132,199,0.12));
}
.hero-feature-card .fc-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: var(--fc-icon-bg);
    color: var(--fc-icon-color);
}
.hero-feature-card .fc-text strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}
/* شيل النص التحتاني للبطاقات */
.hero-feature-card .fc-text span {
    display: none;
}

/* أماكن وألوان كل بطاقة — تم تقريبها للداخل حتى لا تخرج عن حدود الشاشة */
.fc-nahw {
    top: 3%; right: -6%;
    --fc-dur: 4.2s; --fc-delay: 0s;
    --fc-border: rgba(234,179,8,0.4);
    --fc-glow:  rgba(234,179,8,0.18);
    --fc-icon-bg: rgba(234,179,8,0.14);
    --fc-icon-color: #b45309;
}
.fc-balag {
    top: 30%; left: -6%;
    --fc-dur: 5s; --fc-delay: 0.8s;
    --fc-border: rgba(14,165,233,0.4);
    --fc-glow:  rgba(14,165,233,0.18);
    --fc-icon-bg: rgba(14,165,233,0.14);
    --fc-icon-color: #0284c7;
}
.fc-imla {
    bottom: 3%; left: -6%;
    --fc-dur: 3.8s; --fc-delay: 0.3s;
    --fc-border: rgba(56,189,248,0.4);
    --fc-glow:  rgba(56,189,248,0.18);
    --fc-icon-bg: rgba(56,189,248,0.14);
    --fc-icon-color: #0369a1;
}
.fc-adab {
    bottom: 3%; right: -6%;
    --fc-dur: 4.6s; --fc-delay: 1.1s;
    --fc-border: rgba(139,92,246,0.4);
    --fc-glow:  rgba(139,92,246,0.18);
    --fc-icon-bg: rgba(139,92,246,0.14);
    --fc-icon-color: #7c3aed;
}

@keyframes featureFloat {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50%       { transform: translateY(-11px) rotate(1deg); }
}

/* Floating educational icons styling */
.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    z-index: 5;
    animation: floating-anim 4s ease-in-out infinite;
    animation-delay: var(--delay);
    top: var(--y);
    left: var(--x);
}

.floating-icon.icon-star {
    color: var(--accent-yellow);
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.deco-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-yellow);
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.6);
    z-index: 4;
    animation: floating-anim 3.4s ease-in-out infinite;
}

.dot-1 {
    top: 4%;
    left: 78%;
    animation-delay: 0.6s;
    width: 9px;
    height: 9px;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.6);
}

.dot-2 {
    top: 92%;
    left: 30%;
    animation-delay: 1.8s;
}

.dot-3 {
    top: 50%;
    left: -2%;
    animation-delay: 2.6s;
    width: 8px;
    height: 8px;
}

.dotted-ring {
    position: absolute;
    border: 2px dashed rgba(0, 159, 255, 0.35);
    border-radius: 50%;
    z-index: 0;
}

.ring-1 {
    width: 500px;
    height: 500px;
    animation: spin 30s linear infinite;
}

.ring-2 {
    width: 540px;
    height: 540px;
    animation: spin 45s linear infinite reverse;
}

/* Animations */
@keyframes blob-bounce {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translateY(0) scale(1);
    }
    50% {
        border-radius: 60% 40% 50% 50% / 50% 60% 45% 55%;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        border-radius: 45% 55% 65% 35% / 45% 45% 65% 55%;
        transform: translateY(5px) scale(0.98);
    }
}

@keyframes teacher-float {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateX(-48%) translateY(-8px) rotate(1.2deg) scale(1.01);
    }
    50% {
        transform: translateX(-50%) translateY(-15px) rotate(0deg) scale(1.02);
    }
    75% {
        transform: translateX(-52%) translateY(-6px) rotate(-1.2deg) scale(1.01);
    }
    100% {
        transform: translateX(-50%) translateY(5px) rotate(0deg) scale(0.98);
    }
}

@keyframes floating-anim {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(8deg);
    }
    50% {
        transform: translate(0, -16px) rotate(0deg);
    }
    75% {
        transform: translate(-10px, -10px) rotate(-8deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ══════════════════════════════════════════════════════
   3D FLOATING ICONS — قبعة + كتاب + كليب بورد
   ══════════════════════════════════════════════════════ */
.fi3d {
    position: absolute;
    pointer-events: none;
    z-index: 6;
    filter:
        drop-shadow(0 12px 28px rgba(0,80,200,0.38))
        drop-shadow(0 4px 10px rgba(0,120,255,0.22));
    animation: fi3dFloat ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform, filter;
}

/* قبعة التخرج — يسار علوي (نفس مكانها في الصورة) */
.fi3d-cap {
    width: 130px;
    height: 110px;
    top: 4%;
    left: -2%;
    animation-duration: 6s;
    filter:
        drop-shadow(0 14px 32px rgba(0,60,180,0.45))
        drop-shadow(0 2px 8px rgba(30,120,255,0.3))
        drop-shadow(0 0 20px rgba(56,189,248,0.2));
}

/* كتاب مفتوح — يمين وسط علوي */
.fi3d-book {
    width: 110px;
    height: 100px;
    top: 20%;
    right: -4%;
    animation-duration: 5.5s;
    animation-delay: 1.4s;
    filter:
        drop-shadow(0 12px 28px rgba(0,70,200,0.4))
        drop-shadow(0 2px 8px rgba(20,100,240,0.28))
        drop-shadow(0 0 18px rgba(56,189,248,0.22));
}

/* كليب بورد — يمين أسفل */
.fi3d-clipboard {
    width: 100px;
    height: 115px;
    bottom: 14%;
    right: -3%;
    animation-duration: 6.8s;
    animation-delay: 2.6s;
    filter:
        drop-shadow(0 14px 30px rgba(0,60,180,0.4))
        drop-shadow(0 2px 8px rgba(20,100,240,0.25))
        drop-shadow(0 0 16px rgba(96,239,255,0.25));
}

@keyframes fi3dFloat {
    0%   { transform: translateY(0px) rotate(-1deg) scale(1); }
    25%  { transform: translateY(-10px) rotate(1deg) scale(1.02); }
    50%  { transform: translateY(-16px) rotate(-0.5deg) scale(1.03); }
    75%  { transform: translateY(-8px) rotate(0.8deg) scale(1.01); }
    100% { transform: translateY(0px) rotate(-1deg) scale(1); }
}

/* glow نابض على الأيقونات 3D */
.fi3d-cap {
    animation: fi3dFloat 6s ease-in-out infinite, fi3dGlowCap 4s ease-in-out infinite;
}
.fi3d-book {
    animation: fi3dFloat 5.5s ease-in-out infinite 1.4s, fi3dGlowBook 4.5s ease-in-out infinite 0.8s;
}
.fi3d-clipboard {
    animation: fi3dFloat 6.8s ease-in-out infinite 2.6s, fi3dGlowClip 5s ease-in-out infinite 1.5s;
}

@keyframes fi3dGlowCap {
    0%, 100% { filter: drop-shadow(0 14px 32px rgba(0,60,180,0.45)) drop-shadow(0 2px 8px rgba(30,120,255,0.3)) drop-shadow(0 0 20px rgba(56,189,248,0.2)); }
    50%       { filter: drop-shadow(0 18px 42px rgba(0,60,180,0.6)) drop-shadow(0 4px 14px rgba(30,120,255,0.4)) drop-shadow(0 0 36px rgba(56,189,248,0.38)); }
}
@keyframes fi3dGlowBook {
    0%, 100% { filter: drop-shadow(0 12px 28px rgba(0,70,200,0.4)) drop-shadow(0 2px 8px rgba(20,100,240,0.28)) drop-shadow(0 0 18px rgba(56,189,248,0.22)); }
    50%       { filter: drop-shadow(0 16px 38px rgba(0,70,200,0.55)) drop-shadow(0 4px 14px rgba(20,100,240,0.4)) drop-shadow(0 0 32px rgba(56,189,248,0.38)); }
}
@keyframes fi3dGlowClip {
    0%, 100% { filter: drop-shadow(0 14px 30px rgba(0,60,180,0.4)) drop-shadow(0 2px 8px rgba(20,100,240,0.25)) drop-shadow(0 0 16px rgba(96,239,255,0.25)); }
    50%       { filter: drop-shadow(0 18px 40px rgba(0,60,180,0.55)) drop-shadow(0 4px 14px rgba(20,100,240,0.38)) drop-shadow(0 0 30px rgba(96,239,255,0.45)); }
}

/* mobile responsive */
@media (max-width: 768px) {
    .fi3d-cap       { width: 80px;  height: 68px;  top: 2%;    left: -1%; }
    .fi3d-book      { width: 68px;  height: 62px;  top: 18%;   right: -2%; }
    .fi3d-clipboard { width: 62px;  height: 72px;  bottom: 10%; right: -2%; }
}

/* ══ PREMIUM HERO ENHANCEMENTS v2 — تطوير هيرو احترافي ══ */

/* ── دائرة توهج خلف المدرس (Premium Aura Ring) ── */
.hero-aura-ring {
    position: absolute;
    width: 420px;
    height: 480px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    z-index: 1;
    pointer-events: none;
}
.hero-aura-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse 70% 80% at 50% 48%,
        rgba(56,189,248,0.22) 0%,
        rgba(14,165,233,0.14) 30%,
        rgba(234,179,8,0.06) 60%,
        transparent 80%
    );
    animation: auraBreath 5s ease-in-out infinite;
    filter: blur(18px);
}
.hero-aura-ring::after {
    content: '';
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(ellipse 55% 65% at 50% 50%,
        rgba(2,132,199,0.10) 0%,
        rgba(234,179,8,0.05) 50%,
        transparent 75%
    );
    animation: auraBreath 7s ease-in-out infinite 1.5s;
    filter: blur(30px);
}
@keyframes auraBreath {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.08); }
}

/* ══ شيل الدوائر خلف المدرس ══ */
.hero-aura-ring,
.hero-orbit-ring,
.hero-orbit-ring-2,
.hero-ambient-blob {
    display: none !important;
}

/* ══════════════════════════════════════════
   حروف الهجاء العائمة حول البنر
   ══════════════════════════════════════════ */
.arabic-letter {
    position: absolute;
    font-family: 'Tajawal', sans-serif;
    font-weight: 900;
    pointer-events: none;
    z-index: 4;
    will-change: transform, opacity;
    user-select: none;
    line-height: 1;
}

/* حروف سماوية */
.arabic-letter.cyan {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56,189,248,0.5);
}
/* حروف ذهبية */
.arabic-letter.gold {
    color: #eab308;
    text-shadow: 0 0 12px rgba(234,179,8,0.5);
}
/* حروف أزرق داكن */
.arabic-letter.blue {
    color: #0284c7;
    text-shadow: 0 0 10px rgba(2,132,199,0.4);
}

@keyframes letterFloat1 {
    0%,100% { transform: translateY(0px) rotate(-5deg); opacity: 0.55; }
    50%      { transform: translateY(-18px) rotate(5deg); opacity: 0.9; }
}
@keyframes letterFloat2 {
    0%,100% { transform: translateY(0px) rotate(8deg); opacity: 0.5; }
    50%      { transform: translateY(-14px) rotate(-6deg); opacity: 0.85; }
}
@keyframes letterFloat3 {
    0%,100% { transform: translateY(0px) rotate(-3deg); opacity: 0.45; }
    50%      { transform: translateY(-20px) rotate(4deg); opacity: 0.8; }
}
@keyframes letterFloat4 {
    0%,100% { transform: translateY(0px) rotate(6deg); opacity: 0.6; }
    50%      { transform: translateY(-12px) rotate(-8deg); opacity: 0.95; }
}
@keyframes letterFloat5 {
    0%,100% { transform: translateY(0px) rotate(-7deg); opacity: 0.4; }
    50%      { transform: translateY(-16px) rotate(3deg); opacity: 0.75; }
}

/* ── حلقة ضوئية دوارة خلف المدرس ── */
.hero-orbit-ring {
    position: absolute;
    width: 500px;
    height: 560px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -51%);
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background: linear-gradient(#ffffff00, #ffffff00) padding-box,
                linear-gradient(135deg,
                    rgba(56,189,248,0.4) 0%,
                    transparent 30%,
                    rgba(234,179,8,0.35) 55%,
                    transparent 75%,
                    rgba(14,165,233,0.3) 100%
                ) border-box;
    animation: orbitSpin 18s linear infinite;
    filter: blur(0.5px);
}
.hero-orbit-ring-2 {
    position: absolute;
    width: 540px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -51%);
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    border: 1px solid transparent;
    background: linear-gradient(#ffffff00, #ffffff00) padding-box,
                linear-gradient(220deg,
                    rgba(234,179,8,0.25) 0%,
                    transparent 40%,
                    rgba(56,189,248,0.2) 70%,
                    transparent 90%
                ) border-box;
    animation: orbitSpin 28s linear infinite reverse;
    filter: blur(0.3px);
}
@keyframes orbitSpin {
    from { transform: translate(-50%, -51%) rotate(0deg); }
    to   { transform: translate(-50%, -51%) rotate(360deg); }
}

/* ── بقع ضوء محيطة (Ambient Blobs) ── */
.hero-ambient-blob {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    opacity: 0;
    animation: blobAppear 3s ease forwards;
}
.hero-ambient-blob.blob-top {
    width: 350px; height: 280px;
    top: -40px; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(56,189,248,0.18) 0%, transparent 70%);
    animation: blobAppear 3s ease forwards, blobDrift 8s ease-in-out infinite 3s;
}
.hero-ambient-blob.blob-left {
    width: 280px; height: 360px;
    top: 20%; left: -20px;
    background: radial-gradient(circle, rgba(234,179,8,0.13) 0%, transparent 70%);
    animation: blobAppear 3.5s ease forwards, blobDrift 10s ease-in-out infinite 3.5s;
    animation-delay: 0.5s;
}
.hero-ambient-blob.blob-right {
    width: 280px; height: 360px;
    top: 20%; right: -20px;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, transparent 70%);
    animation: blobAppear 4s ease forwards, blobDrift 9s ease-in-out infinite 4s;
    animation-delay: 1s;
}
.hero-ambient-blob.blob-bottom {
    width: 400px; height: 220px;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(2,132,199,0.1) 0%, rgba(234,179,8,0.06) 50%, transparent 80%);
    animation: blobAppear 4.5s ease forwards;
    animation-delay: 0.8s;
}
@keyframes blobAppear {
    from { opacity: 0; transform: translateX(-50%) scale(0.8); }
    to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes blobDrift {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50%       { transform: translateX(-50%) translateY(-15px) scale(1.05); }
}

/* ── شرارات / Sparkles ── */
.hero-sparkle {
    position: absolute;
    pointer-events: none;
    z-index: 7;
    animation: sparklePop ease-in-out infinite;
}
.hero-sparkle::before, .hero-sparkle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 1px;
}
.hero-sparkle::before {
    width: 2px; height: 12px;
    transform: translate(-50%, -50%);
    background: linear-gradient(to bottom, transparent, currentColor, transparent);
}
.hero-sparkle::after {
    width: 12px; height: 2px;
    transform: translate(-50%, -50%);
    background: linear-gradient(to right, transparent, currentColor, transparent);
}
.sp-1 { color: rgba(234,179,8,0.9); top: 8%;  left: 68%; animation-duration: 3.5s; animation-delay: 0s;   }
.sp-2 { color: rgba(56,189,248,0.8); top: 15%; left: 20%; animation-duration: 4.2s; animation-delay: 1.1s; }
.sp-3 { color: rgba(234,179,8,0.7); top: 70%; left: 82%; animation-duration: 3.8s; animation-delay: 0.6s; }
.sp-4 { color: rgba(14,165,233,0.8); top: 82%; left: 18%; animation-duration: 4.6s; animation-delay: 2.1s; }
.sp-5 { color: rgba(253,211,77,0.9); top: 45%; left: 93%; animation-duration: 3.2s; animation-delay: 1.7s; }
.sp-6 { color: rgba(56,189,248,0.7); top: 50%; left: 5%;  animation-duration: 5s;   animation-delay: 0.3s; }
@keyframes sparklePop {
    0%   { opacity: 0; transform: scale(0) rotate(0deg); }
    20%  { opacity: 1; transform: scale(1) rotate(45deg); }
    50%  { opacity: 0.8; transform: scale(1.2) rotate(90deg); }
    80%  { opacity: 0.4; transform: scale(0.8) rotate(135deg); }
    100% { opacity: 0; transform: scale(0) rotate(180deg); }
}

/* ── تحسين بطاقات الميزات (Glassmorphism upgrade) ── */
.hero-feature-card {
    background: rgba(255,255,255,0.82) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-width: 1.5px !important;
    border-color: var(--fc-border, rgba(2,132,199,0.3)) !important;
    box-shadow:
        0 8px 32px var(--fc-glow, rgba(2,132,199,0.18)),
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.9) !important;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease;
    will-change: transform;
}
.hero-feature-card:hover {
    transform: translateY(-8px) scale(1.04) !important;
    box-shadow:
        0 16px 48px var(--fc-glow, rgba(2,132,199,0.28)),
        0 4px 16px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,1) !important;
}

/* Dark mode glass cards */
[data-theme="dark"] .hero-feature-card {
    background: rgba(15,25,40,0.75) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* ── تحسين الأيقونات العائمة ── */
.floating-icon {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.5rem !important;
    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(56,189,248,0.3) !important;
    box-shadow:
        0 8px 24px rgba(2,132,199,0.18),
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.9) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.floating-icon:hover {
    transform: scale(1.15) !important;
    box-shadow:
        0 12px 36px rgba(2,132,199,0.28),
        0 4px 12px rgba(0,0,0,0.1) !important;
}
.floating-icon.icon-star {
    width: 44px !important;
    height: 44px !important;
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(234,179,8,0.4) !important;
    box-shadow: 0 6px 20px rgba(234,179,8,0.25) !important;
}
/* Glow لون مختلف لكل أيقونة */
.floating-icon.icon-cap   { color: #0284c7; box-shadow: 0 8px 24px rgba(2,132,199,0.22), inset 0 1px 0 rgba(255,255,255,0.9) !important; }
.floating-icon.icon-book  { color: #0369a1; box-shadow: 0 8px 24px rgba(3,105,161,0.22), inset 0 1px 0 rgba(255,255,255,0.9) !important; }
.floating-icon.icon-pencil{ color: #b45309; box-shadow: 0 8px 24px rgba(180,83,9,0.18), inset 0 1px 0 rgba(255,255,255,0.9) !important; }
.floating-icon.icon-ruler { color: #0284c7; box-shadow: 0 8px 24px rgba(2,132,199,0.22), inset 0 1px 0 rgba(255,255,255,0.9) !important; }
.floating-icon.icon-test  { color: #0369a1; box-shadow: 0 8px 24px rgba(3,105,161,0.22), inset 0 1px 0 rgba(255,255,255,0.9) !important; }
.floating-icon.icon-lang  { color: #b45309; box-shadow: 0 8px 24px rgba(180,83,9,0.18), inset 0 1px 0 rgba(255,255,255,0.9) !important; }

[data-theme="dark"] .floating-icon {
    background: rgba(15,25,40,0.8) !important;
}

/* ── تحسين صورة المدرس ── */
.hero-main-img {
    filter:
        drop-shadow(0 30px 60px rgba(0,0,0,0.28))
        drop-shadow(0 8px 24px rgba(2,132,199,0.18))
        drop-shadow(0 0 80px rgba(56,189,248,0.12)) !important;
    animation: teacherIdle 7s ease-in-out infinite;
    transition: filter 0.5s ease !important;
}
.hero-main-img:hover {
    filter:
        drop-shadow(0 36px 72px rgba(0,0,0,0.32))
        drop-shadow(0 10px 30px rgba(2,132,199,0.25))
        drop-shadow(0 0 100px rgba(56,189,248,0.18)) !important;
}
@keyframes teacherIdle {
    0%, 100% {
        transform: translateX(-50%) translateY(0px);
        filter: drop-shadow(0 30px 60px rgba(0,0,0,0.28)) drop-shadow(0 8px 24px rgba(2,132,199,0.18)) drop-shadow(0 0 80px rgba(56,189,248,0.12));
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
        filter: drop-shadow(0 38px 70px rgba(0,0,0,0.3)) drop-shadow(0 12px 30px rgba(2,132,199,0.22)) drop-shadow(0 0 100px rgba(56,189,248,0.15));
    }
}

.hero-subtitle-line {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 0.02em;
    position: relative;
    padding-right: 0;
}

/* نجمة زخرفية تحت العنوان */
.hero-title-sub::after {
    content: '★';
    display: block;
    font-size: 1rem;
    color: #eab308;
    margin-top: 8px;
    opacity: 0.8;
    animation: starPulse 2.5s ease-in-out infinite;
    text-align: right;
}
@keyframes starPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.3); }
}

/* ── تقوية الـ hero-author وإضافة stats strip ── */
.hero-author {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.hero-stats-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.hss-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 16px;
    box-shadow: 0 2px 10px rgba(2,132,199,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.hss-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2,132,199,0.14);
}
.hss-val {
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.hss-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}
.hss-sep {
    display: none;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #eab308 100%);
    background-size: 200% auto;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(2,132,199,0.35), 0 2px 8px rgba(0,0,0,0.1);
    animation: btnGlow 3s ease-in-out infinite, btnShine 4s linear infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}
.hero-cta-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 40px rgba(2,132,199,0.45), 0 4px 16px rgba(0,0,0,0.15);
}
@keyframes btnGlow {
    0%, 100% { box-shadow: 0 8px 28px rgba(2,132,199,0.35), 0 2px 8px rgba(0,0,0,0.1); }
    50%       { box-shadow: 0 12px 40px rgba(2,132,199,0.5), 0 4px 16px rgba(234,179,8,0.2); }
}
@keyframes btnShine {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ── تحسين الـ hero-title ── */
.hero-title {
    letter-spacing: -0.01em !important;
    line-height: 1.15 !important;
}
.hero-title-sub {
    letter-spacing: -0.01em;
}

/* ══ responsive tweaks ══ */
@media (max-width: 768px) {
    .hero-orbit-ring,
    .hero-orbit-ring-2 { width: 300px; height: 340px; }
    .hero-aura-ring { width: 280px; height: 320px; }
    .hero-stats-strip { gap: 14px; margin-top: 16px; }
    .hss-val { font-size: 1.1rem; }
    .hero-cta-btn { padding: 12px 22px; font-size: 0.9rem; }
    .hero-sparkle { display: none; }
}

/* Split Page (Login & Register) Layout */
.split-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px);
}

.form-container {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    animation: form-entrance 0.7s ease forwards;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.4s ease;
    margin: 40px 20px;
}

.form-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-yellow), var(--primary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 5;
}

.form-container:focus-within {
    border-color: transparent;
    box-shadow: 0 0 35px rgba(2, 132, 199, 0.18), 0 0 15px rgba(234, 179, 8, 0.1);
}

.form-container:focus-within::after {
    opacity: 1;
}

@keyframes form-entrance {
    0%   { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

.form-header {
    margin-bottom: 40px;
}

.form-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-title i {
    color: var(--primary-color);
}

.form-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.form-link-btn {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}

.form-link-btn:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Form inputs & details */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-icon {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Styled Underline Inputs */
.underline-input {
    border: none;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    padding: 10px 0;
    font-size: 1.05rem;
    color: var(--text-main);
    outline: none;
    transition: 0.3s;
}

.underline-input:focus {
    border-bottom-color: transparent;
}

/* Select Dropdown Underlines */
.underline-select {
    border: none;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    padding: 10px 0;
    font-size: 1.05rem;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: 0.3s;
}

.underline-select:focus {
    border-bottom-color: transparent;
}

.underline-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}

/* Animated focus line */
.focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-yellow), var(--primary-color));
    background-size: 200% auto;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
}

.underline-input:focus ~ .focus-line,
.underline-select:focus ~ .focus-line {
    width: 100%;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--accent-yellow);
    animation: flowGradient 2s linear infinite;
}

@keyframes flowGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.recovery-hint-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   Inline Field Validation (input-error + رسالة الخطأ)
   ══════════════════════════════════════════════ */
.underline-input.input-error,
.underline-select.input-error {
    border-bottom-color: #ef4444;
    color: #ef4444;
}

.underline-input.input-error::placeholder {
    color: rgba(239, 68, 68, 0.55);
}

.input-error ~ .focus-line {
    background: #ef4444;
}

.field-error-msg {
    display: none;
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 6px;
    line-height: 1.5;
    animation: field-error-in 0.25s ease both;
}

@keyframes field-error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   Form-level Alert (نجاح / خطأ) — أعلى الفورم
   ══════════════════════════════════════════════ */
.form-alert {
    display: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: center;
    animation: form-alert-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes form-alert-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .form-alert-success {
    color: #4ade80;
}

/* ══════════════════════════════════════════════
   Submit Button Loading State (سبينر + تعطيل)
   ══════════════════════════════════════════════ */
.btn-submit-yellow,
.btn-submit-blue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-yellow .btn-spinner,
.btn-submit-blue .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: currentColor;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.btn-submit-yellow:disabled,
.btn-submit-blue:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none !important;
}

.btn-submit-yellow.is-loading .btn-label,
.btn-submit-blue.is-loading .btn-label {
    opacity: 0.75;
}

.btn-submit-yellow.is-loading .btn-spinner,
.btn-submit-blue.is-loading .btn-spinner {
    display: inline-block;
}

.btn-submit-yellow.is-loading::before,
.btn-submit-blue.is-loading::before {
    animation: none;
    display: none;
}

/* Form Options & Toggle Switches */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    color: var(--primary-color);
}

/* Toggle Switch Widget */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .switch-slider {
    background-color: var(--primary-color);
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
}

.switch-slider.round {
    border-radius: 34px;
}

.switch-slider.round:before {
    border-radius: 50%;
}

/* Submit Buttons */
.btn-submit-yellow {
    background-color: var(--accent-yellow);
    color: #1a1500;
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(248, 194, 26, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn-submit-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.45),
        transparent
    );
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

.btn-submit-yellow:hover {
    background-color: var(--accent-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(248, 194, 26, 0.4);
}

.btn-submit-yellow:hover::before {
    animation: buttonShine 1.5s infinite ease-in-out;
}

.btn-submit-blue {
    background-color: var(--primary-color);
    color: var(--text-white);
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 159, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn-submit-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

.btn-submit-blue:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
}

.btn-submit-blue:hover::before {
    animation: buttonShine 1.5s infinite ease-in-out;
}

@keyframes buttonShine {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* Right Column Illustration Containers */
.illustration-container {
    position: relative;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Mobile Hero Image - hidden on desktop, shows on mobile above the form */
.mobile-hero-img {
    display: none;
    width: 100%;
    height: 50vh;
    min-height: 220px;
    max-height: 380px;
    overflow: hidden;
    position: relative;
}

.mobile-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.mobile-hero-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    pointer-events: none;
}

/* Soft pulsing glow behind the visual */
.illustration-container::before {
    content: "";
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    z-index: 0;
    animation: glow-pulse 3.5s ease-in-out infinite;
}

/* Dashed orbiting ring for a "live" tech feel */
.illustration-container::after {
    content: "";
    position: absolute;
    width: 88%;
    height: 88%;
    max-width: 480px;
    max-height: 480px;
    border-radius: 50%;
    border: 2px dashed var(--primary-color);
    opacity: 0.25;
    z-index: 0;
    animation: ring-spin 18s linear infinite;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 580px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    z-index: 1;
    opacity: 0;
    animation: visual-entrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.bg-blue-grad {
    background: linear-gradient(135deg, rgba(0, 159, 255, 0.1) 0%, rgba(0, 229, 255, 0.05) 100%);
}

.illustration-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: img-float 4.5s ease-in-out 1s infinite;
}

.rounded-img {
    border-radius: 20px;
    width: 90%;
    height: 90%;
    object-fit: cover;
}

/* Floating accent badges around the visual, echoing the logo icon style */
.visual-badge {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--primary-color);
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    opacity: 0;
    animation: badge-pop 0.6s ease forwards, badge-float 3.2s ease-in-out infinite;
}

.visual-badge.badge-1 { top: 6%;  right: 4%;  animation-delay: 0.4s, 1s; }
.visual-badge.badge-2 { top: 12%; left: 0%;   animation-delay: 0.65s, 1.3s; }
.visual-badge.badge-3 { bottom: 10%; left: 4%; animation-delay: 0.9s, 1.6s; }
.visual-badge.badge-4 { bottom: 4%; right: 8%; animation-delay: 1.15s, 1.9s; }

@keyframes visual-entrance {
    0%   { opacity: 0; transform: scale(0.85) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes img-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.7; }
    50%      { transform: scale(1.12); opacity: 1; }
}

@keyframes ring-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes badge-pop {
    0%   { opacity: 0; transform: scale(0.3); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Floating Telegram Button */
.floating-whatsapp {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    background-color: #229ED9;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.3);
    text-decoration: none;
    z-index: 999999;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* بيتفعّل بمجرد ما بانر "ابدأ رحلتك الآن" يبقى ظاهر على الشاشة،
   عشان الزرار الأخضر ميفضلش "سايب" فوق البانر بشكل متقاطع وغير مرتب */
.floating-whatsapp.wa-hide {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.floating-whatsapp:hover {
    background-color: #1c85b8;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.4);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 60px 24px;
        gap: 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-title-sub {
        font-size: 2.5rem;
    }

    .split-container {
        grid-template-columns: 1fr;
    }

    .illustration-container {
        display: none; /* Hide desktop illustrations on mobile/tablets */
    }

    /* Show mobile hero image on tablets and below */
    .mobile-hero-img {
        display: block;
    }

    .form-container {
        padding: 32px 20px 40px;
        margin: -32px 0 0 0; /* Pull card up to overlap the hero image */
        border-radius: 24px 24px 0 0; /* Rounded top corners only */
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
        position: relative;
        z-index: 2; /* Sit above the hero image */
    }

    /* Disable gradient border animation on mobile */
    .form-container::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 16px;
    }

    .logo-main {
        font-size: 1.15rem;
    }

    .logo-sub {
        font-size: 0.75rem;
    }

    .btn-signup span, .nav-login-link span {
        display: none; /* Icon-only auth actions on small screens */
    }

    .btn-signup {
        padding: 10px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .nav-login-link {
        padding: 10px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .blob-wrapper {
        width: 320px;
        height: 320px;
    }

    .blob-bg {
        width: 290px;
        height: 290px;
    }

    .blob-image-container {
        width: 270px;
        height: 270px;
    }

    .hero-main-img {
        width: 285px;
        height: auto;
    }

    .ring-1, .ring-2 {
        display: none; /* Simplify visuals on mobile */
    }

    .deco-dot {
        display: none; /* Keep the small mobile circle clean */
    }
}

/* Active Glow Feedback on Clicks */
.btn-signup:active,
.btn-submit-yellow:active,
.btn-submit-blue:active,
.search-btn:active,
.nav-login-link:active,
.logo:active,
.btn-course-action:active {
    transform: scale(0.95);
    filter: brightness(1.1);
    box-shadow: 0 0 20px var(--primary-color), 0 0 10px var(--accent-yellow);
    transition: all 0.1s ease;
}

/* ═══════════════════════════════════════════════════════
   ULTRA PREMIUM COURSES — Apple/Stripe/Coursera Level
   ═══════════════════════════════════════════════════════ */

.courses-section {
    max-width: 1340px;
    margin: 0 auto;
    padding: 100px 24px 140px;
    position: relative;
}

.courses-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 10% 20%, rgba(2,132,199,.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 35% at 90% 80%, rgba(234,179,8,.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Section Header ─── */
.courses-section .section-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 64px;
}

.courses-section .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(2,132,199,.12), rgba(234,179,8,.08));
    border: 1px solid rgba(2,132,199,.25);
    color: var(--primary-color);
    font-weight: 800;
    font-size: .85rem;
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 18px;
    animation: tagPulse 3s ease-in-out infinite;
}

@keyframes tagPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(2,132,199,.3); }
    50%      { box-shadow: 0 0 0 8px rgba(2,132,199,.0); }
}

.courses-section .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-color) 50%, var(--text-main) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s linear infinite;
    margin-bottom: 16px;
}

@keyframes gradientShift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.courses-section .section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ─── Live Ticker ─── */
.courses-ticker {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 32px;
    margin-bottom: -20px;
    position: relative;
    z-index: 1;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 8px 20px;
    font-size: .83rem;
    font-weight: 700;
    color: var(--text-muted);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    animation: floatTicker 4s ease-in-out infinite;
}
.ticker-item:nth-child(2) { animation-delay: .6s; }
.ticker-item:nth-child(3) { animation-delay: 1.2s; }
.ticker-item i { color: var(--primary-color); }
.ticker-item strong { color: var(--primary-color); font-size: 1rem; }

@keyframes floatTicker {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

/* ─── Grid ─── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 36px;
    margin-top: 64px;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════════
   PREMIUM COURSE CARD — 3D + Glow + Spring
   ══════════════════════════════════════════ */
.course-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(0,0,0,.06),
        0 1px 4px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    /* Will-change for GPU composite */
    will-change: transform, box-shadow;
    /* Base 3D transform context */
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0px);
    transition:
        transform .55s cubic-bezier(.23,1,.32,1),
        box-shadow .45s ease,
        border-color .3s ease;
    /* Entrance */
    animation: cardReveal .7s cubic-bezier(.34,1.56,.64,1) both;
}

.course-card:nth-child(1) { animation-delay: .1s; }
.course-card:nth-child(2) { animation-delay: .25s; }
.course-card:nth-child(3) { animation-delay: .4s; }
.course-card:nth-child(4) { animation-delay: .55s; }
.course-card:nth-child(5) { animation-delay: .7s; }
.course-card:nth-child(6) { animation-delay: .85s; }

@keyframes cardReveal {
    from { opacity: 0; transform: perspective(1000px) translateY(40px) scale(.95); }
    to   { opacity: 1; transform: perspective(1000px) translateY(0) scale(1); }
}

/* ── Top accent bar animée ── */
.course-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--primary-color),
        #38bdf8,
        #eab308,
        #7c3aed,
        var(--primary-color));
    background-size: 300% 100%;
    animation: cardBarShine 4s linear infinite;
    z-index: 5;
    opacity: 0;
    transition: opacity .35s ease;
    border-radius: 28px 28px 0 0;
}

@keyframes cardBarShine {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

/* ── Glow border overlay ── */
.course-card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    background: linear-gradient(135deg,
        rgba(2,132,199,.4),
        rgba(56,189,248,.2),
        rgba(234,179,8,.3),
        rgba(124,58,237,.2));
    background-size: 300% 300%;
    animation: glowBorder 5s ease infinite;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
}

@keyframes glowBorder {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ── Shine sweep overlay ── */
.course-card-shine {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255,255,255,.12) 50%,
        transparent 70%);
    background-size: 250% 100%;
    background-position: -100% 0;
    pointer-events: none;
    z-index: 4;
    animation: cardShineAuto 6s ease-in-out infinite;
}

@keyframes cardShineAuto {
    0%, 70%  { background-position: -100% 0; opacity: 0; }
    75%       { opacity: 1; }
    90%, 100% { background-position: 200% 0; opacity: 0; }
}

/* ── Sparkle elements ── */
.course-card-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    overflow: hidden;
    border-radius: 28px;
}
.sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: sparklePop ease-in-out infinite;
}
.sparkle:nth-child(1) { top: 15%; left: 20%; animation-duration: 3.2s; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; left: 75%; animation-duration: 4s;   animation-delay: 1s; background: #eab308; width:4px; height:4px; }
.sparkle:nth-child(3) { top: 65%; left: 15%; animation-duration: 3.6s; animation-delay: 2s; background: #38bdf8; }
.sparkle:nth-child(4) { top: 70%; left: 80%; animation-duration: 4.5s; animation-delay: .5s; }
.sparkle:nth-child(5) { top: 45%; left: 50%; animation-duration: 5s;   animation-delay: 1.8s; background: #eab308; width:3px; height:3px; }

@keyframes sparklePop {
    0%        { opacity:0; transform:scale(0) rotate(0deg); }
    20%       { opacity:.9; transform:scale(1.4) rotate(20deg); }
    50%       { opacity:.5; transform:scale(1) rotate(45deg); }
    80%       { opacity:.2; transform:scale(.6) rotate(70deg); }
    100%      { opacity:0; transform:scale(0) rotate(90deg); }
}

/* ── Hover state ── */
.course-card:hover {
    border-color: rgba(2,132,199,.5);
    box-shadow:
        0 28px 60px rgba(2,132,199,.22),
        0 12px 28px rgba(0,0,0,.12),
        0 0 0 1px rgba(2,132,199,.18),
        inset 0 0 80px rgba(2,132,199,.03);
}
.course-card:hover::before       { opacity: 1; }
.course-card:hover .course-card-glow { opacity: 1; }

/* ── Active / Press spring ── */
.course-card:active {
    transform: perspective(1000px) translateY(2px) scale(.985) !important;
    box-shadow:
        0 4px 16px rgba(2,132,199,.18),
        0 2px 6px rgba(0,0,0,.1);
    transition: transform .12s cubic-bezier(.34,1.56,.64,1), box-shadow .12s ease;
}

/* ─── Featured card — glowing border always-on ─── */
.course-card.featured {
    border-color: rgba(2,132,199,.35);
    box-shadow:
        0 6px 32px rgba(2,132,199,.14),
        0 0 0 1px rgba(2,132,199,.12);
    animation: cardReveal .7s cubic-bezier(.34,1.56,.64,1) both,
               featuredPulse 4s ease-in-out 1s infinite;
}

@keyframes featuredPulse {
    0%,100% { box-shadow: 0 6px 32px rgba(2,132,199,.14), 0 0 0 1px rgba(2,132,199,.12); }
    50%      { box-shadow: 0 10px 48px rgba(2,132,199,.28), 0 0 0 2px rgba(2,132,199,.25); }
}

/* ─── Image Container ─── */
.course-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0c4a6e);
    flex-shrink: 0;
}

/* bottom gradient */
.course-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(15,23,42,.65) 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity .4s ease;
}
.course-card:hover .course-image-container::after { opacity: .45; }

.course-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform .7s cubic-bezier(.4,0,.2,1), filter .5s ease;
    will-change: transform;
}
.course-card:hover .course-img {
    transform: scale(1.1) translateY(-6px);
    filter: brightness(1.06) saturate(1.1);
}

/* ─── Badges ─── */
.course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    font-weight: 900;
    font-size: .84rem;
    padding: 7px 16px;
    border-radius: 40px;
    letter-spacing: .3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: badgeFloat 3.5s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.course-badge.free {
    background: linear-gradient(135deg, rgba(234,179,8,.95), rgba(217,119,6,.95));
    color: #fff;
    box-shadow: 0 4px 16px rgba(234,179,8,.5), 0 0 0 1px rgba(255,255,255,.2) inset;
    animation-delay: 0s;
}
/* نبض مميز للشارة المجانية */
.course-badge.free::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    border: 2px solid rgba(234,179,8,.6);
    animation: badgeRing 2.5s ease-out infinite;
}
@keyframes badgeRing {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.7); }
}

.course-badge.paid {
    background: linear-gradient(135deg, rgba(2,132,199,.95), rgba(3,105,161,.95));
    color: #fff;
    box-shadow: 0 4px 16px rgba(2,132,199,.5), 0 0 0 1px rgba(255,255,255,.2) inset;
    animation-delay: 1.2s;
}
.course-badge.new-badge {
    background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(109,40,217,.95));
    color: #fff;
    box-shadow: 0 4px 16px rgba(124,58,237,.5), 0 0 0 1px rgba(255,255,255,.2) inset;
    animation-delay: 0.6s;
}
.course-badge.new-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    border: 2px solid rgba(124,58,237,.6);
    animation: badgeRing 2.5s ease-out infinite;
}
.course-badge.popular {
    background: linear-gradient(135deg, rgba(239,68,68,.95), rgba(220,38,38,.95));
    color: #fff;
    box-shadow: 0 4px 16px rgba(239,68,68,.45), 0 0 0 1px rgba(255,255,255,.2) inset;
    animation-delay: 0.3s;
}

.course-badge:hover {
    transform: translateY(-5px) scale(1.06) !important;
    animation-play-state: paused;
}

/* ─── Course Info ─── */
.course-info {
    padding: 28px 26px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
    transition: transform .35s ease;
}
.course-card:hover .course-info { transform: translateY(-2px); }

.course-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.45;
    margin-bottom: 12px;
    transition: color .25s ease;
}
.course-card:hover .course-title { color: var(--primary-color); }

.course-desc {
    font-size: .93rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Stats bar ─── */
.course-stats {
    display: flex;
    gap: 0;
    margin-bottom: 22px;
    font-size: .83rem;
    color: var(--text-muted);
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 14px 0;
    justify-content: space-around;
    background: rgba(2,132,199,.03);
    transition: background .3s ease, border-color .3s ease;
}
.course-card:hover .course-stats {
    background: rgba(2,132,199,.06);
    border-color: rgba(2,132,199,.18);
}

.course-stats span {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    position: relative;
}
.course-stats span:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 1px;
    background: var(--border-color);
}
.course-stats i {
    color: var(--primary-color);
    font-size: .95rem;
    width: 18px;
    text-align: center;
}

/* ══════════════════════════════════════════
   ULTRA CTA BUTTON — Animated Gradient
   ══════════════════════════════════════════ */
.btn-course-action {
    position: relative;
    background: linear-gradient(135deg,
        #0ea5e9 0%,
        #0284c7 25%,
        #7c3aed 55%,
        #eab308 80%,
        #0ea5e9 100%);
    background-size: 300% 100%;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    padding: 15px 20px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    animation: btnGradientFlow 5s ease infinite,
               btnGlowPulse 3s ease-in-out infinite;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1),
                box-shadow .3s ease;
    will-change: transform;
}

@keyframes btnGradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes btnGlowPulse {
    0%,100% { box-shadow: 0 6px 20px rgba(2,132,199,.4), 0 0 0 0 rgba(2,132,199,.25); }
    50%      { box-shadow: 0 10px 32px rgba(124,58,237,.4), 0 0 0 6px rgba(2,132,199,.0); }
}

/* ── Shine sweep ── */
.btn-course-action::before {
    content: '';
    position: absolute;
    top: 0; left: -110%;
    width: 70%;
    height: 100%;
    background: linear-gradient(110deg,
        transparent,
        rgba(255,255,255,.38),
        transparent);
    transform: skewX(-20deg);
    transition: left .65s ease;
}
.btn-course-action:hover::before { left: 160%; }

/* ── Arrow icon ── */
.btn-course-action .btn-icon {
    display: inline-flex;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.btn-course-action:hover .btn-icon {
    transform: translateX(-5px) scale(1.25);
}

/* ── Hover state ── */
.btn-course-action:hover {
    transform: translateY(-4px) scale(1.025);
    box-shadow:
        0 14px 40px rgba(124,58,237,.4),
        0 6px 16px rgba(2,132,199,.3),
        0 0 0 6px rgba(2,132,199,.1);
    animation-play-state: paused;
}

/* ── Active spring ── */
.btn-course-action:active {
    transform: translateY(1px) scale(.97);
    box-shadow: 0 3px 12px rgba(2,132,199,.35);
    transition: transform .1s ease;
}

/* ─── Loading / Empty States ─── */
.courses-loading,
.courses-empty {
    grid-column: 1 / -1;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1.5px dashed var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 48px;
}

.courses-loading i,
.courses-empty i {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.courses-empty strong {
    color: var(--text-main);
    font-size: 1.1rem;
}

/* Skeleton row fills the grid columns correctly */
.courses-skeleton-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* ─── Mobile Responsive ─── */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .courses-section {
        padding: 24px 16px 80px;
    }
    .courses-ticker {
        gap: 12px;
    }
    .course-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .nav-user-meta {
        display: none;
    }

    .nav-user-chip {
        padding: 6px;
    }

    /* الهيدر على الموبايل */
    .header-container {
        padding: 0 12px;
    }

    .header-theme-btn {
        padding: 0;
    }

    .logo-main { font-size: 1rem; }
    .logo-sub  { font-size: 0.7rem; }
    .logo-img  { height: 36px; width: 36px; }

    /* ══ Hero على الموبايل ══ */
    .hero-container {
        grid-template-columns: 1fr;
        padding: 24px 16px 50px;
        gap: 16px;
        min-height: unset;
        text-align: center;
    }

    .hero-content {
        order: 1;
        align-items: center;
    }

    .hero-title     { font-size: 2.2rem; }
    .hero-title-sub { font-size: 1.8rem; }
    .hero-author    { justify-content: center; font-size: 0.88rem; }

    .hero-visual {
        order: 2;
        width: 100%;
        overflow: visible;
        display: flex;
        justify-content: center;
    }

    /* الدائرة على الموبايل */
    .blob-wrapper {
        width: 360px;
        height: 480px;
    }

    .blob-image-container {
        width: 260px;
        height: 260px;
        border-width: 3px;
    }

    /* الصورة على الموبايل */
    .hero-main-img {
        width: 420px;
        height: auto;
        bottom: -40px;
        animation: teacher-float 12s ease-in-out infinite alternate-reverse;
    }

    /* حاوية الحلقة على الموبايل */
    .blob-ring-wrapper {
        width: 340px;
        height: 340px;
    }

    /* حلقة الألوان الدوارة على الموبايل — تملأ الحاوية */
    .blob-color-ring {
        -webkit-mask: radial-gradient(circle, transparent 47%, black 47.5%, black 50%, transparent 50.5%);
        mask:         radial-gradient(circle, transparent 47%, black 47.5%, black 50%, transparent 50.5%);
    }

    /* إخفاء بعض التأثيرات الكثيفة على الموبايل لتحسين الأداء */
    .hero-light-trails { opacity: 0.5; }
    .hero-geo { display: none; }
    .teacher-glow-head {
        width: 180px; height: 140px;
    }
    .teacher-glow-left,
    .teacher-glow-right { width: 120px; height: 180px; }

    /* الأيقونات العائمة - أصغر على الموبايل */
    .floating-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .floating-icon.icon-star {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    /* البطاقات الأربعة على الموبايل */
    .hero-feature-card {
        padding: 6px 9px;
        gap: 6px;
        border-radius: 10px;
    }

    .hero-feature-card .fc-icon {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
        border-radius: 7px;
    }

    .hero-feature-card .fc-text strong { font-size: 0.65rem; }
    .hero-feature-card .fc-text span   { font-size: 0.55rem; }

    .fc-nahw  { top: -8%;  right: -8%; }
    .fc-balag { top: 28%;  left: -10%; }
    .fc-adab  { bottom: 6%; right: -8%; }
    .fc-imla  { bottom: -6%; left: -6%; }

    /* صورة الدكتور ثابتة تماماً على الموبايل: أي حركة/تمايل مستمر (bob)
       بتتعارض مع سكرول الصفحة وبتدي إحساس إن صورة الدكتور "بتتقطع" أو
       بتتحرك لوحدها عن باقي القسم اللي تحته أثناء السحب لأعلى/لأسفل */
    .hero-main-img {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   INTRO SPLASH SCREEN — "بوابة المعرفة" — Premium Loading
   ═══════════════════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes is-fadeUp   { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes is-fadeDown { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
@keyframes is-scaleIn  { from{opacity:0;transform:scale(.65) translateY(10px);filter:blur(8px)} to{opacity:1;transform:scale(1) translateY(0);filter:blur(0)} }
@keyframes is-ringIn   { from{opacity:0;transform:scale(.5)} to{opacity:1;transform:scale(1)} }

/* Pulse rings expanding outward */
@keyframes is-pulseRing {
    0%   { transform:scale(.6);  opacity:.7; }
    100% { transform:scale(2.6); opacity:0;  }
}

/* Orbs drift left ↔ right with shimmer */
@keyframes is-orbFloat {
    0%   { transform:translate(0,0)       scale(1);    opacity:0; }
    10%  { opacity:1; }
    30%  { transform:translate(var(--ox),var(--oy))    scale(1.15); opacity:.85; }
    50%  { transform:translate(calc(var(--ox)*-0.6),calc(var(--oy)*0.4)) scale(.9); opacity:.7; }
    70%  { transform:translate(var(--ox),calc(var(--oy)*-.5)) scale(1.1); opacity:.8; }
    90%  { opacity:.5; }
    100% { transform:translate(0,0)       scale(1);    opacity:0; }
}

/* Shimmer text sweep */
@keyframes is-textShimmer {
    0%,100% { background-position: 200% center; }
    50%      { background-position: -200% center; }
}

/* Progress bar fill */
@keyframes is-barFill {
    0%   { width:0%; }
    55%  { width:72%; }
    80%  { width:90%; }
    100% { width:100%; }
}

/* Shimmer sweep on bar */
@keyframes is-barShimmer {
    from { background-position:-100% 0; }
    to   { background-position:250% 0; }
}

/* Floating particles */
@keyframes is-particle {
    0%   { transform:translateY(0) translateX(0) scale(1); opacity:0; }
    8%   { opacity:1; }
    92%  { opacity:.5; }
    100% { transform:translateY(-300px) translateX(var(--isd)) scale(.2); opacity:0; }
}

/* Beam float */
@keyframes is-beamPulse {
    0%,100% { opacity:.18; transform:scaleY(1)   rotate(var(--br)); }
    50%     { opacity:.5;  transform:scaleY(1.08) rotate(var(--br)); }
}

/* ── Container ── */
#intro-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #010c1a 0%, #031828 40%, #05213a 70%, #010c1a 100%);
    overflow: hidden;
    transition: opacity .9s ease, visibility .9s ease;
    direction: rtl;
}

#intro-splash.intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.intro-active { overflow: hidden; }

/* ── Stars canvas ── */
.is-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ── Horizon glow ── */
.is-horizon {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 260px;
    background: linear-gradient(to top, rgba(2,132,199,.22) 0%, rgba(14,165,233,.07) 45%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* ── Light beams ── */
.is-beam {
    position: absolute;
    width: 2px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
    animation: is-beamPulse ease-in-out infinite;
}
.is-beam-1 { left:14%; top:6%;  height:200px; --br:-28deg; animation-duration:5.2s; background:linear-gradient(to bottom,transparent,rgba(56,189,248,.18),transparent); }
.is-beam-2 { left:80%; top:4%;  height:250px; --br:22deg;  animation-duration:7s;   animation-delay:1.1s; background:linear-gradient(to bottom,transparent,rgba(56,189,248,.12),transparent); }
.is-beam-3 { left:50%; top:10%; height:170px; --br:4deg;   animation-duration:8.5s; animation-delay:2.4s; background:linear-gradient(to bottom,transparent,rgba(234,179,8,.13),transparent); }

/* ── Floating orbs (drift yimeen we shimal) ── */
.is-orb {
    position: absolute;
    pointer-events: none;
    animation: is-orbFloat ease-in-out infinite;
    z-index: 2;
    line-height: 1;
    direction: ltr;
    filter: drop-shadow(0 0 5px currentColor);
}
/* Each orb gets unique position, color, size & drift direction */
.is-orb-1  { color:#38bdf8; left:6%;   top:28%; font-size:20px; --ox:22px;  --oy:-15px; animation-duration:5.5s; animation-delay:.3s; }
.is-orb-2  { color:#eab308; right:8%;  top:22%; font-size:15px; --ox:-18px; --oy:12px;  animation-duration:6.2s; animation-delay:.8s; }
.is-orb-3  { color:#7dd3fc; left:12%;  top:58%; font-size:13px; --ox:28px;  --oy:-20px; animation-duration:7.1s; animation-delay:1.4s; }
.is-orb-4  { color:#fcd34d; right:15%; top:62%; font-size:18px; --ox:-25px; --oy:8px;   animation-duration:5.8s; animation-delay:.6s; }
.is-orb-5  { color:#38bdf8; left:3%;   top:42%; font-size:11px; --ox:16px;  --oy:18px;  animation-duration:8.3s; animation-delay:2.1s; }
.is-orb-6  { color:#eab308; right:4%;  top:40%; font-size:13px; --ox:-20px; --oy:-14px; animation-duration:6.7s; animation-delay:1s;   }
.is-orb-7  { color:#7dd3fc; left:20%;  top:16%; font-size:11px; --ox:14px;  --oy:22px;  animation-duration:9s;   animation-delay:3.2s; }
.is-orb-8  { color:#fcd34d; right:22%; top:74%; font-size:10px; --ox:-12px; --oy:-18px; animation-duration:4.8s; animation-delay:.2s;  }
.is-orb-9  { color:#38bdf8; left:30%;  top:82%; font-size:14px; --ox:20px;  --oy:-10px; animation-duration:7.5s; animation-delay:1.7s; }
.is-orb-10 { color:#eab308; right:30%; top:12%; font-size:12px; --ox:-16px; --oy:16px;  animation-duration:5.9s; animation-delay:2.6s; }

/* ── أحرف عربية عائمة في شاشة التحميل ── */
.floating-letter {
    position: absolute;
    font-family: 'Tajawal', sans-serif;
    font-weight: 900;
    pointer-events: none;
    z-index: 2;
    animation: is-orbFloat ease-in-out infinite;
    opacity: 0.55;
    text-shadow: 0 2px 12px currentColor;
}
/* ض */
.letter-1 { color: #38bdf8; left: 5%;   top: 20%; font-size: 2.4rem; --ox: 18px;  --oy: -14px; animation-duration: 6.1s; animation-delay: 0.2s; }
/* أ */
.letter-2 { color: #eab308; right: 6%;  top: 18%; font-size: 2.8rem; --ox: -22px; --oy: 16px;  animation-duration: 7.4s; animation-delay: 0.9s; }
/* ع */
.letter-3 { color: #7dd3fc; left: 8%;   top: 52%; font-size: 2rem;   --ox: 24px;  --oy: -20px; animation-duration: 8.2s; animation-delay: 1.5s; }
/* ق */
.letter-4 { color: #fcd34d; right: 9%;  top: 55%; font-size: 1.9rem; --ox: -18px; --oy: 12px;  animation-duration: 5.6s; animation-delay: 0.5s; }
/* ن */
.letter-5 { color: #38bdf8; left: 3%;   top: 72%; font-size: 2.2rem; --ox: 14px;  --oy: -18px; animation-duration: 9s;   animation-delay: 2.2s; }
/* د */
.letter-6 { color: #eab308; right: 4%;  top: 35%; font-size: 2.6rem; --ox: -20px; --oy: -10px; animation-duration: 6.8s; animation-delay: 1.1s; }
/* ب */
.letter-7 { color: #0ea5e9; left: 15%;  top: 10%; font-size: 1.8rem; --ox: 20px;  --oy: 18px;  animation-duration: 5.3s; animation-delay: 0.7s; }
/* م */
.letter-8 { color: #fcd34d; right: 18%; top: 78%; font-size: 2rem;   --ox: -14px; --oy: -22px; animation-duration: 7.9s; animation-delay: 1.8s; }


/* ── Pulse rings behind logo ── */
.is-pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(56,189,248,.35);
    animation: is-pulseRing ease-out infinite;
    pointer-events: none;
    z-index: 3;
}
.is-pulse-ring-1 { width:120px; height:120px; animation-duration:2.8s; animation-delay:0s; }
.is-pulse-ring-2 { width:120px; height:120px; animation-duration:2.8s; animation-delay:.9s; border-color:rgba(234,179,8,.25); }
.is-pulse-ring-3 { width:120px; height:120px; animation-duration:2.8s; animation-delay:1.8s; }

/* ── Particles ── */
.is-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: is-particle linear infinite;
    z-index: 2;
}

/* ── Center wrapper ── */
.is-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    direction: rtl;
    gap: 0;
}

/* ── Logo wrap ── */
.is-logo-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse rings — positioned absolute inside .is-logo-wrap via JS */
.is-logo-wrap .is-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.6);
    border-radius: 50%;
    border: 1px solid rgba(56,189,248,.38);
    animation: is-pulseRing ease-out infinite;
    pointer-events: none;
    z-index: 1;
    width: 130px;
    height: 130px;
}
.is-logo-wrap .is-pulse-ring:nth-child(2) { animation-delay:.95s; border-color:rgba(234,179,8,.28); }
.is-logo-wrap .is-pulse-ring:nth-child(3) { animation-delay:1.9s; }

.is-logo-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2,132,199,.28) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.is-logo-img {
    width: 110px;
    height: 110px;
    border-radius: 26px;
    object-fit: cover;
    opacity: 0;
    animation: is-scaleIn .9s cubic-bezier(.22,1,.36,1) .4s forwards;
    position: relative;
    z-index: 4;
    border: 1.5px solid rgba(56,189,248,.3);
    display: block;
    background: rgba(2,132,199,.08);
}

/* Gradient border ring */
.is-logo-ring {
    position: absolute;
    inset: -12px;
    border-radius: 34px;
    border: 1.5px solid transparent;
    background: linear-gradient(135deg, rgba(56,189,248,.6), rgba(234,179,8,.5), rgba(56,189,248,.25)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    animation: is-ringIn .8s ease .9s forwards;
    z-index: 3;
}

/* Second outer ring — gold tint */
.is-logo-ring-2 {
    inset: -22px;
    border-radius: 42px;
    border-color: rgba(234,179,8,.3);
    background: linear-gradient(135deg, rgba(234,179,8,.35), rgba(56,189,248,.2), rgba(234,179,8,.15)) border-box;
    animation-delay: 1.1s;
}

/* ── Title — كسطر واحد ملصوق ── */
.is-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: -2px;
    word-spacing: -4px;
    white-space: nowrap;
    direction: rtl;
    margin-bottom: 8px;
    opacity: 0;
    animation: is-fadeUp .7s ease .95s forwards;
    /* Shimmer gold sweep on text */
    background: linear-gradient(90deg, #fff 30%, #eab308 50%, #38bdf8 60%, #fff 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: is-fadeUp .7s ease .95s forwards, is-textShimmer 3.5s ease-in-out 1.5s infinite;
}

/* ── Subtitle ── */
.is-subtitle {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #38bdf8;
    letter-spacing: .5px;
    opacity: 0;
    animation: is-fadeUp .7s ease 1.3s forwards;
    margin-bottom: 38px;
}

/* ── Progress bar ── */
.is-bar-wrap {
    width: 290px;
    opacity: 0;
    animation: is-fadeUp .6s ease 1.6s forwards;
}

.is-bar-track {
    position: relative;
    height: 3px;
    background: rgba(255,255,255,.08);
    border-radius: 3px;
    overflow: visible;
}

.is-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, #0284c7, #38bdf8 60%, #eab308);
    animation: is-barFill 4.8s cubic-bezier(.4,0,.2,1) .6s forwards;
    position: relative;
}

/* Golden nib tip */
.is-bar-fill::after {
    content: '';
    position: absolute;
    right: -1px; top: 50%;
    transform: translateY(-50%);
    width: 11px; height: 11px;
    border-radius: 50%;
    background: #eab308;
    box-shadow: 0 0 14px 5px rgba(234,179,8,.75), 0 0 4px 1px #fff;
}

.is-bar-shimmer {
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.38) 50%, transparent 100%);
    background-size: 60% 100%;
    animation: is-barShimmer 1.5s ease-in-out 2s infinite;
}

.is-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.is-bar-text {
    font-size: 11px;
    color: rgba(148,163,184,.65);
    font-family: 'Outfit', sans-serif;
    letter-spacing: .4px;
}

.is-bar-pct {
    font-size: 11px;
    font-weight: 700;
    color: #eab308;
    font-family: 'Outfit', sans-serif;
    opacity: 0;
    animation: is-fadeUp .4s ease 1.85s forwards;
}

/* ── Responsive mobile ── */
@media (max-width: 480px) {
    .is-logo-img, .is-logo-fallback { width:86px; height:86px; border-radius:20px; }
    .is-logo-ring  { inset:-9px;  border-radius:27px; }
    .is-logo-ring-2{ inset:-17px; border-radius:33px; }
    .is-title      { font-size:2.6rem; }
    .is-subtitle   { font-size:.95rem; }
    .is-bar-wrap   { width:250px; }
    .is-orb-1,.is-orb-3,.is-orb-5,.is-orb-7,.is-orb-9  { left:2%; }
    .is-orb-2,.is-orb-4,.is-orb-6,.is-orb-8,.is-orb-10 { right:2%; }
}


/* ══════════════════════════════════════════════
   Section Header Shared Styles
══════════════════════════════════════════════ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(2,132,199,0.2);
    margin-bottom: 14px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════
   Who Section - من هو الدكتور
══════════════════════════════════════════════ */
.who-section {
    position: relative;
    overflow: hidden;
    padding: 100px 24px;
    max-width: 1300px;
    margin: 0 auto;
}

.who-bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.who-bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.who-bg-c1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.who-bg-c2 {
    width: 400px;
    height: 400px;
    background: var(--accent-yellow);
    bottom: -80px;
    right: -80px;
}

.who-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 80px;
    align-items: center;
}

/* Image Side */
.who-image-side {
    display: flex;
    justify-content: center;
    align-items: center;
}

.who-img-frame {
    position: relative;
    width: 380px;
    height: 440px;
}

.who-img-ring {
    position: absolute;
    inset: -15px;
    border-radius: 50% 40% 50% 40% / 40% 50% 40% 50%;
    border: 2.5px solid transparent;
    animation: whoRingSpin 10s linear infinite;
}

.who-img-ring.who-ring-1 {
    border-top-color: var(--primary-color);
    border-left-color: var(--primary-color);
    opacity: 0.5;
}

.who-img-ring.who-ring-2 {
    inset: -28px;
    border-bottom-color: var(--accent-yellow);
    border-right-color: var(--accent-yellow);
    opacity: 0.4;
    animation-direction: reverse;
    animation-duration: 14s;
}

@keyframes whoRingSpin {
    to { transform: rotate(360deg); }
}

.who-img-diamond {
    width: 100%;
    height: 100%;
    border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
    overflow: hidden;
    background: radial-gradient(circle at 40% 30%, rgba(2,132,199,0.12), rgba(234,179,8,0.06));
    border: 3px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(2,132,199,0.2), 0 0 0 1px rgba(2,132,199,0.1);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.who-img {
    width: 100%;
    height: 110%;
    object-fit: cover;
    object-position: top center;
}

.who-exp-badge {
    position: absolute;
    bottom: -14px;
    right: -14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(2,132,199,0.4);
    border: 3px solid var(--card-bg);
}

.who-exp-num {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.who-exp-txt {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.9;
}

.who-rate-badge {
    position: absolute;
    top: 10px;
    left: -18px;
    background: var(--card-bg);
    border: 2px solid var(--accent-yellow);
    color: var(--accent-yellow);
    border-radius: 30px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(234,179,8,0.2);
}

/* Content Side */
.who-content-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.who-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(234,179,8,0.05));
    border: 1.5px solid rgba(234,179,8,0.3);
    color: #ca8a04;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 7px 18px;
    border-radius: 30px;
    width: fit-content;
}

[data-theme="dark"] .who-tag {
    color: var(--accent-yellow);
}

.who-title {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.3;
}

.who-name-gold {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.who-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.9;
    border-right: 3px solid var(--primary-color);
    padding-right: 16px;
}

.who-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.who-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.who-feat i {
    color: #16a34a;
    font-size: 1rem;
    flex-shrink: 0;
}

.who-stats-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.who-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.who-stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.who-stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.who-stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-color);
}

.who-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #229ED9, #1c7fb0);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 40px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 8px 24px rgba(34,158,217,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.who-cta-btn:hover {
    background: linear-gradient(135deg, #1c85b8, #166a92);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(34,158,217,0.45);
}

/* ══════════════════════════════════════════════
   Who Section - Doctor Info Cards
══════════════════════════════════════════════ */
.who-cards-grid {
    position: relative;
    z-index: 1;
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.who-info-card {
    position: relative;
    background: linear-gradient(160deg, rgba(238,248,255,0.75), rgba(255,255,255,0.45));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(34,158,217,0.18);
    border-radius: 26px;
    padding: 30px 26px;
    box-shadow: 0 10px 34px rgba(15,23,42,0.08);
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), box-shadow 0.35s ease, border-color 0.35s ease;
    opacity: 0;
    transform: translateY(24px);
    animation: whoCardFadeUp 0.7s ease forwards;
}

[data-theme="dark"] .who-info-card {
    background: linear-gradient(160deg, rgba(15,23,42,0.75), rgba(15,23,42,0.45));
    border: 1px solid rgba(56,189,248,0.16);
    box-shadow: 0 10px 34px rgba(0,0,0,0.35);
}

.who-info-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 46px rgba(34,158,217,0.22);
    border-color: rgba(34,158,217,0.45);
}

.who-cards-grid .who-info-card:nth-child(1) { animation-delay: 0.1s; }
.who-cards-grid .who-info-card:nth-child(2) { animation-delay: 0.2s; }
.who-cards-grid .who-info-card:nth-child(3) { animation-delay: 0.3s; }
.who-cards-grid .who-info-card:nth-child(4) { animation-delay: 0.4s; }
.who-cards-grid .who-info-card:nth-child(5) { animation-delay: 0.5s; }
.who-cards-grid .who-info-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes whoCardFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.who-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, #229ED9, #0EA5E9);
    box-shadow: 0 8px 20px rgba(34,158,217,0.35);
    margin-bottom: 16px;
}

.who-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.who-card-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.8;
}

.who-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.who-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.badge-c1 { background: #229ED9; }
.badge-c2 { background: #0EA5E9; }
.badge-c3 { background: #F4B400; color: #0F172A; }
.badge-c4 { background: #0F172A; }
.badge-c5 { background: #1c85b8; }
.badge-c6 { background: #38bdf8; color: #0F172A; }
.badge-c7 { background: #ca8a04; }

.who-card-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.who-card-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.who-card-list li i {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    background: #16a34a;
}

@media (max-width: 992px) {
    .who-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .who-cards-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   Why Us Section
══════════════════════════════════════════════ */
.why-section {
    padding: 80px 24px 100px;
    max-width: 1300px;
    margin: 0 auto;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* كل بطاقة بلون مختلف متناسق مع المنصة */
.why-card:nth-child(1) { background: linear-gradient(145deg, #eff8ff 0%, #dbeafe 100%); border-color: rgba(37,99,235,0.25); }
.why-card:nth-child(2) { background: linear-gradient(145deg, #fefce8 0%, #fef9c3 100%); border-color: rgba(234,179,8,0.35); }
.why-card:nth-child(3) { background: linear-gradient(145deg, #f0fdfa 0%, #ccfbf1 100%); border-color: rgba(20,184,166,0.3); }
.why-card:nth-child(4) { background: linear-gradient(145deg, #fff7ed 0%, #fed7aa 100%); border-color: rgba(234,88,12,0.25); }
.why-card:nth-child(5) { background: linear-gradient(145deg, #fdf4ff 0%, #f3e8ff 100%); border-color: rgba(168,85,247,0.3); }
.why-card:nth-child(6) { background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%); border-color: rgba(22,163,74,0.3); }

[data-theme="dark"] .why-card:nth-child(1) { background: linear-gradient(145deg, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0.05) 100%); border-color: rgba(37,99,235,0.3); }
[data-theme="dark"] .why-card:nth-child(2) { background: linear-gradient(145deg, rgba(234,179,8,0.12) 0%, rgba(234,179,8,0.05) 100%); border-color: rgba(234,179,8,0.3); }
[data-theme="dark"] .why-card:nth-child(3) { background: linear-gradient(145deg, rgba(20,184,166,0.12) 0%, rgba(20,184,166,0.05) 100%); border-color: rgba(20,184,166,0.3); }
[data-theme="dark"] .why-card:nth-child(4) { background: linear-gradient(145deg, rgba(234,88,12,0.12) 0%, rgba(234,88,12,0.05) 100%); border-color: rgba(234,88,12,0.3); }
[data-theme="dark"] .why-card:nth-child(5) { background: linear-gradient(145deg, rgba(168,85,247,0.12) 0%, rgba(168,85,247,0.05) 100%); border-color: rgba(168,85,247,0.3); }
[data-theme="dark"] .why-card:nth-child(6) { background: linear-gradient(145deg, rgba(22,163,74,0.12) 0%, rgba(22,163,74,0.05) 100%); border-color: rgba(22,163,74,0.3); }

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-yellow));
    border-radius: 0 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.why-card:hover::before {
    opacity: 1;
}

.why-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-light), rgba(2,132,199,0.05));
    border: 2px solid rgba(2,132,199,0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 auto 18px;
    transition: background 0.3s;
}

.why-card:hover .why-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    border-color: transparent;
}

.why-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.why-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ══════════════════════════════════════════════
   Grades Section
══════════════════════════════════════════════ */
.grades-section {
    padding: 80px 24px 100px;
    max-width: 1300px;
    margin: 0 auto;
    background: radial-gradient(ellipse at center, rgba(2,132,199,0.04) 0%, transparent 70%);
    border-radius: 32px;
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grades-grid-secondary {
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.grade-card {
    border-radius: 20px;
    padding: 22px 18px;
    text-align: center;
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
    isolation: isolate;
}

.grade-card-glow {
    position: absolute;
    inset: -40% -40% auto -40%;
    height: 160%;
    background: radial-gradient(circle, currentColor 0%, transparent 65%);
    opacity: 0;
    transition: opacity .4s ease;
    z-index: -1;
    pointer-events: none;
}

.grade-card:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 28px 50px rgba(0,0,0,0.14);
}

.grade-card:hover .grade-card-glow {
    opacity: 0.08;
}

.grade-card.grade-sec1 {
    background: linear-gradient(155deg, #fffdf5 0%, #fef9c3 100%);
    border-color: rgba(234,179,8,0.35);
    color: #ca8a04;
}

[data-theme="dark"] .grade-card.grade-sec1 {
    background: linear-gradient(155deg, rgba(234,179,8,0.14) 0%, rgba(234,179,8,0.05) 100%);
    border-color: rgba(234,179,8,0.3);
}

.grade-card.grade-sec2 {
    background: linear-gradient(155deg, #f4fdf6 0%, #dcfce7 100%);
    border-color: rgba(22,163,74,0.3);
    color: #16a34a;
}

[data-theme="dark"] .grade-card.grade-sec2 {
    background: linear-gradient(155deg, rgba(22,163,74,0.14) 0%, rgba(22,163,74,0.05) 100%);
    border-color: rgba(22,163,74,0.3);
}

.grade-card.grade-sec3 {
    background: linear-gradient(155deg, #fdf9ff 0%, #f5e3ff 100%);
    border-color: rgba(168,85,247,0.35);
    color: #9333ea;
    box-shadow: 0 16px 36px rgba(168,85,247,0.12);
}

.grade-card.grade-sec3::after {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, #9333ea, #c084fc, #eab308);
}

[data-theme="dark"] .grade-card.grade-sec3 {
    background: linear-gradient(155deg, rgba(168,85,247,0.16) 0%, rgba(168,85,247,0.05) 100%);
    border-color: rgba(168,85,247,0.35);
}

.grade-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.grade-sec1 .grade-icon { background: linear-gradient(135deg, rgba(234,179,8,0.18), rgba(234,179,8,0.08)); color: #ca8a04; }
.grade-sec2 .grade-icon { background: linear-gradient(135deg, rgba(22,163,74,0.18), rgba(22,163,74,0.08)); color: #16a34a; }
.grade-sec3 .grade-icon { background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(168,85,247,0.08)); color: #9333ea; }

.grade-level {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: .2px;
    background: rgba(255,255,255,0.85);
    border-radius: 20px;
    padding: 5px 16px;
    margin-bottom: 10px;
    color: #1e293b;
    text-shadow: 0 1px 1px rgba(255,255,255,0.6);
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

[data-theme="dark"] .grade-level {
    background: rgba(15,23,42,0.55);
    color: #f1f5f9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

@media (max-width: 480px) {
    .grade-level {
        font-size: 0.92rem;
        padding: 6px 16px;
    }
}

.grade-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 7px;
}

.grade-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 36px;
}

.grade-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--card-bg);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    border: 1.5px solid var(--primary-color);
    transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.grade-card.grade-sec1 .grade-btn { border-color: #ca8a04; color: #ca8a04; }
.grade-card.grade-sec2 .grade-btn { border-color: #16a34a; color: #16a34a; }
.grade-card.grade-sec3 .grade-btn { border-color: #9333ea; color: #9333ea; }

.grade-card.grade-sec1 .grade-btn:hover { background: #ca8a04; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(202,138,4,.3); }
.grade-card.grade-sec2 .grade-btn:hover { background: #16a34a; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(22,163,74,.3); }
.grade-card.grade-sec3 .grade-btn:hover { background: #9333ea; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(147,51,234,.3); }

.grade-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ══════════════════════════════════════════════
   CTA Section
══════════════════════════════════════════════ */
.cta-section {
    max-width: 1300px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.cta-inner {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #075985 100%);
    border-radius: 28px;
    padding: 70px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(2,132,199,0.35);
}

.cta-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
}

.cta-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.cta-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-yellow);
    color: #1a1500;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(234,179,8,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(234,179,8,0.5);
}

.cta-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,0.3);
    transition: background 0.2s;
    backdrop-filter: blur(8px);
}

.cta-btn-whatsapp:hover {
    background: rgba(255,255,255,0.25);
}

/* ══════════════════════════════════════════════
   Responsive for new sections
══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .grades-grid { grid-template-columns: repeat(2, 1fr); }
    .grades-grid-secondary { grid-template-columns: 1fr; max-width: 460px; }
    .who-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .who-img-frame { width: 280px; height: 340px; margin: 0 auto; }
    .who-stats-row { flex-direction: column; gap: 16px; }
    .who-stat-divider { width: 60px; height: 1px; }
    .who-cta-btn { margin: 0 auto; }
    .who-tag { margin: 0 auto; }
    .cta-inner { padding: 48px 24px; }
    .cta-title { font-size: 1.7rem; }
}

@media (max-width: 576px) {
    .why-grid { grid-template-columns: 1fr; }
    .grades-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.7rem; }
}

/* ═══════════════════════════════════════════════════════════
   PROMO SECTIONS — Discover Courses & Join Family Banners
   ═══════════════════════════════════════════════════════════ */

.promos-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ── Base promo card shell ── */
.promo-card {
    border-radius: 28px;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.5s ease;
    isolation: isolate;
}

/* ── Animated border glow ring ── */
.promo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.0) 0%,
        rgba(255,255,255,0.25) 40%,
        rgba(255,255,255,0.0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.promo-card:hover::before { opacity: 1; }

/* ── Noise/grain texture overlay ── */
.promo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    border-radius: 28px;
}

/* ── Promo 1: Courses — Deep ocean blue glass ── */
.promo-courses {
    background:
        linear-gradient(
            145deg,
            rgba(2, 52, 94, 0.97) 0%,
            rgba(3, 105, 161, 0.95) 45%,
            rgba(14, 165, 233, 0.92) 100%
        );
    box-shadow:
        0 24px 64px rgba(2, 132, 199, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(0,0,0,0.1);
}

.promo-courses:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow:
        0 40px 80px rgba(2, 132, 199, 0.38),
        0 8px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

/* ── Promo 2: Join — Warm royal violet → gold glass ── */
.promo-join {
    background:
        linear-gradient(
            145deg,
            rgba(30, 27, 75, 0.97) 0%,
            rgba(67, 20, 120, 0.95) 40%,
            rgba(120, 53, 15, 0.88) 80%,
            rgba(180, 83, 9, 0.85) 100%
        );
    box-shadow:
        0 24px 64px rgba(120, 53, 15, 0.22),
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(0,0,0,0.12);
}

.promo-join:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow:
        0 40px 80px rgba(234, 179, 8, 0.28),
        0 8px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Animated background mesh light ── */
.promo-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    border-radius: 28px;
}

.promo-courses .promo-mesh::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,0.2) 0%, transparent 65%);
    top: -150px;
    left: -100px;
    animation: mesh-drift-1 10s ease-in-out infinite alternate;
}

.promo-courses .promo-mesh::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234,179,8,0.12) 0%, transparent 65%);
    bottom: -80px;
    right: 20%;
    animation: mesh-drift-2 13s ease-in-out infinite alternate;
}

.promo-join .promo-mesh::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168,85,247,0.2) 0%, transparent 65%);
    top: -120px;
    left: -80px;
    animation: mesh-drift-1 11s ease-in-out infinite alternate;
}

.promo-join .promo-mesh::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234,179,8,0.18) 0%, transparent 65%);
    bottom: -60px;
    right: 15%;
    animation: mesh-drift-2 9s ease-in-out infinite alternate;
}

@keyframes mesh-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes mesh-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, -20px) scale(1.08); }
}

/* ── Body layout ── */
.promo-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 52px 56px;
    position: relative;
    z-index: 2;
}

/* ── Content side ── */
.promo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    z-index: 2;
    animation: promo-content-slide 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes promo-content-slide {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Media side ── */
.promo-media {
    flex: 0 0 42%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* ── Badge ── */
.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.92);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 22px;
    letter-spacing: 0.02em;
    transition: background 0.3s, border-color 0.3s;
}

.promo-card:hover .promo-badge {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
}

/* ── Title ── */
.promo-title {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 18px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.3);
    transition: letter-spacing 0.4s ease;
}

.promo-card:hover .promo-title {
    letter-spacing: 0.01em;
}

/* ── Text ── */
.promo-text {
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.85;
    margin-bottom: 34px;
    max-width: 560px;
}

/* ── Buttons ── */
.btn-promo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.35s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.btn-promo:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.55);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25), 0 0 20px rgba(255,255,255,0.1);
}

.btn-promo.btn-yellow {
    background: linear-gradient(135deg, rgba(234,179,8,0.9) 0%, rgba(180,83,9,0.85) 100%);
    border-color: rgba(252,211,77,0.4);
    color: #fff;
    box-shadow: 0 4px 20px rgba(234,179,8,0.3);
}

.btn-promo.btn-yellow:hover {
    background: linear-gradient(135deg, rgba(250,204,21,0.95) 0%, rgba(202,138,4,0.9) 100%);
    box-shadow: 0 12px 36px rgba(234,179,8,0.45);
    border-color: rgba(252,211,77,0.7);
}

/* ── Courses button drift animation ── */
@keyframes promo-move-x {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-8px); }
}

.btn-courses-animate {
    animation: promo-move-x 2.5s ease-in-out infinite;
}
.btn-courses-animate:hover {
    animation-play-state: paused;
    transform: translateY(-3px) scale(1.03);
}

/* ── Promo image — enhanced float + parallax feel ── */
.promo-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

.promo-courses .promo-glow {
    background: radial-gradient(circle, rgba(56,189,248,0.35) 0%, transparent 70%);
}
.promo-join .promo-glow {
    background: radial-gradient(circle, rgba(234,179,8,0.3) 0%, transparent 70%);
}

@keyframes float-promo-img {
    0%   { transform: translateY(0)    rotate(0deg)   scale(1); }
    30%  { transform: translateY(-12px) rotate(0.6deg) scale(1.008); }
    60%  { transform: translateY(-6px)  rotate(-0.4deg) scale(1.004); }
    100% { transform: translateY(0)    rotate(0deg)   scale(1); }
}

.promo-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.34,1.26,0.64,1), filter 0.4s ease;
    filter:
        drop-shadow(0 16px 32px rgba(0,0,0,0.4))
        drop-shadow(0 4px 12px rgba(0,0,0,0.2));
    animation: float-promo-img 5s ease-in-out infinite;
    will-change: transform;
}

.promo-card:hover .promo-img {
    animation-play-state: paused;
    transform: scale(1.06) translateY(-8px) rotate(-0.5deg);
    filter:
        drop-shadow(0 24px 48px rgba(0,0,0,0.5))
        drop-shadow(0 6px 18px rgba(255,255,255,0.08));
}

/* ── Separator line — مخفي ── */
.promo-divider {
    display: none;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .promo-body {
        flex-direction: column-reverse;
        gap: 0;
        padding: 36px 28px 28px;
    }
    .promo-divider { display: none; }
    .promo-content {
        align-items: center;
        text-align: center;
        padding-top: 16px;
    }
    .promo-media {
        width: 100%;
        max-height: 260px;
        overflow: hidden;
        mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    }
    .promo-img {
        max-height: 260px;
        width: auto;
        margin: 0 auto;
        display: block;
    }
    .promo-title { font-size: 1.9rem; }
}

@media (max-width: 576px) {
    .promos-wrapper { padding: 0 16px 60px; gap: 24px; }
    .promo-card    { border-radius: 20px; }
    .promo-body    { padding: 28px 18px 24px; gap: 0; }
    .promo-title   { font-size: 1.6rem; }
    .promo-text    { font-size: 0.9rem; margin-bottom: 22px; }
    .btn-promo     {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
        font-size: 0.95rem;
    }
    .promo-media {
        max-height: 220px;
        mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    }
    .promo-img { max-height: 220px; }
    .promo-badge { font-size: 0.75rem; padding: 5px 12px; margin-bottom: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   AI RECOMMENDATION CARD & POPUP MODAL
   ═══════════════════════════════════════════════════════════ */

/* Static Card Styles */
.ai-recommend-card {
    background: var(--card-bg);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 28px;
    overflow: hidden;
    max-width: 460px;
    margin: 30px auto;
    box-shadow:
        0 20px 60px rgba(2,132,199,0.18),
        0 8px 24px rgba(234,179,8,0.12),
        0 0 0 1px rgba(2,132,199,0.15);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    text-align: center;
    padding: 0 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

/* شريط علوي متدرج يلفت النظر */
.ai-recommend-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #eab308, #fcd34d, #0284c7);
    background-size: 300% 100%;
    animation: cardBorderShine 3s linear infinite;
    z-index: 2;
}

@keyframes cardBorderShine {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

/* وميض ضوئي ركن */
.ai-recommend-card::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(234,179,8,0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    animation: cornerGlow 4s ease-in-out infinite alternate;
}

@keyframes cornerGlow {
    0%   { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.3); }
}

.ai-recommend-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 30px 80px rgba(2,132,199,0.25),
        0 12px 32px rgba(234,179,8,0.18),
        0 0 0 2px rgba(2,132,199,0.25);
}

.ai-recommend-card .card-img-wrap {
    width: 100%;
    height: auto;
    border-radius: 0;
    overflow: hidden;
    border: none;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-bottom: 20px;
}

/* تراكب ضبابي أسفل الصورة */
.ai-recommend-card .card-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--card-bg), transparent);
    pointer-events: none;
}

.ai-recommend-card .card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ai-recommend-card:hover .card-img {
    transform: scale(1.05);
}

.ai-recommend-card .card-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0 0 4px;
    font-family: 'Tajawal', sans-serif;
    position: relative;
    z-index: 1;
    /* ثريد تحت العنوان */
    text-shadow: 0 2px 16px rgba(2,132,199,0.18);
}

.ai-recommend-card .card-subtitle {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}

.ai-recommend-card .btn-recommend {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 50%, #ca8a04 100%);
    color: #0f172a;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 6px 20px rgba(234, 179, 8, 0.45),
        0 2px 8px rgba(234, 179, 8, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    width: calc(100% - 48px);
    justify-content: center;
    position: relative;
    z-index: 1;
    animation: btnPulse 3s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(234,179,8,0.45), 0 2px 8px rgba(234,179,8,0.2), inset 0 1px 0 rgba(255,255,255,0.3); }
    50%       { box-shadow: 0 10px 32px rgba(234,179,8,0.6), 0 4px 12px rgba(234,179,8,0.3), inset 0 1px 0 rgba(255,255,255,0.3); }
}

.ai-recommend-card .btn-recommend:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 14px 36px rgba(234, 179, 8, 0.6);
    animation-play-state: paused;
}

.ai-recommend-card .btn-recommend:active {
    transform: scale(0.97);
}

/* AI Popup Modal Styles */
.ai-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ai-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.ai-popup-card {
    background: var(--card-bg);
    border: 2px solid rgba(56, 189, 248, 0.25);
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    position: relative;
    padding: 0 0 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(2, 132, 199, 0.2);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.ai-popup-overlay.active .ai-popup-card {
    transform: scale(1);
}

.ai-popup-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.ai-popup-close:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.ai-popup-img-wrap {
    width: 100%;
    height: auto;
    border-radius: 0;
    overflow: hidden;
    border: none;
    position: relative;
    margin-bottom: 16px;
}

.ai-popup-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--card-bg), transparent);
    pointer-events: none;
}

.ai-popup-img {
    width: 100%;
    height: auto;
    display: block;
}

.ai-popup-title {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 4px 0;
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 2px 14px rgba(2,132,199,0.18);
}

.ai-popup-subtitle {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ai-popup-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 50%, #ca8a04 100%);
    color: #0f172a;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 6px 20px rgba(234, 179, 8, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    justify-content: center;
    width: calc(100% - 48px);
    margin: 0 24px;
    animation: btnPulse 3s ease-in-out infinite;
}

.ai-popup-btn:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 14px 36px rgba(234, 179, 8, 0.6);
    animation-play-state: paused;
}

.ai-popup-btn:active {
    transform: scale(0.97);
}


/* ══════════════════════════════════════════════
   Developer Signature — توقيع المطوّر (كل الصفحات)
══════════════════════════════════════════════ */
.dev-signature {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px 18px;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    background:
        radial-gradient(circle at 18% 25%, rgba(56,189,248,0.10) 0%, transparent 50%),
        radial-gradient(circle at 82% 75%, rgba(234,179,8,0.10) 0%, transparent 50%),
        linear-gradient(180deg, #0a0f1f 0%, #0d1426 100%);
    border-top: 1px solid rgba(234,179,8,0.18);
    overflow: hidden;
    z-index: 5;
}

.dev-signature::before {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, #eab308, #38bdf8, transparent);
    opacity: .55;
}

.dev-signature-text {
    position: relative;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}

.dev-signature-text .dev-word-developer {
    color: #38bdf8;
    font-weight: 800;
}

.dev-signature-text .dev-word-design {
    color: #eab308;
    font-weight: 800;
}

.dev-signature-text .dev-word-by {
    color: #64748c;
    font-weight: 500;
}

.dev-signature-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    cursor: pointer;
    padding: 9px 16px;
    border-radius: 12px;
    transition: transform 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.dev-signature-name {
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: .3px;
    background: linear-gradient(90deg, #7dd3fc 0%, #fde68a 55%, #facc15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(250,204,21,0.35));
    animation: sig-pulse 2.6s ease-in-out infinite;
    transform-origin: center;
    display: inline-block;
}

.dev-signature-link i.fa-code {
    font-size: 0.82rem;
    color: #38bdf8;
    transition: color 0.25s ease, transform 0.25s ease;
}

@keyframes sig-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(250,204,21,0.25)); }
    50% { transform: scale(1.045); filter: drop-shadow(0 0 14px rgba(250,204,21,0.55)); }
}

@media (prefers-reduced-motion: reduce) {
    .dev-signature-name { animation: none; }
}

.dev-signature-link:hover {
    background: rgba(250,204,21,0.08);
    transform: translateY(-2px);
}

.dev-signature-link:hover .dev-signature-name {
    filter: drop-shadow(0 0 18px rgba(250,204,21,0.7));
}

.dev-signature-link:hover i.fa-code {
    color: #facc15;
    transform: rotate(-6deg);
}

.dev-signature-link::after {
    content: "";
    position: absolute;
    left: 4px; right: 4px; bottom: 2px;
    height: 1px;
    background: linear-gradient(90deg, #38bdf8, #facc15);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.dev-signature-link:hover::after {
    transform: scaleX(1);
}

.dev-signature-phone {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 700;
    color: #5eead4;
    background: rgba(94,234,212,0.08);
    border: 1px solid rgba(94,234,212,0.28);
    border-radius: 20px;
    padding: 0;
    direction: ltr;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.35s ease, max-width 0.45s cubic-bezier(.34,1.56,.64,1), padding 0.4s ease, margin 0.4s ease;
}

.dev-signature-phone.show {
    opacity: 1;
    max-width: 220px;
    margin-right: 2px;
    padding: 6px 14px;
}

.dev-signature-phone i { font-size: 0.78rem; }

@media print {
    .dev-signature { display: none !important; }
}

@media (max-width: 480px) {
    .dev-signature { padding: 18px 14px; gap: 8px; }
    .dev-signature-text { font-size: 0.76rem; }
    .dev-signature-name { font-size: 0.96rem; }
    .dev-signature-phone { font-size: 0.78rem; }
}


/* ══════════════════════════════════════════════════════════════
   PREMIUM COURSE TILES — v2
   الصورة هي العنصر الأساسي فقط، والتفاصيل تظهر عند التفاعل
   الهوية: الذهبي الفاتح (--accent) + السماوي (--primary-color)
   ══════════════════════════════════════════════════════════════ */

:root {
    --ct-gold: #eab308;
    --ct-gold-light: #fde68a;
    --ct-cyan: #0284c7;
    --ct-cyan-light: #38bdf8;
}

.courses-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    max-width: 880px !important;
    margin: 56px auto 0 !important;
    position: relative !important;
    z-index: 1 !important;
    padding: 10px 6px 40px !important;
}

/* ── Tile shell ── */
.course-tile {
    position: relative !important;
    display: block !important;
    width: min(74vw, 430px) !important;
    aspect-ratio: 3 / 4 !important;
    border-radius: var(--tile-radius, 24px) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #eef2f7 !important;
    isolation: isolate !important;
    box-shadow:
        0 22px 54px rgba(2, 132, 199, 0.16),
        0 8px 22px rgba(15, 23, 42, 0.10) !important;
    opacity: 0 !important;
    transform: translateY(46px) scale(0.96) !important;
    transition:
        opacity 0.7s cubic-bezier(.23,1,.32,1),
        transform 0.4s cubic-bezier(.23,1,.32,1),
        box-shadow 0.4s ease !important;
    will-change: transform !important;
    -webkit-tap-highlight-color: transparent !important;
}

.course-tile.in-view {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* ── Staircase offsets: alternate sides + overlap ── */
.course-tile:nth-child(odd)  { align-self: flex-end !important;  }
.course-tile:nth-child(even) { align-self: flex-start !important; }
.course-tile:nth-child(n+2)  { margin-top: -18px !important; }
.course-tile:nth-child(3n+2) { width: min(70vw, 390px) !important; }

.course-tile.in-view:nth-child(odd)  { transform: rotate(-1.4deg) !important; }
.course-tile.in-view:nth-child(even) { transform: rotate(1.4deg) !important; }

/* Reveal delay per position for a cascading entrance */
.course-tile:nth-child(1) { transition-delay: .05s !important; }
.course-tile:nth-child(2) { transition-delay: .14s !important; }
.course-tile:nth-child(3) { transition-delay: .22s !important; }
.course-tile:nth-child(4) { transition-delay: .30s !important; }
.course-tile:nth-child(5) { transition-delay: .38s !important; }
.course-tile:nth-child(6) { transition-delay: .46s !important; }
.course-tile:nth-child(n+7) { transition-delay: .54s !important; }

/* ── Hover / active state: gentle gold-cyan glow + gradient ring ── */
.course-tile::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    padding: 2px !important;
    background: linear-gradient(135deg, var(--ct-gold-light), var(--ct-cyan-light)) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    opacity: 0 !important;
    transition: opacity 0.35s ease !important;
    z-index: 7 !important;
    pointer-events: none !important;
}

.course-tile:hover,
.course-tile.sheet-open,
.course-tile:focus-visible {
    transform: translateY(-10px) rotate(0deg) scale(1.02) !important;
    box-shadow:
        0 30px 70px rgba(234, 179, 8, 0.22),
        0 18px 40px rgba(2, 132, 199, 0.22) !important;
    z-index: 6 !important;
}

.course-tile:hover::after,
.course-tile.sheet-open::after,
.course-tile:focus-visible::after {
    opacity: 1 !important;
}

/* Short "press & go" animation right before navigating */
.course-tile.tile-leaving {
    transform: scale(0.94) !important;
    opacity: 0 !important;
    transition: transform 0.28s cubic-bezier(.4,0,.6,1), opacity 0.28s ease !important;
    pointer-events: none !important;
}

/* ── Media (image only) ── */
.course-tile-media {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

.course-tile-bg {
    position: absolute !important;
    inset: -8% !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(32px) saturate(1.25) brightness(0.82) !important;
    transform: scale(1.18) !important;
    z-index: 1 !important;
}

.course-tile-bg::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(15,23,42,.10) 0%, rgba(15,23,42,.10) 55%, rgba(15,23,42,.60) 100%) !important;
}

/* The actual course image — always shown FULL, never cropped/zoomed/distorted */
.course-tile-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    z-index: 2 !important;
    filter: drop-shadow(0 10px 26px rgba(0,0,0,0.22)) !important;
    transition: transform 0.4s cubic-bezier(.23,1,.32,1), filter 0.4s ease !important;
}

/* Hover effects on the image: slight zoom + soft dim */
.course-tile:hover .course-tile-img,
.course-tile.sheet-open .course-tile-img {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 10px 26px rgba(0,0,0,0.22)) brightness(0.86) !important;
}

.course-tile-dim {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    background: rgba(10, 14, 26, 0) !important;
    transition: background 0.4s ease !important;
    pointer-events: none !important;
}

.course-tile:hover .course-tile-dim,
.course-tile.sheet-open .course-tile-dim {
    background: rgba(10, 14, 26, 0.18) !important;
}

/* ── Customizable course-name badge (موضع/لون قابل للتخصيص) ── */
.course-name-badge {
    position: absolute !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: calc(100% - 28px) !important;
    padding: 9px 18px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: var(--cnb-color, #ffffff) !important;
    background: var(--cnb-bg, #0284c7) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.22) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.course-name-badge.cnb-top    { top: 14px !important; right: 14px !important; left: 14px !important; width: fit-content !important; margin: 0 0 0 auto !important; }
.course-name-badge.cnb-bottom { bottom: 14px !important; right: 14px !important; left: 14px !important; width: fit-content !important; margin: 0 0 0 auto !important; }
.course-name-badge.cnb-right  { top: 14px !important; right: 14px !important; max-width: 62% !important; white-space: normal !important; }
.course-name-badge.cnb-left   { top: 14px !important; left: 14px !important; right: auto !important; max-width: 62% !important; white-space: normal !important; }

/* Hide the name badge once the hover sheet takes over its space at the bottom
   (only when a sheet actually exists on this tile — see .cnb-with-sheet) */
.course-name-badge.cnb-bottom {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}
.course-tile:hover .course-name-badge.cnb-bottom.cnb-with-sheet,
.course-tile.sheet-open .course-name-badge.cnb-bottom.cnb-with-sheet {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    pointer-events: none !important;
}

/* ── Status badge: مجاني / جديد / الأكثر مشاهدة / الأعلى تقييماً ── */
.course-status-badge {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    right: auto !important;
    z-index: 6 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 15px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    color: #fff !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.28) inset !important;
    animation: ctBadgeFloat 2.8s ease-in-out infinite !important;
}

.course-status-badge.cst-free    { background: linear-gradient(95deg, var(--ct-gold-light), var(--ct-gold)) !important; color: #78350f !important; }
.course-status-badge.cst-paid    { background: linear-gradient(95deg, var(--ct-cyan-light), var(--ct-cyan)) !important; }
.course-status-badge.cst-new     { background: linear-gradient(95deg, #34d399, #059669) !important; }
.course-status-badge.cst-popular { background: linear-gradient(95deg, #f472b6, #db2777) !important; }
.course-status-badge.cst-top     { background: linear-gradient(95deg, var(--ct-gold), #b45309) !important; }

@keyframes ctBadgeFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

/* ── Bottom sheet — slides up on hover / tap ── */
.course-tile-sheet {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 8 !important;
    padding: 16px 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(12,17,32,.86) 28%, rgba(9,13,26,.96) 100%) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    transform: translateY(100%) !important;
    transition: transform 0.38s cubic-bezier(.23,1,.32,1) !important;
    color: #fff !important;
}

.course-tile:hover .course-tile-sheet,
.course-tile.sheet-open .course-tile-sheet,
.course-tile:focus-visible .course-tile-sheet {
    transform: translateY(0) !important;
}

.course-tile-sheet-title {
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    margin: 0 0 2px !important;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

/* ── Price row (سعر قبل/بعد الخصم) — نفس التصميم لأي كورس عادي أو مجمع ── */
.course-tile-price {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-family: 'Tajawal', sans-serif !important;
}
.course-tile-price .ctp-old {
    opacity: .65 !important;
    font-size: .82rem !important;
    color: #e2e8f0 !important;
    font-weight: 700 !important;
}
.course-tile-price .ctp-new {
    font-weight: 900 !important;
    font-size: .98rem !important;
    color: #fff !important;
}
.course-tile-price .ctp-off {
    background: #e74c3c !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
}

.course-tile-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
}

.cts-stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    text-align: center !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 12px !important;
    padding: 7px 4px !important;
}

.cts-stat i {
    font-size: 0.85rem !important;
    color: var(--ct-gold-light) !important;
}

.cts-stat span {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.70rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.course-tile-enter-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 11px 16px !important;
    border: none !important;
    border-radius: 14px !important;
    background: linear-gradient(95deg, var(--ct-cyan), var(--ct-cyan-light)) !important;
    color: #fff !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 900 !important;
    font-size: 0.92rem !important;
    cursor: pointer !important;
    box-shadow: 0 10px 26px rgba(2,132,199,0.45) !important;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease, background 0.3s ease !important;
}

.course-tile-enter-btn:hover {
    transform: translateY(-3px) !important;
    background: linear-gradient(95deg, var(--ct-gold), var(--ct-gold-light)) !important;
    box-shadow: 0 14px 34px rgba(234,179,8,0.45) !important;
    color: #78350f !important;
}

.course-tile-enter-btn:active { transform: translateY(0) scale(0.97) !important; }

/* ── Skeleton loading state ── */
.course-tile.cc-skeleton {
    opacity: 1 !important;
    transform: none !important;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
    animation: ctSkeletonPulse 1.6s ease-in-out infinite !important;
}
[data-theme="dark"] .course-tile.cc-skeleton {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}
@keyframes ctSkeletonPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .courses-grid { gap: 4px !important; margin-top: 40px !important; }
    .course-tile { width: min(84vw, 340px) !important; }
    .course-tile:nth-child(n+2) { margin-top: -16px !important; }
    .course-tile:nth-child(3n+2) { width: min(80vw, 310px) !important; }
    .course-name-badge { font-size: 0.82rem !important; padding: 7px 14px !important; }
    .course-status-badge { top: 10px !important; left: 10px !important; padding: 6px 12px !important; font-size: 0.68rem !important; }
    .course-tile-sheet { padding: 12px 12px 14px !important; gap: 9px !important; }
    .course-tile-sheet-title { font-size: 0.92rem !important; }
    .cts-stat { padding: 6px 3px !important; }
    .cts-stat span { font-size: 0.64rem !important; }
    .course-tile-enter-btn { padding: 10px 14px !important; font-size: 0.86rem !important; }
}

@media (min-width: 992px) {
    .course-tile { width: 400px !important; }
    .course-tile:nth-child(3n+2) { width: 360px !important; }
}

/* Touch devices: sheet only opens via explicit tap-state class (JS-controlled) */
@media (hover: none) {
    .course-tile:hover .course-tile-sheet { transform: translateY(100%) !important; }
    .course-tile.sheet-open .course-tile-sheet { transform: translateY(0) !important; }
    .course-tile:hover .course-tile-img { transform: none !important; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.22)) !important; }
    .course-tile.sheet-open .course-tile-img { transform: scale(1.05) !important; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.22)) brightness(0.86) !important; }
    .course-tile:hover .course-tile-dim { background: rgba(10,14,26,0) !important; }
    .course-tile.sheet-open .course-tile-dim { background: rgba(10,14,26,0.18) !important; }
    .course-tile:hover::after { opacity: 0 !important; }
    .course-tile.sheet-open::after { opacity: 1 !important; }
    .course-tile:hover { transform: translateY(0) rotate(inherit) scale(1) !important; box-shadow: 0 22px 54px rgba(2,132,199,0.16), 0 8px 22px rgba(15,23,42,0.10) !important; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .course-tile, .course-tile-img, .course-tile-enter-btn, .course-status-badge, .course-tile-sheet {
        animation: none !important;
        transition: none !important;
    }
    .course-tile { opacity: 1 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   HERO CARD ON SCROLL — الكارت اللي في نص الشاشة أثناء التمرير
   يكبر بهدوء، يفقد الميل، وتظهر تفاصيله بالتدريج (زي Netflix/Apple TV)
   لا تغيير في الألوان أو الشارات أو الصور — فقط تحسين التفاعل
   ══════════════════════════════════════════════════════════════ */

/* الكارت المُركّز: يكبر قليلاً (4-6%)، يستقيم من الميل، وتزيد نعومة الظل
   والـ Border Radius — حركة سلسة 250-300ms كما هو مطلوب */
.course-tile.is-hero {
    box-shadow:
        0 34px 78px rgba(2, 132, 199, 0.24),
        0 16px 40px rgba(234, 179, 8, 0.16) !important;
    border-radius: calc(var(--tile-radius, 24px) + 6px) !important;
    z-index: 5 !important;
}

/* Higher-specificity override so the hero scale beats the staircase tilt
   (.course-tile.in-view:nth-child(odd/even)) which is otherwise more specific. */
.course-tile.in-view.is-hero {
    transform: scale(1.05) rotate(0deg) !important;
    transition:
        transform 0.28s cubic-bezier(.23, 1, .32, 1),
        box-shadow 0.28s ease,
        border-radius 0.28s ease !important;
}

/* Gentle "alive" zoom on the hero image, à la Netflix/Apple TV focus state */
.course-tile.is-hero .course-tile-img {
    transform: scale(1.03) !important;
    filter: drop-shadow(0 10px 26px rgba(0,0,0,0.22)) brightness(0.92) !important;
}

.course-tile.is-hero .course-tile-dim {
    background: rgba(10, 14, 26, 0.16) !important;
}

/* Reveal the existing bottom sheet (gradient overlay) automatically once
   this tile becomes the scroll-centered hero — no tap/hover required */
.course-tile.is-hero .course-tile-sheet {
    transform: translateY(0) !important;
}
.course-tile.is-hero::after {
    opacity: 1 !important;
}
.course-tile.is-hero .course-name-badge.cnb-bottom.cnb-with-sheet {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    pointer-events: none !important;
}

/* ── Course short description (2 lines max, fetched from the dashboard) ── */
.course-tile-desc {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    margin: 0 0 2px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ── Staggered reveal of the overlay content: title → description → stats → button ──
   Triggered by hover, tap (sheet-open) OR the automatic scroll-centered hero state */
.course-tile-sheet-title,
.course-tile-desc,
.course-tile-stats,
.course-tile-enter-btn {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}
.course-tile-sheet-title { transition-delay: 0.04s !important; }
.course-tile-desc        { transition-delay: 0.11s !important; }
.course-tile-stats       { transition-delay: 0.18s !important; }
.course-tile-enter-btn   { transition-delay: 0.25s !important; }

.course-tile:is(:hover, .sheet-open, .is-hero, :focus-visible) .course-tile-sheet-title,
.course-tile:is(:hover, .sheet-open, .is-hero, :focus-visible) .course-tile-desc,
.course-tile:is(:hover, .sheet-open, .is-hero, :focus-visible) .course-tile-stats,
.course-tile:is(:hover, .sheet-open, .is-hero, :focus-visible) .course-tile-enter-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@media (max-width: 700px) {
    .course-tile-desc { font-size: 0.74rem !important; line-height: 1.4 !important; }
}

@media (prefers-reduced-motion: reduce) {
    .course-tile.is-hero,
    .course-tile.in-view.is-hero,
    .course-tile.is-hero .course-tile-img {
        transition: none !important;
    }
    .course-tile-sheet-title,
    .course-tile-desc,
    .course-tile-stats,
    .course-tile-enter-btn {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   HERO MOBILE FULL REWRITE — إصلاح شامل ونهائي
   الترتيب الجديد: عنوان → جملة → صورة الدكتور كاملة → إحصائيات+بيلز+زر
   ═══════════════════════════════════════════════════════════════════ */

/* ══ 1. الهيكل العام للـ layout الجديد ══ */
.hero-mobile-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-x: hidden;
    padding: 20px 0 0;
}

/* ══ 2. القسم العلوي: العنوان + الجملة ══ */
.hero-top-text {
    text-align: center;
    width: 100%;
    padding: 0 16px 4px;
    box-sizing: border-box;
}

.hero-top-text .hero-title {
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.hero-top-text .hero-title-sub {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    margin-top: 4px !important;
    text-align: center !important;
    display: block !important;
}

.hero-top-text .hero-subtitle-line {
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    margin-top: 10px !important;
    line-height: 1.6 !important;
    display: block !important;
    text-align: center !important;
}

.hero-top-text .hero-author {
    font-size: 0.84rem !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    margin-top: 8px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
}

.hero-top-text .hero-author::before {
    content: '' !important;
    width: 18px !important;
    height: 2px !important;
    background: var(--primary-color) !important;
    display: inline-block !important;
    border-radius: 2px !important;
}

/* ══ 3. القسم الأوسط: الصورة الكاملة ══ */
.hero-mobile-wrap .hero-visual {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: center !important;
    position: relative !important;
    margin: 0 auto !important;
    /* لا overflow-hidden هنا — الصورة لازم تتشاف كاملة */
}

.hero-mobile-wrap .blob-wrapper {
    width: 100vw !important;
    max-width: 420px !important;
    height: 420px !important;
    position: relative !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: visible !important;
}

.hero-mobile-wrap .hero-main-img {
    width: 100% !important;
    max-width: 380px !important;
    height: auto !important;
    position: absolute !important;
    bottom: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 5 !important;
    filter:
        drop-shadow(0 24px 48px rgba(0,0,0,0.16))
        drop-shadow(0 6px 20px rgba(2,132,199,0.20)) !important;
}

/* ── الدائرة الخلفية الزرقاء ── */
.hero-mobile-wrap .hero-bg-circle {
    width: 340px !important;
    height: 370px !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -52%) !important;
}

.hero-mobile-wrap .hero-bg-circle-inner {
    width: 240px !important;
    height: 270px !important;
}

/* ── حلقات الأوربيت ── */
.hero-mobile-wrap .hero-orbit-ring {
    width: 280px !important;
    height: 310px !important;
}

.hero-mobile-wrap .hero-orbit-ring-2 {
    width: 310px !important;
    height: 345px !important;
}

.hero-mobile-wrap .hero-aura-ring {
    width: 250px !important;
    height: 280px !important;
}

/* ── البطاقات العائمة — أصغر وأقرب للمركز ── */
.hero-mobile-wrap .hero-feature-card {
    padding: 6px 9px !important;
    gap: 5px !important;
    border-radius: 10px !important;
}

.hero-mobile-wrap .hero-feature-card .fc-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.7rem !important;
    border-radius: 6px !important;
}

.hero-mobile-wrap .hero-feature-card .fc-text strong { font-size: 0.63rem !important; }
.hero-mobile-wrap .hero-feature-card .fc-text span   { font-size: 0.53rem !important; }

.hero-mobile-wrap .fc-nahw  { top: -5%;  right: -6%; }
.hero-mobile-wrap .fc-balag { top: 25%;  left: -8%; }
.hero-mobile-wrap .fc-adab  { bottom: 8%; right: -6%; }
.hero-mobile-wrap .fc-imla  { bottom: -4%; left: -5%; }

/* ══ 4. القسم السفلي: إحصائيات + بيلز + زر ══ */
.hero-bottom-content {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 16px 36px !important;
    box-sizing: border-box !important;
    gap: 0 !important;
}

.hero-bottom-content .hero-stats-strip {
    margin-top: 4px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    max-width: 420px !important;
    justify-content: center !important;
}

.hero-bottom-content .hero-pills-row {
    width: 100% !important;
    max-width: 420px !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.hero-bottom-content .hero-cta-wide {
    width: 100% !important;
    max-width: 420px !important;
    margin-top: 18px !important;
}

.hero-bottom-content .hero-cta-sub {
    max-width: 420px !important;
    margin-top: 10px !important;
    text-align: center !important;
}

/* ══ 5. الزخارف الجديدة حول الصورة ══ */
.deco-star {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    animation: decoStarPulse 3s ease-in-out infinite;
}
.deco-star-1 {
    top: 6%; right: 8%;
    font-size: 1.3rem;
    color: #eab308;
    filter: drop-shadow(0 0 8px rgba(234,179,8,0.85));
}
.deco-star-2 {
    top: 14%; left: 7%;
    font-size: 0.85rem;
    color: #38bdf8;
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.85));
    animation-delay: 1.2s;
}
@keyframes decoStarPulse {
    0%,100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
    50%      { transform: scale(1.3) rotate(18deg); opacity: 1; }
}

.deco-dot-shine {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 8;
    animation: decoShine 2.5s ease-in-out infinite;
}
.deco-dot-1 {
    width: 7px; height: 7px;
    top: 22%; left: 3%;
    box-shadow: 0 0 10px 3px rgba(251,191,36,0.7);
    background: #fbbf24;
    animation-delay: 0.4s;
}
.deco-dot-2 {
    width: 5px; height: 5px;
    top: 52%; right: 4%;
    box-shadow: 0 0 8px 2px rgba(56,189,248,0.7);
    background: #38bdf8;
    animation-delay: 1.1s;
}
.deco-dot-3 {
    width: 5px; height: 5px;
    bottom: 26%; left: 5%;
    box-shadow: 0 0 7px 2px rgba(251,191,36,0.6);
    background: #fbbf24;
    animation-delay: 1.8s;
}
@keyframes decoShine {
    0%,100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.7); }
}

.deco-ring-glow {
    position: absolute;
    width: 240px; height: 240px;
    top: 50%; left: 50%;
    transform: translate(-50%, -56%);
    border-radius: 50%;
    border: 1.5px solid transparent;
    background:
        linear-gradient(#fff0, #fff0) padding-box,
        linear-gradient(135deg,
            rgba(56,189,248,0.55) 0%,
            transparent 30%,
            rgba(234,179,8,0.45) 55%,
            transparent 75%,
            rgba(14,165,233,0.40) 100%
        ) border-box;
    animation: decoRingSpin 12s linear infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes decoRingSpin {
    from { transform: translate(-50%, -56%) rotate(0deg); }
    to   { transform: translate(-50%, -56%) rotate(360deg); }
}

.deco-badge-top,
.deco-badge-bottom {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 50px;
    padding: 5px 11px;
    font-size: 0.7rem;
    font-weight: 800;
    pointer-events: none;
    z-index: 9;
    direction: rtl;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: decoBadgeFloat 4s ease-in-out infinite;
}
.deco-badge-top {
    top: 10%; left: 0%;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,248,220,0.88));
    border: 1.5px solid rgba(234,179,8,0.45);
    color: #92650a;
    box-shadow: 0 4px 18px rgba(234,179,8,0.22);
}
[data-theme="dark"] .deco-badge-top {
    background: linear-gradient(135deg, rgba(30,20,0,0.88), rgba(50,35,0,0.82));
    color: #fde68a;
}
.deco-badge-top i { color: #eab308; font-size: 0.78rem; }

.deco-badge-bottom {
    bottom: 18%; right: 0%;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(224,242,254,0.88));
    border: 1.5px solid rgba(2,132,199,0.38);
    color: #0369a1;
    box-shadow: 0 4px 18px rgba(2,132,199,0.22);
    animation-delay: 1.6s;
}
[data-theme="dark"] .deco-badge-bottom {
    background: linear-gradient(135deg, rgba(0,20,40,0.88), rgba(0,30,55,0.82));
    color: #7dd3fc;
    border-color: rgba(56,189,248,0.38);
}
.deco-badge-bottom i { color: #0284c7; font-size: 0.78rem; }

@keyframes decoBadgeFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ══ Hero Below Section — Stats + Pills + CTA تحت صورة المدرس ══ */
/* على الديسكتوب: نظهره تحت الـ hero-container بشكل محوري */
.hero-below-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px 20px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ══ 6. الموبايل — hero-container يتكيف بدل ما يتخفى ══ */
@media (max-width: 992px) {

    /* الـ hero-container يتحول لـ flex عمودي على الموبايل */
    .hero-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 8px 16px 0 !important;
        min-height: unset !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* النص في الأعلى */
    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        order: 1 !important;
        box-sizing: border-box !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        text-align: center !important;
        margin-bottom: 0 !important;
    }

    .hero-title-sub {
        font-size: 1.65rem !important;
        margin-top: 2px !important;
        text-align: center !important;
    }

    .hero-subtitle-line {
        font-size: 0.88rem !important;
        text-align: center !important;
        margin-top: 5px !important;
        margin-bottom: 2px !important;
    }

    .hero-author {
        justify-content: center !important;
        font-size: 0.82rem !important;
        margin-top: 5px !important;
    }

    /* إخفاء stats/pills/CTA اللي جوا hero-content (إن وُجدت) */
    .hero-content .hero-stats-strip,
    .hero-content .hero-pills-row,
    .hero-content .hero-cta-wide,
    .hero-content .hero-cta-sub {
        display: none !important;
    }

    /* إظهار الـ hero-below-section */
    .hero-below-section {
        display: flex !important;
    }

    /* الإحصائيات */
    .hero-stats-strip {
        justify-content: center !important;
        gap: 12px !important;
        margin-top: 14px !important;
    }

    /* بيلز الميزات — 2 × 2 */
    .hero-pills-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 9px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 14px auto 0 !important;
        box-sizing: border-box !important;
    }

    .hero-pill {
        box-sizing: border-box !important;
    }

    /* زرار CTA */
    .hero-cta-wide {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        margin-top: 16px !important;
    }

    .hero-cta-sub {
        text-align: center !important;
        font-size: 0.78rem !important;
        margin-top: 8px !important;
    }

    /* الصورة تيجي تاني */
    .hero-visual {
        width: 100% !important;
        max-width: 100vw !important;
        order: 2 !important;
        overflow: visible !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 0 !important;
    }

    .blob-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 440px !important;
        position: relative !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        overflow: visible !important;
        background: transparent !important;
    }

    .hero-main-img {
        width: 88% !important;
        max-width: 310px !important;
        bottom: -5px !important;
    }

    .hero-orbit-ring   { width: 280px !important; height: 310px !important; }
    .hero-orbit-ring-2 { width: 310px !important; height: 345px !important; }
    .hero-aura-ring    { width: 250px !important; height: 280px !important; }

    .hero-bg-circle       { width: 300px !important; height: 330px !important; }
    .hero-bg-circle-inner { width: 210px !important; height: 240px !important; }

    /* البطاقات العائمة حول الصورة — أصغر */
    .hero-feature-card {
        padding: 5px 8px !important;
        gap: 4px !important;
        border-radius: 9px !important;
    }
    .hero-feature-card .fc-icon {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.65rem !important;
    }
    .hero-feature-card .fc-text strong { font-size: 0.6rem !important; }
    .hero-feature-card .fc-text span   { font-size: 0.52rem !important; }

    /* مواضع البطاقات على الموبايل — داخل حدود الشاشة تماماً بدون أي قص */
    .fc-nahw  { top: 1%;   right: 1%; }
    .fc-balag { top: 30%;  left: 1%; }
    .fc-adab  { bottom: 12%; right: 1%; }
    .fc-imla  { bottom: 9%;  left: 1%; }

    /* إخفاء hero-mobile-wrap (مش محتاجينه) */
    .hero-mobile-wrap {
        display: none !important;
    }
}

/* ══ شاشات صغيرة جداً ══ */
@media (max-width: 420px) {
    .hero-title     { font-size: 1.7rem !important; }
    .hero-title-sub { font-size: 1.4rem !important; }
    .blob-wrapper   { height: 400px !important; max-width: 100vw !important; }
    .hero-main-img  { max-width: 280px !important; width: 84% !important; }
    .hero-pills-row { grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
    .hero-below-section { padding: 0 12px 20px !important; }
}

/* ══ 7. على الديسكتوب: grid عادي ══ */
@media (min-width: 993px) {
    .hero-mobile-wrap {
        display: none !important;
    }
    .hero-container {
        display: grid !important;
        grid-template-columns: 1fr 1.3fr !important;
        flex-direction: unset !important;
    }
    .hero-content { order: unset !important; }
    .hero-visual  { order: unset !important; }
    .hero-below-section {
        max-width: 600px !important;
        padding: 10px 24px 50px !important;
    }
}

/* ══ تحسين أداء حروف الهجاء ══ */
.arabic-letter {
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
}

/* Final index polish: connected hero, premium teacher backdrop, course motion, promo cards */
.index-hero-section {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
    padding: clamp(24px, 4vw, 56px) 0 clamp(26px, 4vw, 54px) !important;
    background:
        radial-gradient(circle at 20% 18%, rgba(56, 189, 248, 0.20), transparent 28%),
        radial-gradient(circle at 82% 24%, rgba(234, 179, 8, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(239, 249, 255, 0.92), rgba(245, 251, 255, 0.72) 58%, rgba(255, 255, 255, 0) 100%) !important;
}

.index-hero-section::before,
.index-hero-section::after {
    content: '' !important;
    position: absolute !important;
    inset: auto !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.index-hero-section::before {
    width: min(78vw, 780px) !important;
    height: min(78vw, 780px) !important;
    right: -18vw !important;
    top: -22vw !important;
    border-radius: 50% !important;
    background:
        radial-gradient(circle at 44% 44%, rgba(255, 255, 255, 0.55), transparent 34%),
        conic-gradient(from 120deg, rgba(14, 165, 233, 0.20), rgba(234, 179, 8, 0.18), rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.20)) !important;
    filter: blur(2px) !important;
    animation: heroBackdropHue 12s ease-in-out infinite alternate !important;
}

.index-hero-section::after {
    left: 6% !important;
    bottom: 6% !important;
    width: 38% !important;
    height: 34% !important;
    border-radius: 999px !important;
    background: radial-gradient(ellipse, rgba(234, 179, 8, 0.16), rgba(56, 189, 248, 0.12) 48%, transparent 72%) !important;
    filter: blur(24px) !important;
    animation: heroSoftDrift 8s ease-in-out infinite alternate !important;
}

@keyframes heroBackdropHue {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); filter: hue-rotate(0deg) blur(2px); }
    100% { transform: translate3d(-18px, 16px, 0) rotate(10deg); filter: hue-rotate(8deg) blur(2px); }
}

@keyframes heroSoftDrift {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.62; }
    to { transform: translate3d(18px, -14px, 0) scale(1.08); opacity: 0.9; }
}

.index-hero-section .hero-container,
.index-hero-section .hero-below-section {
    position: relative !important;
    z-index: 2 !important;
}

.index-hero-section .hero-container {
    padding-top: clamp(18px, 4vw, 54px) !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    min-height: auto !important;
    overflow: visible !important;
}

.index-hero-section .hero-below-section {
    margin-top: clamp(4px, 1.2vw, 14px) !important;
    padding-bottom: 0 !important;
}

.index-hero-section .blob-wrapper {
    border-radius: 38px !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.16)),
        radial-gradient(circle at 50% 25%, rgba(125, 211, 252, 0.30), transparent 34%),
        radial-gradient(circle at 42% 70%, rgba(250, 204, 21, 0.14), transparent 38%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 26px 70px rgba(2, 132, 199, 0.10) !important;
}

.index-hero-section .blob-wrapper::before,
.index-hero-section .blob-wrapper::after {
    content: '' !important;
    position: absolute !important;
    pointer-events: none !important;
    border-radius: inherit !important;
    z-index: 1 !important;
}

.index-hero-section .blob-wrapper::before {
    inset: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    background:
        linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.22) 13%, transparent 26%),
        repeating-linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0 1px, transparent 1px 76px) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    animation: heroGlassFloat 7s ease-in-out infinite !important;
}

.index-hero-section .blob-wrapper::after {
    inset: 10% 7% 6% 7% !important;
    border: 1px solid rgba(234, 179, 8, 0.20) !important;
    background:
        radial-gradient(circle at 20% 35%, rgba(250, 204, 21, 0.24), transparent 8%),
        radial-gradient(circle at 76% 20%, rgba(56, 189, 248, 0.20), transparent 9%),
        radial-gradient(circle at 82% 72%, rgba(234, 179, 8, 0.20), transparent 7%) !important;
    animation: heroGoldShimmer 5.5s ease-in-out infinite alternate !important;
}

@keyframes heroGlassFloat {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.7; }
    50% { transform: translate3d(-8px, -8px, 0); opacity: 0.95; }
}

@keyframes heroGoldShimmer {
    from { transform: translate3d(0, 0, 0) scale(1); filter: brightness(1); }
    to { transform: translate3d(10px, -6px, 0) scale(1.02); filter: brightness(1.12); }
}

.index-hero-section .hero-main-img {
    z-index: 5 !important;
}

@media (max-width: 992px) {
    .index-hero-section {
        padding-top: 8px !important;
        padding-bottom: 28px !important;
    }
    .index-hero-section .hero-container {
        padding-bottom: 0 !important;
        gap: 0 !important;
    }
    .index-hero-section .blob-wrapper {
        height: clamp(390px, 106vw, 470px) !important;
        margin-top: 0 !important;
    }
    .index-hero-section .hero-below-section {
        margin-top: -2px !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 420px) {
    .index-hero-section .blob-wrapper {
        height: clamp(360px, 104vw, 420px) !important;
    }
}

@keyframes courseFloatOdd {
    0%, 100% { transform: translateX(0) rotate(-1.4deg); }
    50% { transform: translateX(-8px) rotate(-1.4deg); }
}

@keyframes courseFloatEven {
    0%, 100% { transform: translateX(0) rotate(1.4deg); }
    50% { transform: translateX(8px) rotate(1.4deg); }
}

.course-tile.in-view:nth-child(odd):not(.is-hero):not(:hover):not(.sheet-open):not(:focus-visible) {
    animation: courseFloatOdd 5.8s ease-in-out infinite !important;
}

.course-tile.in-view:nth-child(even):not(.is-hero):not(:hover):not(.sheet-open):not(:focus-visible) {
    animation: courseFloatEven 6.2s ease-in-out infinite !important;
}

.course-tile:hover,
.course-tile.sheet-open,
.course-tile:focus-visible {
    animation-play-state: paused !important;
    transform: translateY(-14px) rotate(0deg) scale(1.045) !important;
}

.course-tile-stats {
    display: none !important;
}

.course-tile-sheet {
    gap: 14px !important;
}

.course-tile-enter-btn {
    margin-top: 2px !important;
}

@media (hover: none) {
    .course-tile.sheet-open {
        transform: translateY(-8px) rotate(0deg) scale(1.035) !important;
        box-shadow:
            0 32px 72px rgba(234, 179, 8, 0.20),
            0 18px 42px rgba(2, 132, 199, 0.22) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-hero-section::before,
    .index-hero-section::after,
    .index-hero-section .blob-wrapper::before,
    .index-hero-section .blob-wrapper::after,
    .course-tile.in-view {
        animation: none !important;
    }
}
