/* ════════════════════════════════════════════════════════════════════
   منصة المأذون في الفيزياء — Brand Identity CSS
   الألوان الأساسية: برتقالي #EA9015 + كحلي #4958A3
   ════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand colors */
    --brand-orange:        #EA9015;
    --brand-orange-light:  #F5A938;
    --brand-orange-dark:   #C77B0F;
    --brand-orange-50:     #FFF7E8;
    --brand-orange-100:    #FFEDC8;

    --brand-blue:          #4958A3;
    --brand-blue-light:    #6573B6;
    --brand-blue-dark:     #3A4889;
    --brand-blue-50:       #EEF1F8;

    /* Neutral palette */
    --white:               #ffffff;
    --bg-cream:            #FFFCF7;
    --bg-soft:             #F9FAFB;
    --text-primary:        #1F2937;
    --text-secondary:      #4B5563;
    --text-muted:          #6B7280;
    --border-soft:         #E5E7EB;
    --border-light:        #F3F4F6;

    /* Semantic */
    --success:             #10B981;
    --warning:             #F59E0B;
    --danger:              #EF4444;
    --info:                #3B82F6;

    /* Effects */
    --radius-sm:           8px;
    --radius:              12px;
    --radius-lg:           16px;
    --radius-xl:           24px;
    --radius-pill:         999px;
    --shadow-sm:           0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --shadow:              0 2px 6px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg:           0 8px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl:           0 20px 50px rgba(0,0,0,0.12);
    --shadow-orange:       0 8px 24px rgba(234,144,21,0.25);
    --shadow-blue:         0 8px 24px rgba(73,88,163,0.20);

    --transition:          all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-body:           'Cairo', system-ui, -apple-system, sans-serif;
    --font-display:        'Tajawal', 'Cairo', system-ui, sans-serif;

    /* Layout */
    --header-h:            72px;
    --container:           1240px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

main { flex: 1; }

/* ─── Container ─── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 800; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p  { margin-bottom: 1em; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: var(--white);
    box-shadow: var(--shadow-orange);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(234,144,21,0.4); color: var(--white); }
.btn-secondary {
    background: var(--white);
    color: var(--brand-blue-dark);
    border: 2px solid var(--brand-blue);
}
.btn-secondary:hover { background: var(--brand-blue); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-blue); }
.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.28); color: var(--white); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; }

/* ─── Header / Nav ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 252, 247, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-primary);
}
.nav-logo img { width: 44px; height: 44px; }
.nav-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.nav-logo-name { font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; color: var(--brand-orange-dark); }
.nav-logo-sub { font-size: 0.7rem; color: var(--brand-blue); font-weight: 600; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-link:hover { color: var(--brand-orange-dark); background: var(--brand-orange-50); }
.nav-link.active { color: var(--brand-orange-dark); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -2px; right: 14px; left: 14px;
    height: 3px; background: var(--brand-orange); border-radius: 2px;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle::after {
    content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    margin-right: 6px; font-size: 0.65rem; opacity: 0.6; transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-toggle::after { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: 8px;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-weight: 600; font-size: 0.9rem;
}
.nav-dropdown-item:hover { background: var(--brand-orange-50); color: var(--brand-orange-dark); }
.nav-dropdown-item i { color: var(--brand-orange); width: 18px; }

.nav-cta { flex-shrink: 0; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--brand-orange-50);
    color: var(--brand-orange-dark);
    align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.nav-toggle:hover { background: var(--brand-orange); color: var(--white); }

@media (max-width: 1024px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu-panel {
    position: absolute;
    top: 0; right: 0;
    width: 320px;
    max-width: 88vw;
    height: 100%;
    background: var(--white);
    padding: 24px 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-close {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--brand-orange-50);
    color: var(--brand-orange-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.mobile-menu-list { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-list a {
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    display: flex; align-items: center; gap: 10px;
}
.mobile-menu-list a:hover { background: var(--brand-orange-50); color: var(--brand-orange-dark); }
.mobile-menu-list a i { color: var(--brand-orange); width: 22px; }
.mobile-menu-cta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-light); }

/* ─── Hero ─── */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 50%, var(--brand-orange-dark) 100%);
    color: var(--white);
    padding: clamp(60px, 10vw, 120px) 0 clamp(80px, 12vw, 160px);
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(234,144,21,0.25) 0%, transparent 40%);
}
.hero-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-orbs span {
    position: absolute; border-radius: 50%;
    filter: blur(60px); opacity: 0.4;
    animation: orbFloat 16s ease-in-out infinite;
}
.hero-orbs span:nth-child(1) { width: 360px; height: 360px; background: rgba(234,144,21,0.5); top: -100px; right: -80px; }
.hero-orbs span:nth-child(2) { width: 280px; height: 280px; background: rgba(255,255,255,0.25); bottom: 5%; left: 10%; animation-delay: -6s; }
.hero-orbs span:nth-child(3) { width: 200px; height: 200px; background: rgba(73,88,163,0.6); top: 50%; left: 40%; opacity: 0.3; animation-delay: -10s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.1); }
}

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px 18px; border-radius: var(--radius-pill);
    font-size: 0.85rem; font-weight: 700;
    margin-bottom: 18px;
    color: var(--white);
}
.hero-badge i { color: var(--brand-orange-light); }
.hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 16px;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.hero h1 .accent { color: var(--brand-orange-light); }
.hero p.lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.92);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 640px;
    margin-right: auto;
    margin-left: auto;
}
.hero-actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

.hero-bottom-fade {
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-cream));
    pointer-events: none; z-index: 0;
}

/* ─── Stats Band ─── */
.stats-band {
    margin-top: -60px;
    position: relative; z-index: 2;
    margin-bottom: 70px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}
.stat-item {
    text-align: center;
    padding: 14px 8px;
    border-left: 1px solid var(--border-light);
}
.stat-item:first-child { border-left: 0; }
@media (max-width: 720px) {
    .stat-item { border-left: 0; border-bottom: 1px solid var(--border-light); padding: 16px 8px; }
    .stat-item:last-child { border-bottom: 0; }
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(234,144,21,0.3);
}
.stat-item:nth-child(2) .stat-icon { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark)); box-shadow: 0 4px 12px rgba(73,88,163,0.3); }
.stat-item:nth-child(3) .stat-icon { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.stat-item:nth-child(4) .stat-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 4px 12px rgba(139,92,246,0.3); }
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-label { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }

/* ─── Sections ─── */
.section { padding: clamp(50px, 8vw, 90px) 0; }
.section-tight { padding: clamp(30px, 5vw, 60px) 0; }
.section-bg-cream { background: var(--bg-cream); }
.section-bg-soft { background: var(--bg-soft); }
.section-bg-gradient {
    background: linear-gradient(135deg, var(--brand-orange-50) 0%, var(--brand-blue-50) 100%);
}

.section-head { text-align: center; margin-bottom: 50px; }
.section-eyebrow {
    display: inline-block;
    color: var(--brand-orange-dark);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    padding: 4px 14px;
    background: var(--brand-orange-50);
    border-radius: var(--radius-pill);
}
.section-title { margin-bottom: 14px; }
.section-subtitle { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* ─── Cards Grid ─── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-orange-100);
}
.card-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
    box-shadow: var(--shadow-orange);
}
.card-icon.blue { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark)); box-shadow: var(--shadow-blue); }
.card-icon.green { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 8px 24px rgba(16,185,129,0.25); }
.card-icon.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 24px rgba(139,92,246,0.25); }
.card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0; }
.card-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 16px;
    color: var(--brand-orange-dark);
    font-weight: 700; font-size: 0.9rem;
}
.card-link:hover { color: var(--brand-orange); }
.card-link i { transition: transform 0.2s; }
.card:hover .card-link i { transform: translateX(-4px); }

/* ─── Stage Cards ─── */
.stage-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.stage-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    color: inherit;
}
.stage-card-head {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--white);
    padding: 24px 22px;
    position: relative;
    overflow: hidden;
}
.stage-card-head::before {
    content: ''; position: absolute; top: -30px; left: -30px;
    width: 140px; height: 140px;
    background: rgba(234,144,21,0.25);
    border-radius: 50%;
    transition: transform 0.4s;
}
.stage-card:hover .stage-card-head::before { transform: scale(1.5); }
.stage-card-icon {
    width: 50px; height: 50px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 14px;
    position: relative; z-index: 1;
}
.stage-card-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 4px;
    position: relative; z-index: 1;
}
.stage-card-track {
    font-size: 0.78rem;
    background: rgba(255,255,255,0.25);
    padding: 2px 12px;
    border-radius: var(--radius-pill);
    display: inline-block;
    font-weight: 700;
    position: relative; z-index: 1;
}
.stage-card-body { padding: 20px 22px; }
.stage-card-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.stage-card-stat {
    text-align: center;
    padding: 10px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}
.stage-card-stat-num {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--brand-orange-dark);
    line-height: 1;
}
.stage-card-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.stage-card-cta {
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex; align-items: center; gap: 6px;
}

/* ─── Footer ─── */
.site-footer {
    background: linear-gradient(180deg, var(--brand-blue-dark) 0%, #2A3263 100%);
    color: rgba(255,255,255,0.88);
    padding: 60px 0 0;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 880px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand-row img { width: 48px; height: 48px; }
.footer-brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--white); }
.footer-brand-sub { font-size: 0.78rem; color: var(--brand-orange-light); }
.footer-about { font-size: 0.9rem; line-height: 1.7; opacity: 0.85; margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    transition: var(--transition);
    font-size: 0.95rem;
}
.footer-social a:hover {
    background: var(--brand-orange);
    transform: translateY(-2px);
    color: var(--white);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: ''; position: absolute; bottom: 0; right: 0;
    width: 36px; height: 3px;
    background: var(--brand-orange);
    border-radius: 2px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
    color: rgba(255,255,255,0.78);
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-col a:hover { color: var(--brand-orange-light); transform: translateX(-3px); }
.footer-col a i { font-size: 0.7rem; opacity: 0.5; }

.footer-app-badges { display: flex; flex-direction: column; gap: 10px; }
.app-badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
}
.app-badge:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); color: var(--white); border-color: var(--brand-orange); }
.app-badge i { font-size: 1.4rem; color: var(--brand-orange-light); }
.app-badge-info { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge-info span:first-child { font-size: 0.7rem; opacity: 0.7; }

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ─── WhatsApp Float ─── */
.wa-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 80;
}
.wa-float-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    animation: waPulse 2s ease-in-out infinite;
    position: relative;
}
.wa-float-btn::before {
    content: ''; position: absolute; inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37,211,102,0.4);
    animation: waRing 2s ease-out infinite;
}
@keyframes waPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes waRing {
    0% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}
.wa-float-btn:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(37,211,102,0.5); }

.wa-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    opacity: 0; visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom left;
    transition: var(--transition);
}
.wa-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.wa-panel-head {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white);
    padding: 18px 20px;
    position: relative;
}
.wa-panel-head h4 { color: var(--white); margin: 0; font-size: 1.05rem; }
.wa-panel-head p { margin: 4px 0 0; font-size: 0.82rem; opacity: 0.9; }
.wa-panel-close {
    position: absolute; top: 12px; left: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-size: 0.85rem;
}
.wa-panel-close:hover { background: rgba(255,255,255,0.3); }
.wa-panel-body { max-height: 360px; overflow-y: auto; padding: 8px; }
.wa-contact {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: var(--transition);
    text-decoration: none;
}
.wa-contact:hover { background: #f0fdf4; color: var(--text-primary); }
.wa-contact-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.wa-contact-info { flex: 1; min-width: 0; }
.wa-contact-name { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.wa-contact-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.wa-contact-arrow { color: #25D366; font-size: 0.85rem; }

@media (max-width: 480px) {
    .wa-float { bottom: 16px; left: 16px; }
    .wa-float-btn { width: 54px; height: 54px; font-size: 1.4rem; }
}

/* ─── Animations on scroll (use Intersection Observer) ─── */
[data-anim] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-anim].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.text-orange { color: var(--brand-orange-dark); }
.text-blue { color: var(--brand-blue); }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.hide-mobile { display: initial; } @media (max-width: 768px) { .hide-mobile { display: none; } }
.show-mobile { display: none; } @media (max-width: 768px) { .show-mobile { display: initial; } }

/* ════════════════════════════════════════════════════════════════════
   Phase 3 — Content Page Components
   ════════════════════════════════════════════════════════════════════ */

/* ─── Breadcrumbs ─── */
.breadcrumbs {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; font-size: 0.85rem;
    color: var(--text-muted); margin-bottom: 16px;
}
.breadcrumbs a { color: var(--brand-orange-dark); transition: var(--transition); }
.breadcrumbs a:hover { color: var(--brand-orange); }
.breadcrumbs .sep { opacity: 0.5; font-size: 0.7rem; }
.breadcrumbs .current { color: var(--text-secondary); font-weight: 700; }

/* ─── Content Hero (smaller hero for content pages) ─── */
.content-hero {
    background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 60%, var(--brand-orange-dark) 130%);
    color: var(--white);
    padding: 50px 0 40px;
    position: relative;
    overflow: hidden;
}
.content-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 80% 30%, rgba(234,144,21,0.25) 0%, transparent 40%),
        radial-gradient(circle at 20% 70%, rgba(255,255,255,0.1) 0%, transparent 35%);
}
.content-hero-inner { position: relative; z-index: 1; }
.content-hero h1 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    text-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.content-hero p {
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    max-width: 680px;
}
.content-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}
.content-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 700;
}
.content-hero-stat i { color: var(--brand-orange-light); }

/* ─── Months Grid (for stage page) ─── */
.months-section { padding: 40px 0; }
.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}
.month-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.month-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: inherit;
    border-color: var(--brand-orange-100);
}
.month-card::before {
    content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    transition: height 0.3s;
}
.month-card:hover::before { height: 6px; }
.month-card-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.month-card-name {
    font-weight: 800;
    color: var(--brand-blue-dark);
    margin-top: 6px;
    font-size: 0.95rem;
}
.month-card-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    justify-content: center;
}
.month-card-stats span { display: inline-flex; align-items: center; gap: 4px; }
.month-card-stats i { color: var(--brand-orange); font-size: 0.7rem; }

/* ─── Chapter Card ─── */
.chapter-list { display: flex; flex-direction: column; gap: 14px; }
.chapter-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    border-right: 4px solid var(--brand-orange);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 18px;
}
.chapter-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-right-color: var(--brand-orange-dark);
    color: inherit;
}
.chapter-card-num {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
}
.chapter-card-info { flex: 1; min-width: 0; }
.chapter-card-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
}
.chapter-card-meta {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 0.82rem; color: var(--text-muted);
}
.chapter-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.chapter-card-meta i { color: var(--brand-orange); font-size: 0.78rem; }
.chapter-card-arrow {
    color: var(--brand-orange-dark);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.chapter-card:hover .chapter-card-arrow { transform: translateX(-4px); }

/* ─── Term separator ─── */
.term-separator {
    display: flex; align-items: center; gap: 12px;
    margin: 30px 0 16px;
}
.term-separator h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--brand-blue-dark);
    margin: 0;
    white-space: nowrap;
}
.term-separator::after {
    content: ''; flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, transparent 100%);
    border-radius: 2px;
}

/* ─── Lesson Card ─── */
.lessons-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: inherit;
}
.lesson-card:hover {
    border-color: var(--brand-orange);
    background: var(--brand-orange-50);
    transform: translateX(-3px);
    color: inherit;
}
.lesson-card-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius);
    background: var(--brand-orange-50);
    color: var(--brand-orange-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.lesson-card:hover .lesson-card-icon {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
    color: var(--white);
}
.lesson-card-info { flex: 1; min-width: 0; }
.lesson-card-name { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.lesson-card-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.lesson-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lesson-free-badge {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ─── Video parts list (داخل صفحة الدرس) ─── */
.video-parts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.video-part-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    border-right: 3px solid var(--brand-blue);
    transition: var(--transition);
}
.video-part-row:hover {
    background: var(--brand-orange-50);
    border-right-color: var(--brand-orange);
    transform: translateX(-2px);
}
.video-part-row.is-free {
    border-right-color: #10b981;
    background: #f0fdf4;
}
.video-part-row.is-free:hover {
    background: #dcfce7;
}
.video-part-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    line-height: 1;
    box-shadow: var(--shadow-blue);
}
.video-part-row.is-free .video-part-num {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 10px rgba(16,185,129,0.3);
}
.video-part-num i {
    font-size: 0.65rem;
    margin-bottom: 1px;
}
.video-part-num span {
    font-size: 0.78rem;
    font-weight: 800;
}
.video-part-info {
    flex: 1;
    min-width: 0;
}
.video-part-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.4;
    margin-bottom: 4px;
}
.video-part-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.video-part-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-part-meta i {
    color: var(--brand-orange);
    font-size: 0.72rem;
}
.video-locked-badge {
    background: var(--bg-soft);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
@media (max-width: 580px) {
    .video-part-row { padding: 10px; gap: 10px; }
    .video-part-name { font-size: 0.86rem; }
    .video-part-meta { font-size: 0.7rem; gap: 8px; }
}

/* ─── Tag chips inline ─── */
.tag-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    align-items: center;
}
.tag-chip-link {
    background: var(--brand-orange-50);
    color: var(--brand-orange-dark);
    border: 1px solid var(--brand-orange-100);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}
.tag-chip-link:hover {
    background: var(--brand-orange);
    color: var(--white);
    border-color: var(--brand-orange-dark);
    transform: translateY(-1px);
}

/* ─── App CTA Box (used in lesson/chapter pages) ─── */
.app-cta-box {
    background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 60%, var(--brand-orange-dark) 130%);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.app-cta-box::before {
    content: ''; position: absolute; top: -80px; left: -80px;
    width: 240px; height: 240px;
    background: rgba(234,144,21,0.3);
    border-radius: 50%;
    filter: blur(40px);
}
.app-cta-box-inner { position: relative; z-index: 1; text-align: center; }
.app-cta-box h3 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.4rem;
}
.app-cta-box p {
    opacity: 0.92;
    margin-bottom: 20px;
    font-size: 1rem;
}
.app-cta-box-buttons {
    display: flex; gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Course Sidebar (for chapter/lesson pages) ─── */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 980px) {
    .content-with-sidebar { grid-template-columns: 1fr; }
}
.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    position: sticky;
    top: 90px;
}
.sidebar-card h4 {
    font-size: 0.95rem;
    color: var(--brand-blue-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-orange-100);
}

/* ─── Empty state ─── */
.empty-state {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 60px 30px;
    text-align: center;
    border: 2px dashed var(--border-soft);
}
.empty-state i {
    font-size: 3rem;
    color: var(--border-soft);
    margin-bottom: 16px;
    display: block;
}
.empty-state h3 { color: var(--text-secondary); margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); }

/* ─── Phase 4: Search overlay ─── */
.nav-search-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--brand-orange-50);
    color: var(--brand-orange-dark);
    display: inline-flex; align-items: center; justify-content: center;
    transition: var(--transition); cursor: pointer; flex-shrink: 0;
}
.nav-search-btn:hover { background: var(--brand-orange); color: var(--white); transform: translateY(-1px); }

.search-overlay {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, rgba(58, 72, 137, 0.97) 0%, rgba(199, 123, 15, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 80px 20px 20px;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-inner { width: 100%; max-width: 720px; position: relative; }
.search-close {
    position: absolute; top: -50px; left: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer;
    transition: var(--transition);
}
.search-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

/* ─── Reading Progress Bar ─── */
.reading-progress {
    position: fixed; top: 0; right: 0; left: 0;
    height: 3px; background: transparent;
    z-index: 100; pointer-events: none;
}
.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    width: 0%; transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(234,144,21,0.5);
}

/* ─── Skeleton loading ─── */
@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.skeleton {
    background: linear-gradient(90deg, var(--border-light) 0%, var(--bg-soft) 50%, var(--border-light) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Print ─── */
@media print {
    .site-header, .site-footer, .wa-float { display: none; }
    body { background: white; color: black; }
}
