/* =====================================================================
   ارتقاء — نظام التصميم
   ===================================================================== */

:root {
    --ink-900: #0B1A2A;
    --ink-800: #10243A;
    --ink-700: #1B3450;
    --text: #13243A;
    --muted: #5A6B80;
    --line: #E3E8ED;
    --line-strong: #D2DAE2;
    --bg: #F6F7F4;
    --bg-soft: #EEF3F1;
    --surface: #FFFFFF;

    --primary: #1E8ED3;
    --primary-600: #1879BA;
    --primary-700: #13629A;
    --primary-50: #E8F4FC;
    --primary-100: #CDE6F7;
    --accent: #F4B860;
    --accent-600: #E3A042;
    --accent-50: #FDF4E6;
    --coral: #E76F51;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #D97706;

    --font-display: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans Arabic', 'Alexandria', system-ui, sans-serif;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-xs: 0 1px 2px rgba(16, 36, 58, .06);
    --shadow-sm: 0 2px 8px rgba(16, 36, 58, .06), 0 1px 2px rgba(16, 36, 58, .04);
    --shadow-md: 0 12px 32px -12px rgba(16, 36, 58, .18), 0 2px 6px rgba(16, 36, 58, .05);
    --shadow-lg: 0 30px 60px -20px rgba(11, 26, 42, .35);
    --ring: 0 0 0 4px rgba(30, 142, 211, .18);

    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------- الأساسيات ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.35; margin: 0 0 .5em; color: var(--ink-900); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--primary-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-700); }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 820px; }
.hero-grid > *, .course-layout > *, .course-hero-grid > *, .player-layout > *, .dash-grid > *, .catalog > *, .about-grid > *, .faq-grid > *, .contact-grid > * { min-width: 0; }
.filters-close { display: none; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -60px; background: var(--ink-900); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 2000; }
.skip-link:focus { top: 1rem; color: #fff; }

.section { padding: 104px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head.start { margin-inline: 0; text-align: start; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.075rem; margin: 0; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head-row .section-head { margin: 0; }

.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-display); font-size: .82rem; font-weight: 600;
    color: var(--primary-600); background: var(--primary-50);
    padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------- الأزرار ---------------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--ink-900); --btn-bd: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .78rem 1.4rem; min-height: 46px;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1.2;
    background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
    border-radius: 12px; transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
    white-space: nowrap; text-align: center;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--primary); --btn-fg: #fff; box-shadow: 0 8px 20px -8px rgba(30, 142, 211, .7); }
.btn-primary:hover { --btn-bg: var(--primary-600); box-shadow: 0 12px 26px -10px rgba(30, 142, 211, .8); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: var(--ink-900); box-shadow: 0 8px 22px -10px rgba(227, 160, 66, .9); }
.btn-accent:hover { --btn-bg: var(--accent-600); }
.btn-dark { --btn-bg: var(--ink-900); --btn-fg: #fff; }
.btn-dark:hover { --btn-bg: var(--ink-700); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--ink-900); --btn-bd: var(--line-strong); }
.btn-outline:hover { --btn-bd: var(--primary); --btn-fg: var(--primary-700); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-900); }
.btn-ghost:hover { --btn-bg: var(--primary-50); --btn-fg: var(--primary-700); }
.btn-light { --btn-bg: rgba(255,255,255,.1); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.btn-light:hover { --btn-bg: rgba(255,255,255,.18); }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; }
.btn-lg { padding: 1rem 1.8rem; min-height: 54px; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { padding: .5rem .9rem; min-height: 38px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.link-arrow { font-family: var(--font-display); font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(-4px); }

/* ---------------- الهيدر ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 900;
    height: var(--header-h);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(227, 232, 237, .8);
    transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(11, 26, 42, .25); }
.site-header.is-transparent { position: fixed; inset-inline: 0; background: transparent; border-color: transparent; }
.site-header.is-transparent:not(.is-scrolled) .main-nav > a,
.site-header.is-transparent:not(.is-scrolled) .brand-text,
.site-header.is-transparent:not(.is-scrolled) .btn-ghost,
.site-header.is-transparent:not(.is-scrolled) .icon-btn,
.site-header.is-transparent:not(.is-scrolled) .user-menu summary { color: #fff; }
.site-header.is-transparent:not(.is-scrolled) .brand-text small { color: rgba(255,255,255,.65); }
.site-header.is-transparent:not(.is-scrolled) .btn-ghost:hover { background: rgba(255,255,255,.1); }
.site-header.is-transparent:not(.is-scrolled) .burger span { background: #fff; }
.site-header.is-transparent.is-scrolled { background: rgba(255,255,255,.9); border-color: rgba(227,232,237,.8); }

.nav-bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink-900); }
.brand:hover { color: var(--ink-900); }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; filter: drop-shadow(0 6px 12px rgba(30, 142, 211, .35)); }
.brand-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1; display: flex; flex-direction: column; gap: 5px; }
.brand-text small { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-text small { color: rgba(255,255,255,.55); }

.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav > a {
    font-family: var(--font-display); font-weight: 500; font-size: .95rem;
    color: var(--ink-800); padding: .55rem .9rem; border-radius: 10px; position: relative;
}
.main-nav > a:hover { color: var(--primary-600); }
.main-nav > a.is-active { color: var(--primary-600); }
.main-nav > a.is-active::after { content: ''; position: absolute; bottom: 2px; inset-inline: 40%; height: 3px; border-radius: 3px; background: var(--accent); }
.nav-mobile-auth { display: none; }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-800); font-size: 1.15rem; }
.icon-btn:hover { background: var(--primary-50); color: var(--primary-700); }
.dot-badge { position: absolute; top: 5px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--coral); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; padding: .3rem .4rem .3rem .7rem; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .92rem; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--primary-50); }
.user-menu-panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: 250px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: .5rem; z-index: 50; animation: pop .18s var(--ease);
}
.user-menu-head { padding: .7rem .8rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; display: flex; flex-direction: column; line-height: 1.5; }
.user-menu-head span { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-menu-panel a { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 10px; color: var(--ink-800); font-size: .92rem; }
.user-menu-panel a i { width: 18px; color: var(--muted); }
.user-menu-panel a:hover { background: var(--bg); }
.user-menu-panel a.danger, .user-menu-panel a.danger i { color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 22px; height: 2px; border-radius: 2px; background: var(--ink-900); transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- الأفاتار ---------------- */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 34px; height: 34px; font-size: .75rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.6rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 2.1rem; }
.avatar-initials {
    display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 700;
    color: hsl(var(--h) 55% 28%); background: hsl(var(--h) 60% 90%);
}

/* ---------------- الإشعارات المنبثقة ---------------- */
.toast-stack { position: fixed; top: calc(var(--header-h) + 14px); inset-inline-start: 50%; transform: translateX(50%); z-index: 1200; display: grid; gap: .6rem; width: min(520px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); border-inline-start: 4px solid var(--primary); animation: pop .25s var(--ease); font-weight: 500; }
.toast > i { font-size: 1.2rem; color: var(--primary); }
.toast span { flex: 1; }
.toast button { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); padding: 0 .3rem; }
.toast-success { border-inline-start-color: var(--success); } .toast-success > i { color: var(--success); }
.toast-error { border-inline-start-color: var(--danger); } .toast-error > i { color: var(--danger); }
.toast-warning { border-inline-start-color: var(--warning); } .toast-warning > i { color: var(--warning); }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: .3s; }

/* ---------------- الهيرو (الرئيسية) ---------------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    background: radial-gradient(1200px 600px at 85% -10%, rgba(53, 167, 226, .35), transparent 60%),
                radial-gradient(900px 500px at -10% 110%, rgba(244, 184, 96, .16), transparent 60%),
                linear-gradient(180deg, #0B1A2A 0%, #0D2236 100%);
    color: #fff;
    padding: calc(var(--header-h) + 72px) 0 120px;
}
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero::after { content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 80px; background: var(--bg); clip-path: ellipse(75% 100% at 50% 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem 1rem; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: .88rem; color: rgba(255,255,255,.88); margin-bottom: 1.6rem; }
.hero-badge b { background: var(--accent); color: var(--ink-900); padding: .15rem .65rem; border-radius: 999px; font-family: var(--font-display); font-size: .75rem; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 800; line-height: 1.22; letter-spacing: -.02em; margin-bottom: 1.4rem; }
.hero h1 .hl { background: linear-gradient(90deg, #F4B860, #8FD3F7); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; }
.hero-lead { font-size: 1.15rem; color: rgba(255,255,255,.75); max-width: 560px; margin-bottom: 2.2rem; }

.hero-search { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 18px; padding: .45rem; max-width: 560px; box-shadow: 0 25px 50px -20px rgba(0,0,0,.6); }
.hero-search i { color: var(--muted); padding-inline-start: .8rem; }
.hero-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: .7rem .2rem; background: transparent; color: var(--text); min-width: 0; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; align-items: center; font-size: .88rem; color: rgba(255,255,255,.6); }
.hero-tags a { color: rgba(255,255,255,.85); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; }
.hero-tags a:hover { background: rgba(255,255,255,.14); color: #fff; }

.hero-trust { display: flex; align-items: center; gap: 1.6rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-trust-item { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.8); font-size: .9rem; }
.hero-trust-item i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--accent); font-size: 1rem; }

/* التكوين البصري للهيرو */
.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 540px; margin-inline: auto; width: 100%; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255,255,255,.14); }
.orbit-2 { inset: 13%; border-style: solid; border-color: rgba(255,255,255,.08); }
.orbit-3 { inset: 27%; border-color: rgba(127, 224, 214, .25); background: radial-gradient(circle, rgba(53, 167, 226,.35), transparent 70%); }
.orbit-spin { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.orbit-chip { position: absolute; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); animation: spin 60s linear infinite reverse; }
.orbit-chip:nth-child(1) { top: -28px; inset-inline-start: calc(50% - 28px); background: linear-gradient(135deg, #35A7E2, #145E91); }
.orbit-chip:nth-child(2) { top: calc(50% - 28px); inset-inline-end: -28px; background: linear-gradient(135deg, #E76F51, #B4472E); }
.orbit-chip:nth-child(3) { bottom: -28px; inset-inline-start: calc(50% - 28px); background: linear-gradient(135deg, #6C5CE7, #4834C4); }
.orbit-chip:nth-child(4) { top: calc(50% - 28px); inset-inline-start: -28px; background: linear-gradient(135deg, #F4B860, #D68C1E); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-core { position: absolute; inset: 34%; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.hero-core img { width: 46%; filter: drop-shadow(0 20px 30px rgba(0,0,0,.4)); }

.float-card { position: absolute; background: rgba(255,255,255,.97); color: var(--text); border-radius: 18px; padding: .9rem 1rem; box-shadow: 0 25px 50px -15px rgba(0,0,0,.5); display: flex; align-items: center; gap: .8rem; animation: bob 6s ease-in-out infinite; }
.float-card .fc-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.float-card strong { font-family: var(--font-display); font-size: .92rem; display: block; line-height: 1.4; }
.float-card span { font-size: .78rem; color: var(--muted); }
.fc-progress { top: 8%; inset-inline-start: -4%; animation-delay: -2s; min-width: 220px; }
.fc-progress .bar { height: 7px; border-radius: 7px; background: var(--primary-50); margin-top: .45rem; overflow: hidden; }
.fc-progress .bar i { display: block; height: 100%; width: 78%; background: linear-gradient(90deg, var(--primary), #8FD3F7); border-radius: inherit; }
.fc-audio { bottom: 12%; inset-inline-end: -6%; }
.fc-rating { bottom: -2%; inset-inline-start: 6%; animation-delay: -4s; }
.fc-rating .stars { font-size: .75rem; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* الهيرو بلوجو الأكاديمية */
.hero-visual-logo { aspect-ratio: auto; max-width: 600px; padding: 36px 0 44px; }
.hero-visual-logo::before { content: ''; position: absolute; inset: 8% 4%; background: radial-gradient(circle, rgba(53, 167, 226, .55), transparent 65%); filter: blur(30px); z-index: 0; }
.hero-logo-frame { position: relative; z-index: 1; border-radius: 30px; overflow: hidden; box-shadow: 0 45px 90px -30px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.14); transform: perspective(1200px) rotateY(7deg) rotateX(2deg); transition: transform .7s var(--ease); }
.hero-visual-logo:hover .hero-logo-frame { transform: perspective(1200px) rotateY(0) rotateX(0); }
.hero-logo-frame img { width: 100%; height: auto; display: block; }
.hero-photo-frame { max-width: 500px; margin-inline: auto; aspect-ratio: 1 / 1; border-radius: 36px; box-shadow: 0 45px 90px -30px rgba(0,0,0,.75), 0 0 0 6px rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.18); }
.hero-photo-frame img { height: 100%; object-fit: cover; object-position: center top; }
.hero-visual-logo .float-card { z-index: 2; }
.hero-visual-logo .fc-progress { top: 0; inset-inline-start: -7%; }
.hero-visual-logo .fc-audio { bottom: -6px; inset-inline-end: -5%; }
.hero-visual-logo .fc-rating { display: none; }

/* البرنامج: المستويات والجوانب */
.program-sub { color: var(--primary); display: block; font-size: .62em; margin-top: .25rem; }
.level-tablist { display: grid; grid-template-columns: repeat(var(--levels, 3), 1fr); gap: 14px; margin-bottom: 28px; }
.level-tab { display: flex; gap: .9rem; align-items: center; text-align: start; padding: 18px 20px; border-radius: var(--radius-lg); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s, transform .2s, background .3s; }
.level-tab:hover { border-color: var(--primary-100); transform: translateY(-2px); }
.level-tab b { font-family: var(--font-display); font-size: 1.08rem; display: block; color: var(--ink-900); line-height: 1.4; }
.level-tab small { color: var(--muted); font-size: .82rem; display: block; line-height: 1.6; margin-top: .2rem; }
.level-num { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; flex-shrink: 0; }
.level-tab.is-active { border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--primary-700)); box-shadow: 0 18px 36px -16px rgba(30, 142, 211, .8); }
.level-tab.is-active b, .level-tab.is-active small { color: #fff; }
.level-tab.is-active small { opacity: .85; }
.level-tab.is-active .level-num { background: rgba(255,255,255,.18); color: #fff; }
.level-panel { display: none; }
.level-panel.is-active { display: block; animation: pop .35s var(--ease); }
.aspect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* عن الأكاديمية: صورة اللوجو */
.about-visual.about-visual-logo { padding: 0; min-height: 0; background: none; box-shadow: var(--shadow-lg); display: block; }
.about-visual.about-visual-logo::before { display: none; }
.about-visual-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ---------------- شريط الإحصائيات ---------------- */
.stats-band { margin-top: -56px; position: relative; z-index: 5; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); overflow: hidden; }
.stat { padding: 28px 24px; display: flex; align-items: center; gap: 1rem; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.3rem; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.stat:nth-child(2) .stat-icon { background: var(--accent-50); color: var(--accent-600); }
.stat:nth-child(3) .stat-icon { background: #FDECE7; color: var(--coral); }
.stat:nth-child(4) .stat-icon { background: #EEEBFD; color: #6C5CE7; }
.stat strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; display: block; line-height: 1.1; color: var(--ink-900); }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------------- بطاقات المجالات ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
    --c: var(--primary);
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .4rem;
    padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
    color: var(--text); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.cat-card::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--c); opacity: .06; inset-inline-end: -50px; bottom: -70px; transition: transform .4s var(--ease), opacity .3s; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; color: var(--text); }
.cat-card:hover::after { transform: scale(1.6); opacity: .1; }
.cat-icon { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: var(--c); margin-bottom: .8rem; box-shadow: 0 12px 22px -12px var(--c); }
.cat-card h3 { font-size: 1.08rem; margin: 0; }
.cat-card p { font-size: .88rem; color: var(--muted); margin: 0; line-height: 1.7; }
.cat-count { margin-top: .6rem; font-family: var(--font-display); font-size: .8rem; font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: .35rem; }

/* ---------------- بطاقة الدورة ---------------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course-card {
    display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg);
    border: 1px solid var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; position: relative;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.course-card .cover { aspect-ratio: 16 / 9.5; }
.course-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.course-meta-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-display); font-size: .74rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--primary-50); color: var(--primary-700); white-space: nowrap; }
.badge-cat { background: color-mix(in srgb, var(--c, var(--primary)) 12%, white); color: color-mix(in srgb, var(--c, var(--primary)) 85%, black); }
.badge-level { background: var(--bg); color: var(--muted); }
.badge-accent { background: var(--accent); color: var(--ink-900); }
.badge-free { background: #DCFCE7; color: #166534; }
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-muted { background: var(--bg); color: var(--muted); }
.course-card h3 { font-size: 1.12rem; line-height: 1.55; margin-bottom: .4rem; }
.course-card h3 a { color: var(--ink-900); }
.course-card h3 a::after { content: ''; position: absolute; inset: 0; }
.course-card h3 a:hover { color: var(--primary-700); }
.course-card .subtitle { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-instructor { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ink-800); margin-bottom: 1rem; }
.course-stats { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); flex-wrap: wrap; margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line); }
.course-stats span { display: inline-flex; align-items: center; gap: .35rem; }
.course-stats i { color: var(--primary); }
.course-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.cover-flag { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; }

.price { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-900); }
.price-free { color: var(--success); }
.price-old { color: var(--muted); font-size: .88rem; margin-inline-start: .3rem; }
.rating-num { font-family: var(--font-display); color: var(--ink-900); }
.stars { color: #F2A93B; display: inline-flex; gap: 2px; font-size: .82rem; }

/* غلاف تجريدي للدورة */
.cover { position: relative; overflow: hidden; background: var(--c); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-art {
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.28), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(0,0,0,.25), transparent 50%),
        linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0B1A2A));
}
.cover-art i { font-size: 3.2rem; color: rgba(255,255,255,.95); filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); position: relative; z-index: 1; transition: transform .4s var(--ease); }
.course-card:hover .cover-art i { transform: scale(1.08) rotate(-4deg); }
.cover-ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); }
.cover-ring.r1 { width: 46%; aspect-ratio: 1; }
.cover-ring.r2 { width: 72%; aspect-ratio: 1; border-style: dashed; border-color: rgba(255,255,255,.14); }

/* ---------------- كيف تعمل المنصة ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; position: relative; }
.step { position: relative; padding: 34px 28px 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: '0' counter(step); position: absolute; top: 22px; inset-inline-end: 26px; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--primary-50); line-height: 1; }
.step-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 1.4rem; background: var(--ink-900); color: var(--accent); margin-bottom: 1.2rem; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------------- من نحن ---------------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about-visual { position: relative; border-radius: var(--radius-xl); background: linear-gradient(160deg, var(--ink-900), #123553); padding: 40px; color: #fff; overflow: hidden; min-height: 460px; display: flex; flex-direction: column; justify-content: flex-end; }
.about-visual::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(53, 167, 226,.55), transparent 65%); top: -120px; inset-inline-end: -120px; }
.about-visual blockquote { position: relative; margin: 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.7; font-weight: 600; }
.about-visual blockquote::before { content: '\201D'; font-size: 6rem; line-height: .6; display: block; color: var(--accent); opacity: .9; margin-bottom: .5rem; font-family: Georgia, serif; }
.about-visual cite { display: block; margin-top: 1.2rem; font-style: normal; color: rgba(255,255,255,.65); font-size: .92rem; font-family: var(--font-body); }
.about-pill { position: absolute; top: 34px; inset-inline-start: 34px; display: flex; gap: .6rem; flex-wrap: wrap; }
.about-pill span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: .35rem .85rem; border-radius: 999px; font-size: .82rem; }
.check-list { list-style: none; display: grid; gap: 1rem; margin: 1.8rem 0 2.2rem; }
.check-list li { display: flex; gap: .9rem; align-items: flex-start; }
.check-list li i { width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: .85rem; margin-top: .15rem; }
.check-list strong { display: block; font-family: var(--font-display); color: var(--ink-900); font-size: 1rem; }
.check-list span { color: var(--muted); font-size: .92rem; }

/* ---------------- الأخصائيون ---------------- */
.instructor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.instructor-card { text-align: center; padding: 34px 24px 28px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; color: var(--text); display: block; }
.instructor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: var(--text); }
.instructor-card .avatar { margin: 0 auto 1.1rem; box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--line); }
.instructor-card h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.instructor-card .role { color: var(--primary-600); font-size: .86rem; font-weight: 500; }
.instructor-card .meta { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--muted); }

.instructor-feature { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 48px; position: relative; overflow: hidden; }
.instructor-feature::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(30, 142, 211,.1), transparent 70%); inset-inline-start: -120px; top: -120px; }
.instructor-feature-media { position: relative; display: grid; place-items: center; }
.instructor-feature-media::before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; border: 1.5px dashed var(--primary-100); }
.avatar-hero { width: 240px; height: 240px; font-size: 3.6rem; box-shadow: 0 0 0 10px var(--primary-50), var(--shadow-md); position: relative; }
.instructor-feature h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: .2rem; }
.instructor-feature .role { color: var(--primary-600); font-family: var(--font-display); font-weight: 600; margin-bottom: 1rem; }
.instructor-feature-meta { display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); font-size: .92rem; margin: 1.2rem 0 1.6rem; }
.instructor-feature-meta i { color: var(--primary); }
.fc-progress .avatar { width: 44px; height: 44px; font-size: .85rem; }

/* ---------------- آراء المتدربين ---------------- */
.testimonials { background: var(--ink-900); color: #fff; overflow: hidden; }
.testimonials .section-head h2 { color: #fff; }
.testimonials .section-head p { color: rgba(255,255,255,.65); }
.testimonials .eyebrow { background: rgba(244,184,96,.14); color: var(--accent); }
.t-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; }
.t-track::-webkit-scrollbar { display: none; }
.t-card { scroll-snap-align: start; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; gap: 1.2rem; }
.t-card p { margin: 0; color: rgba(255,255,255,.85); font-size: 1rem; line-height: 1.9; flex: 1; }
.t-person { display: flex; align-items: center; gap: .8rem; }
.t-person strong { display: block; font-family: var(--font-display); font-size: .95rem; }
.t-person span { font-size: .8rem; color: rgba(255,255,255,.55); }
.t-nav { display: flex; gap: .6rem; }
.t-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; transition: background .2s; }
.t-nav button:hover { background: rgba(255,255,255,.1); }
.testimonials .section-head-row .section-head { text-align: start; }

/* ---------------- الأسئلة الشائعة ---------------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: var(--primary-100); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-display); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '\2b'; font-family: 'Font Awesome 6 Free'; font-weight: 900; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--primary); flex-shrink: 0; transition: transform .25s, background .2s; font-size: .8rem; }
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--muted); }
.help-card { margin-top: 2rem; padding: 26px; border-radius: var(--radius-lg); background: var(--primary-50); border: 1px solid var(--primary-100); }
.help-card h4 { margin-bottom: .3rem; }
.help-card p { color: var(--muted); font-size: .92rem; }

/* ---------------- دعوة لاتخاذ إجراء ---------------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 64px; color: #fff; background: radial-gradient(600px 300px at 0% 0%, rgba(244,184,96,.35), transparent 60%), linear-gradient(135deg, #1E8ED3, #0F4C7A 60%, #0B1A2A); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta-band::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 50px solid rgba(255,255,255,.05); inset-inline-end: -100px; top: -140px; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255,255,255,.8); margin: 0; font-size: 1.05rem; }
.cta-actions { display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------------- الفوتر ---------------- */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.7); padding: 64px 0 0; margin-top: 0; }
.crisis-strip { display: flex; gap: 1.1rem; align-items: flex-start; padding: 22px 26px; border-radius: var(--radius-lg); background: rgba(231, 111, 81, .1); border: 1px solid rgba(231, 111, 81, .3); margin-bottom: 56px; }
.crisis-strip strong { color: #fff; font-family: var(--font-display); display: block; margin-bottom: .2rem; }
.crisis-strip p { margin: 0; font-size: .92rem; }
.crisis-strip a { color: var(--accent); font-weight: 700; }
.crisis-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--coral); color: #fff; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 48px; padding-bottom: 48px; }
.footer-about p { margin: 1.2rem 0 1.4rem; font-size: .93rem; line-height: 1.9; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1.2rem; }
.site-footer ul { list-style: none; display: grid; gap: .65rem; }
.site-footer ul a { color: rgba(255,255,255,.7); font-size: .93rem; }
.site-footer ul a:hover { color: var(--accent); }
.socials { display: flex; gap: .5rem; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #fff; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-note { font-size: .88rem; margin-bottom: 1rem; }
.newsletter { display: flex; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 5px; margin-bottom: 1.2rem; }
.newsletter input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; padding: .55rem .8rem; font: inherit; font-size: .9rem; min-width: 0; }
.newsletter input::placeholder { color: rgba(255,255,255,.45); }
.newsletter button { width: 44px; height: 42px; border: 0; border-radius: 10px; background: var(--accent); color: var(--ink-900); }
.contact-list li { display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.contact-list i { color: var(--accent); width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.footer-bottom .fa-heart { color: var(--coral); }

.wa-float { position: fixed; bottom: 22px; inset-inline-start: 22px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 14px 30px -8px rgba(37, 211, 102, .6); z-index: 800; transition: transform .2s; }
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* ---------------- رأس الصفحات الداخلية ---------------- */
.page-hero { background: radial-gradient(800px 300px at 90% 0%, rgba(53, 167, 226,.35), transparent 60%), linear-gradient(180deg, #0B1A2A, #0F2639); color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.72); margin: 0; max-width: 640px; font-size: 1.05rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: rgba(255,255,255,.55); margin-bottom: 1rem; list-style: none; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li + li::before { content: '\f104'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-inline-end: .5rem; font-size: .7rem; opacity: .6; }

/* ---------------- صفحة الدورات ---------------- */
.catalog { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: start; padding: 48px 0 96px; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.filters h3 { font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; }
.filter-group { padding: 18px 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: 0; padding-top: 6px; }
.filter-group h4 { font-size: .9rem; margin-bottom: .8rem; color: var(--ink-800); }
.filter-options { display: grid; gap: .25rem; }
.filter-option { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .7rem; border-radius: 10px; color: var(--ink-800); font-size: .92rem; }
.filter-option:hover { background: var(--bg); color: var(--ink-900); }
.filter-option.is-active { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.filter-option .count { font-size: .75rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .05rem .55rem; }
.filter-option.is-active .count { background: #fff; color: var(--primary-700); }
.filter-option .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; margin-inline-end: .5rem; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 24px; flex-wrap: wrap; }
.catalog-toolbar .result-count { color: var(--muted); }
.catalog-toolbar .result-count b { color: var(--ink-900); font-family: var(--font-display); }
.toolbar-right { display: flex; gap: .6rem; align-items: center; }
.search-inline { display: flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 .4rem 0 .9rem; height: 46px; }
.search-inline input { border: 0; outline: 0; background: transparent; font: inherit; min-width: 0; width: 200px; }
.search-inline:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.search-inline button { border: 0; background: transparent; color: var(--muted); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .5rem .35rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--ink-800); }
.chip a { color: var(--muted); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; }
.chip a:hover { background: var(--bg); color: var(--danger); }
.filters-toggle { display: none; }

.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 .8rem; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-800); font-family: var(--font-display); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary-700); }
.pagination .is-current { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }

/* ---------------- النماذج ---------------- */
.field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.field label, .field-label { font-family: var(--font-display); font-weight: 500; font-size: .9rem; color: var(--ink-800); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea {
    width: 100%; font: inherit; font-size: .97rem; color: var(--text);
    background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px;
    padding: .8rem 1rem; transition: border-color .2s, box-shadow .2s; min-height: 50px;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: var(--ring); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%235A6B80' stroke-width='1.8' stroke-linecap='round' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 1rem center; padding-inline-end: 1rem; padding-inline-start: 2.5rem; }
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 1rem; color: var(--muted); pointer-events: none; transition: color .2s; }
.input-wrap .input { padding-inline-start: 2.8rem; }
.input-wrap:focus-within > i { color: var(--primary); }
.input-wrap .toggle-pass { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: .5rem; border: 0; background: none; color: var(--muted); width: 38px; height: 38px; border-radius: 10px; }
.input-wrap .toggle-pass:hover { background: var(--bg); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-error { display: flex; gap: .6rem; align-items: flex-start; background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.2rem; font-size: .92rem; }
.form-error ul { margin: 0; padding-inline-start: 1rem; }
.form-success { display: flex; gap: .6rem; align-items: center; background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.2rem; }
.checkbox { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; cursor: pointer; user-select: none; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }
.pass-meter { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; margin-top: .2rem; }
.pass-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }

/* صفحات المصادقة */
.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; background: radial-gradient(700px 400px at 100% 0%, rgba(53, 167, 226,.5), transparent 60%), radial-gradient(500px 400px at 0% 100%, rgba(244,184,96,.2), transparent 60%), #0B1A2A; color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; }
.auth-side p { color: rgba(255,255,255,.72); font-size: 1.05rem; max-width: 460px; }
.auth-side .check-list strong { color: #fff; }
.auth-side .check-list span { color: rgba(255,255,255,.6); }
.auth-side .check-list li i { background: rgba(255,255,255,.08); color: var(--accent); }
.auth-quote { margin-top: auto; padding: 22px; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: .95rem; color: rgba(255,255,255,.8); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: .3rem; }
.auth-card > p { color: var(--muted); margin-bottom: 2rem; }
.auth-foot { text-align: center; margin-top: 1.6rem; color: var(--muted); font-size: .93rem; }
.auth-foot a { font-weight: 600; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .85rem; margin: 1.4rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------------- صفحة الدورة ---------------- */
.course-hero { background: radial-gradient(900px 400px at 100% 0%, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%), linear-gradient(180deg, #0B1A2A, #0F2639); color: #fff; padding: 48px 0 72px; }
.course-hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; }
.course-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.course-hero .lead { color: rgba(255,255,255,.78); font-size: 1.12rem; margin-bottom: 1.4rem; }
.course-hero .badge-cat { background: rgba(255,255,255,.1); color: #fff; }
.course-hero-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; color: rgba(255,255,255,.78); font-size: .92rem; }
.course-hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.course-hero-meta i { color: var(--accent); }
.course-hero-meta .rating-num { color: #fff; }
.course-hero .instructor-line { display: flex; align-items: center; gap: .7rem; margin-top: 1.4rem; }
.course-hero .instructor-line a { color: #fff; font-weight: 600; }
.course-hero .instructor-line small { display: block; color: rgba(255,255,255,.6); }

.course-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; padding-bottom: 96px; }
.buy-card { position: sticky; top: calc(var(--header-h) + 20px); margin-top: -300px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; z-index: 5; }
.buy-card .cover { aspect-ratio: 16/9.5; }
.buy-card .media-frame { border-radius: 0; }
.buy-card-body { padding: 24px; }
.buy-price { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.buy-price .price { font-size: 2rem; }
.buy-price .save { font-size: .8rem; font-weight: 700; color: var(--coral); background: #FDECE7; padding: .15rem .6rem; border-radius: 999px; }
.buy-card .btn + .btn, .buy-card form + .btn, .buy-card .btn + form { margin-top: .6rem; }
.buy-includes { list-style: none; display: grid; gap: .6rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; }
.buy-includes li { display: flex; gap: .7rem; align-items: center; }
.buy-includes i { color: var(--primary); width: 18px; text-align: center; }
.notice { display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: 12px; font-size: .88rem; margin-bottom: 1rem; line-height: 1.7; }
.notice i { margin-top: .25rem; }
.notice-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.notice-info { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100); }
.notice-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #5BBCEB); border-radius: inherit; transition: width .6s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }

.content-tabs { position: sticky; top: var(--header-h); z-index: 4; background: var(--bg); display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 32px; overflow-x: auto; scrollbar-width: none; }
.content-tabs a { padding: 1rem 1.1rem; font-family: var(--font-display); font-weight: 600; font-size: .93rem; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.content-tabs a:hover, .content-tabs a.is-active { color: var(--ink-900); border-color: var(--primary); }
.content-block { margin-bottom: 48px; }
.content-block > h2 { font-size: 1.45rem; margin-bottom: 1.2rem; }
.learn-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.learn-grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.6rem; }
.learn-grid li { display: flex; gap: .7rem; font-size: .95rem; }
.learn-grid i { color: var(--primary); margin-top: .35rem; }
.prose { font-size: 1.02rem; color: var(--ink-800); line-height: 1.95; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; margin-bottom: 1em; display: grid; gap: .4rem; }
.prose blockquote { margin: 1.2em 0; padding: 1rem 1.2rem; border-inline-start: 4px solid var(--accent); background: var(--accent-50); border-radius: 0 12px 12px 0; }
.dot-list { list-style: none; display: grid; gap: .6rem; }
.dot-list li { display: flex; gap: .7rem; }
.dot-list li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: .65rem; flex-shrink: 0; }

.curriculum-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.curriculum { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.curriculum details + details { border-top: 1px solid var(--line); }
.curriculum summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; gap: .8rem; background: #FAFBFA; font-family: var(--font-display); font-weight: 600; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary::before { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; transition: transform .25s; color: var(--muted); }
.curriculum details[open] summary::before { transform: rotate(180deg); }
.curriculum summary .sec-meta { margin-inline-start: auto; font-family: var(--font-body); font-weight: 400; font-size: .82rem; color: var(--muted); }
.lesson-row { display: flex; align-items: center; gap: .9rem; padding: 14px 22px; font-size: .94rem; color: var(--ink-800); border-top: 1px dashed var(--line); }
.lesson-row:first-of-type { border-top: 0; }
a.lesson-row:hover { background: var(--bg); color: var(--ink-900); }
.lesson-row .l-icon { color: var(--muted); width: 20px; text-align: center; }
.lesson-row .l-title { flex: 1; }
.lesson-row .l-dur { color: var(--muted); font-size: .82rem; }
.lesson-row .l-lock { color: var(--line-strong); }
.lesson-row .l-preview { font-size: .75rem; color: var(--primary-700); background: var(--primary-50); padding: .15rem .6rem; border-radius: 999px; font-weight: 600; }
.lesson-row.is-done .l-icon { color: var(--success); }

.instructor-box { display: flex; gap: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.instructor-box h3 { margin-bottom: .1rem; font-size: 1.2rem; }
.instructor-box .role { color: var(--primary-600); font-size: .9rem; margin-bottom: .8rem; display: block; }
.instructor-box p { color: var(--muted); font-size: .95rem; margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag-list span { font-size: .78rem; padding: .25rem .7rem; border-radius: 999px; background: var(--bg); color: var(--ink-800); border: 1px solid var(--line); }

.reviews-summary { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 20px; }
.reviews-score { text-align: center; }
.reviews-score strong { font-family: var(--font-display); font-size: 3rem; line-height: 1; display: block; color: var(--ink-900); }
.reviews-score .stars { font-size: 1rem; margin: .5rem 0 .2rem; }
.bars { display: grid; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: 50px 1fr 36px; gap: .7rem; align-items: center; font-size: .82rem; color: var(--muted); }
.bar-row .progress { height: 7px; }
.bar-row .progress > i { background: #F2A93B; }
.review { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; }
.review strong { font-family: var(--font-display); }
.review time { font-size: .8rem; color: var(--muted); margin-inline-start: .5rem; }
.review p { margin: .5rem 0 0; color: var(--ink-800); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.star-input input { display: none; }
.star-input label { font-size: 1.6rem; color: var(--line-strong); cursor: pointer; transition: color .15s, transform .15s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #F2A93B; }
.star-input label:hover { transform: scale(1.15); }

.media-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-lg); overflow: hidden; }
.media-frame iframe, .media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.8); background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, #1E8ED3) 60%, transparent), transparent 60%), #0B1A2A; padding: 24px; }
.media-placeholder i { font-size: 3.4rem; color: #fff; margin-bottom: .8rem; opacity: .9; }
.media-placeholder p { margin: 0; font-size: .95rem; }

/* ---------------- مشغل الدروس ---------------- */
.player-page { background: var(--bg); }
.player-top { background: var(--ink-900); color: #fff; }
.player-top .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 14px; }
.player-top a { color: rgba(255,255,255,.8); }
.player-top a:hover { color: #fff; }
.player-top .course-name { font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-top .mini-progress { display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: rgba(255,255,255,.75); white-space: nowrap; }
.player-top .mini-progress .progress { width: 140px; background: rgba(255,255,255,.12); }
.player-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; padding-block: 28px 80px; align-items: start; }
.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 24px 0 8px; flex-wrap: wrap; }
.lesson-head h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: .3rem; }
.lesson-head .meta { color: var(--muted); font-size: .88rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.lesson-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.lesson-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; margin-top: 20px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 24px; }
.lesson-nav a { flex: 1; max-width: 48%; display: flex; flex-direction: column; gap: .2rem; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink-900); }
.lesson-nav a:hover { border-color: var(--primary); }
.lesson-nav a small { color: var(--muted); font-size: .8rem; }
.lesson-nav a strong { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.lesson-nav .next { margin-inline-start: auto; text-align: end; }
.audio-card { padding: 40px 32px; border-radius: var(--radius-lg); background: radial-gradient(circle at 20% 20%, rgba(53, 167, 226,.4), transparent 60%), var(--ink-900); color: #fff; text-align: center; }
.audio-card i.big { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.audio-card audio { width: 100%; margin-top: 1.2rem; }
.sidebar-panel { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; max-height: calc(100vh - var(--header-h) - 32px); display: flex; flex-direction: column; }
.sidebar-panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.sidebar-panel-head h3 { font-size: 1rem; margin-bottom: .8rem; }
.sidebar-panel .curriculum { border: 0; border-radius: 0; overflow-y: auto; }
.sidebar-panel .lesson-row { padding: 12px 20px; font-size: .9rem; }
.lesson-row.is-current { background: var(--primary-50); color: var(--primary-700); font-weight: 600; box-shadow: inset -4px 0 0 var(--primary); }
.lesson-row.is-current .l-icon { color: var(--primary); }
.quiz-link-row { display: flex; align-items: center; gap: .8rem; padding: 12px 20px; font-size: .9rem; border-top: 1px dashed var(--line); color: #6C5CE7; font-weight: 600; }
.quiz-link-row:hover { background: #F4F2FE; color: #4834C4; }

/* ---------------- الاختبارات ---------------- */
.quiz-wrap { max-width: 820px; margin: 0 auto; padding: 48px 24px 96px; }
.quiz-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px; display: flex; gap: 1.2rem; align-items: center; }
.quiz-head .qh-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #EEEBFD; color: #6C5CE7; font-size: 1.6rem; flex-shrink: 0; }
.quiz-head h1 { font-size: 1.5rem; margin-bottom: .2rem; }
.question-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 18px; }
.question-card h3 { font-size: 1.08rem; display: flex; gap: .8rem; line-height: 1.7; }
.question-card h3 .qn { width: 32px; height: 32px; border-radius: 10px; background: var(--ink-900); color: #fff; display: grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.options { display: grid; gap: .6rem; margin-top: 1rem; }
.option { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.option:hover { border-color: var(--primary-100); background: #F8FBFE; }
.option input { width: 18px; height: 18px; accent-color: var(--primary); }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.option.is-correct { border-color: #86EFAC; background: #F0FDF4; }
.option.is-wrong { border-color: #FCA5A5; background: #FEF2F2; }
.option .o-mark { margin-inline-start: auto; }
.option.is-correct .o-mark { color: var(--success); }
.option.is-wrong .o-mark { color: var(--danger); }
.explanation { margin-top: 1rem; padding: .9rem 1rem; border-radius: 12px; background: var(--bg); font-size: .92rem; color: var(--ink-800); display: flex; gap: .6rem; }
.explanation i { color: var(--accent-600); margin-top: .3rem; }
.result-card { text-align: center; padding: 40px 28px; border-radius: var(--radius-xl); color: #fff; margin-bottom: 28px; background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.18), transparent 50%), linear-gradient(135deg, var(--primary), #0F4C7A); }
.result-card.failed { background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.15), transparent 50%), linear-gradient(135deg, #B4472E, #6B2A1C); }
.result-card h2 { color: #fff; margin-bottom: .3rem; }
.result-ring { --p: 0; width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 1.2rem; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.15) 0); }
.result-ring span { width: 112px; height: 112px; border-radius: 50%; background: rgba(11,26,42,.55); display: grid; place-items: center; font-family: var(--font-display); font-size: 2rem; font-weight: 800; }

/* ---------------- لوحة الطالب ---------------- */
.dash-hero { background: radial-gradient(700px 300px at 100% 0%, rgba(53, 167, 226,.4), transparent 60%), linear-gradient(180deg, #0B1A2A, #0F2639); color: #fff; padding: 44px 0 110px; }
.dash-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3rem; }
.dash-hero p { color: rgba(255,255,255,.7); margin: 0; }
.dash-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.dash-body { margin-top: -72px; padding-bottom: 96px; position: relative; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.dash-stat { background: var(--surface); border-radius: var(--radius-lg); padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; gap: 1rem; align-items: center; }
.dash-stat .stat-icon { width: 50px; height: 50px; }
.dash-stat strong { font-family: var(--font-display); font-size: 1.6rem; display: block; line-height: 1.1; color: var(--ink-900); }
.dash-stat span { font-size: .85rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.panel-head h2 { font-size: 1.2rem; margin: 0; }
.continue-card { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.continue-card .cover { border-radius: var(--radius); aspect-ratio: 16/10; }
.continue-card .cover-art i { font-size: 2.4rem; }
.continue-card h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.my-course { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.my-course:first-child { border-top: 0; padding-top: 0; }
.my-course .cover { border-radius: 14px; aspect-ratio: 1; }
.my-course .cover-art i { font-size: 1.5rem; }
.my-course .cover-ring { display: none; }
.my-course h3 { font-size: 1rem; margin-bottom: .2rem; }
.my-course h3 a { color: var(--ink-900); }
.my-course .progress { margin-top: .5rem; max-width: 360px; }
.my-course small { color: var(--muted); font-size: .8rem; }
.notif { display: flex; gap: .8rem; padding: 12px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.notif:first-child { border-top: 0; padding-top: 0; }
.notif i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.notif.is-unread strong::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); margin-inline-start: .4rem; vertical-align: middle; }
.notif p { margin: 0; color: var(--muted); font-size: .85rem; }
.notif time { font-size: .75rem; color: var(--muted); }
.cert-item { display: flex; align-items: center; gap: .8rem; padding: 12px 0; border-top: 1px solid var(--line); }
.cert-item:first-child { border-top: 0; padding-top: 0; }
.cert-item i { color: var(--accent-600); font-size: 1.3rem; }
.cert-item div { flex: 1; font-size: .9rem; line-height: 1.5; }
.cert-item small { color: var(--muted); }
.mini-list { list-style: none; display: grid; gap: .8rem; }
.mini-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }

/* ---------------- حالة فارغة ---------------- */
.empty-state { text-align: center; padding: 56px 24px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-state .empty-icon, .empty-page .empty-icon { width: 80px; height: 80px; border-radius: 24px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1.2rem; }
.empty-state h3 { margin-bottom: .3rem; }
.empty-state p { color: var(--muted); }
.empty-page { padding: 120px 0; }

/* ---------------- صفحة التواصل ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; padding: 56px 0 96px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: flex; gap: 1rem; align-items: center; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text); }
a.contact-card:hover { border-color: var(--primary); color: var(--text); }
.contact-card .stat-icon { width: 52px; height: 52px; }
.contact-card strong { display: block; font-family: var(--font-display); }
.contact-card span { color: var(--muted); font-size: .9rem; }

/* ---------------- الشهادة ---------------- */
.cert-wrap { padding: 48px 24px 96px; }
.certificate { max-width: 1000px; margin: 0 auto; aspect-ratio: 1.414 / 1; background: #fff; position: relative; padding: 5%; box-shadow: var(--shadow-lg); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.certificate::before { content: ''; position: absolute; inset: 18px; border: 2px solid var(--primary); border-radius: 4px; }
.certificate::after { content: ''; position: absolute; inset: 26px; border: 1px solid var(--accent); border-radius: 2px; }
.cert-corner { position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(30, 142, 211,.14), transparent 70%); }
.cert-corner.a { top: -120px; inset-inline-end: -120px; }
.cert-corner.b { bottom: -120px; inset-inline-start: -120px; background: radial-gradient(circle, rgba(244,184,96,.2), transparent 70%); }
.certificate > :not(.cert-corner) { position: relative; z-index: 1; }
.certificate .brand { margin-bottom: 1.5rem; }
.cert-title { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 800; color: var(--ink-900); margin-bottom: .2rem; }
.cert-sub { color: var(--muted); font-size: clamp(.85rem, 1.4vw, 1rem); }
.cert-name { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 3rem); color: var(--primary-700); font-weight: 800; margin: .6rem 0; padding: 0 2rem .4rem; border-bottom: 2px solid var(--accent); }
.cert-course { font-family: var(--font-display); font-size: clamp(1rem, 2.2vw, 1.6rem); color: var(--ink-900); font-weight: 700; margin: .4rem 0 1.4rem; }
.cert-foot { display: flex; justify-content: space-between; width: 80%; margin-top: 1.5rem; font-size: clamp(.7rem, 1.2vw, .9rem); color: var(--muted); }
.cert-foot strong { display: block; color: var(--ink-900); font-family: var(--font-display); }
.cert-actions { display: flex; justify-content: center; gap: .6rem; margin-top: 28px; flex-wrap: wrap; }

/* ---------------- الحركة ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------------- التجاوب ---------------- */
@media (max-width: 1180px) {
    .course-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid, .instructor-grid { grid-template-columns: repeat(2, 1fr); }
    .t-track { grid-auto-columns: calc((100% - 24px) / 2); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .fc-progress { inset-inline-start: 0; }
    .fc-audio { inset-inline-end: 0; }
}

@media (max-width: 980px) {
    :root { --header-h: 68px; }
    .burger { display: flex; }
    .hide-sm { display: none !important; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: .2rem;
        background: #fff; padding: 16px 24px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
        transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s var(--ease);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
    .main-nav > a { padding: .85rem 1rem; font-size: 1.02rem; color: var(--ink-900) !important; }
    .main-nav > a.is-active { background: var(--primary-50); }
    .main-nav > a.is-active::after { display: none; }
    .nav-mobile-auth { display: grid; gap: .6rem; margin-top: .8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
    .user-menu-name { display: none; }

    .hero { padding: calc(var(--header-h) + 48px) 0 110px; }
    .instructor-feature { grid-template-columns: 240px 1fr; gap: 32px; padding: 36px; }
    .avatar-hero { width: 190px; height: 190px; }
    .instructor-feature-media::before { width: 220px; height: 220px; }
    .hero-grid, .about-grid, .faq-grid, .course-hero-grid, .course-layout, .player-layout, .dash-grid, .contact-grid, .cta-band { grid-template-columns: 1fr; }
    .hero-visual { max-width: 420px; margin-top: 24px; }
    .hero-visual-logo { max-width: 520px; }
    .aspect-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(3) { border-inline-start: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
    .steps { grid-template-columns: 1fr; }
    .about-grid { gap: 40px; }
    .about-visual { min-height: 360px; }
    .faq-grid { gap: 32px; }
    .cta-band { padding: 44px 32px; }
    .cta-actions { justify-content: flex-start; }

    .catalog { grid-template-columns: 1fr; padding-top: 28px; }
    .filters { position: fixed; inset: 0; z-index: 1100; border-radius: 0; overflow-y: auto; transform: translateX(100%); transition: transform .3s var(--ease); top: 0; }
    .filters.is-open { transform: none; }
    .filters-toggle { display: inline-flex; }
    .filters-close { display: grid !important; }

    .buy-card { position: static; margin-top: 0; order: -1; }
    .course-layout { padding-top: 0; }
    .course-hero { padding-bottom: 40px; }
    .course-layout > aside { margin-top: -24px; order: -1; }
    .sidebar-panel { position: static; max-height: none; }
    .dash-stats { grid-template-columns: 1fr 1fr; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-side { display: none; }
}

@media (max-width: 640px) {
    .container { padding-inline: 16px; }
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 36px; }
    .course-grid, .cat-grid, .instructor-grid { grid-template-columns: 1fr; }
    .instructor-feature { grid-template-columns: 1fr; padding: 32px 22px; gap: 28px; text-align: center; }
    .instructor-feature .tag-list, .instructor-feature-meta { justify-content: center; }
    .avatar-hero { width: 170px; height: 170px; font-size: 2.6rem; }
    .instructor-feature-media::before { width: 200px; height: 200px; }
    .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .aspect-grid { gap: 12px; }
    .level-tablist { gap: 8px; margin-bottom: 18px; }
    .level-tab { flex-direction: column; text-align: center; gap: .45rem; padding: 12px 6px; }
    .level-tab b { font-size: .8rem; }
    .level-num { width: 36px; height: 36px; font-size: 1rem; border-radius: 11px; }
    .level-tab small { display: none; }
    .hero-visual-logo .fc-progress { inset-inline-start: -2%; top: -4%; }
    .hero-visual-logo .fc-audio { inset-inline-end: -2%; bottom: -10px; }
    .cat-card { padding: 18px; }
    .cat-card p { display: none; }
    .cat-icon { width: 46px; height: 46px; font-size: 1.1rem; margin-bottom: .4rem; }
    .t-track { grid-auto-columns: 88%; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat { padding: 18px 14px; flex-direction: column; align-items: flex-start; gap: .6rem; }
    .stat strong { font-size: 1.4rem; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.05rem; }
    .hero-trust { gap: 1rem; }
    .hero-visual { width: 82%; }
    .float-card { padding: .6rem .7rem; gap: .55rem; border-radius: 14px; }
    .float-card .fc-icon { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
    .float-card strong { font-size: .78rem; }
    .float-card span { font-size: .68rem; }
    .fc-progress { min-width: 170px; inset-inline-start: -8%; top: 4%; }
    .fc-audio { inset-inline-end: -10%; bottom: 18%; }
    .fc-rating { inset-inline-start: 0; bottom: -4%; }
    .orbit-chip { width: 44px; height: 44px; border-radius: 14px; font-size: 1rem; }
    .orbit-chip:nth-child(1) { top: -22px; inset-inline-start: calc(50% - 22px); }
    .orbit-chip:nth-child(2) { top: calc(50% - 22px); inset-inline-end: -22px; }
    .orbit-chip:nth-child(3) { bottom: -22px; inset-inline-start: calc(50% - 22px); }
    .orbit-chip:nth-child(4) { top: calc(50% - 22px); inset-inline-start: -22px; }
    .hero-search .btn { padding-inline: 1rem; }
    .field-row { grid-template-columns: 1fr; }
    .learn-grid { grid-template-columns: 1fr; }
    .reviews-summary { grid-template-columns: 1fr; }
    .instructor-box { flex-direction: column; }
    .continue-card { grid-template-columns: 1fr; }
    .my-course { grid-template-columns: 64px 1fr; }
    .my-course > :last-child { grid-column: 1 / -1; }
    .dash-stats { gap: 12px; }
    .dash-stat { flex-direction: column; align-items: flex-start; padding: 16px; }
    .lesson-content { padding: 22px; }
    .lesson-nav a { max-width: none; }
    .lesson-nav { flex-direction: column; }
    .player-top .mini-progress .progress { width: 80px; }
    .search-inline input { width: 130px; }
    .catalog-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-right { flex-wrap: wrap; }
    .toolbar-right .select { flex: 1; }
    .quiz-head { flex-direction: column; text-align: center; }
    .cert-foot { flex-direction: column; gap: .8rem; }
    .crisis-strip { flex-direction: column; }
    .wa-float { width: 50px; height: 50px; font-size: 1.5rem; bottom: 16px; inset-inline-start: 16px; }
}

/* ---------------- الطباعة (الشهادة) ---------------- */
@media print {
    @page { size: A4 landscape; margin: 0; }
    body { background: #fff; }
    .site-header, .site-footer, .wa-float, .cert-actions, .page-hero, .toast-stack { display: none !important; }
    .cert-wrap { padding: 0; }
    .certificate { box-shadow: none; max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
