/* ==========================================================================
   Oval E-Learning — "Hello in every language"
   Paper + ink + Oval blue, with a coral signal used sparingly.
   Display: Bricolage Grotesque · Text: Instrument Sans · Arabic: Readex Pro
   ========================================================================== */
:root {
  --paper: #f5f7fc;
  --surface: #ffffff;
  --ink: #141a33;
  --ink-2: #3c4466;
  --muted: #6b7393;
  --line: #dfe4f2;
  --mist: #dde4ff;
  --blue: #2d4bdb;
  --blue-deep: #1d2f9e;
  --signal: #ff5a36;
  --signal-ink: #ffffff;
  --on-ink: #eef1fa;
  --on-ink-2: #a9b1d6;
  --ink-panel: #141a33;
  --ink-line: #2a3358;

  --display: "Bricolage Grotesque", "Readex Pro", system-ui, sans-serif;
  --text: "Instrument Sans", "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 28px;
  --r-md: 16px;
  --r-sm: 10px;
  --wrap: 1240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1120; --surface: #151b31; --ink: #eef1fa; --ink-2: #c3c9e4; --muted: #8d95b8; --line: #252d4d;
    --mist: #1b2448; --blue: #7d93ff; --blue-deep: #a9b8ff; --ink-panel: #1a2142; --ink-line: #2c365e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1120; --surface: #151b31; --ink: #eef1fa; --ink-2: #c3c9e4; --muted: #8d95b8; --line: #252d4d;
  --mist: #1b2448; --blue: #7d93ff; --blue-deep: #a9b8ff; --ink-panel: #1a2142; --ink-line: #2c365e; color-scheme: dark;
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[lang="ar"] { --display: "Readex Pro", system-ui, sans-serif; --text: "Readex Pro", system-ui, sans-serif; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.02em; font-variation-settings: "opsz" 96; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
svg { width: 1.1em; height: 1.1em; flex: none; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--signal); color: #fff; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { inset-inline-start: 8px; }
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt { margin-top: 2.5rem; }
.inline { vertical-align: -2px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

/* Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .7em 1.25em; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-signal, .btn-accent { background: var(--signal); color: var(--signal-ink); }
.btn-signal:hover, .btn-accent:hover { background: #e9431f; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: #141a33; }
.btn-light:hover { background: #141a33; color: #fff; }
.btn-outline-light { color: inherit; border-color: currentColor; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { padding: .45em .95em; font-size: .85rem; }
.btn-lg { padding: .9em 1.6em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.link-plain, .link-arrow { font-weight: 600; color: var(--blue); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.link-plain:hover, .link-arrow:hover { color: var(--signal); }
.link-arrow svg { display: none; }
.link-muted { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: inline-flex; align-items: center; gap: .45em; height: 40px; min-width: 40px; padding: 0 12px; justify-content: center; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; }
.icon-btn:hover { border-color: var(--ink); }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.header-row { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-logo { height: 42px; width: auto; }
:root[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); opacity: .92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { filter: brightness(0) invert(1); opacity: .92; } }
.brand-logo + .brand-text { display: none; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.brand-mark.big { width: 60px; height: 60px; font-size: 1.7rem; margin-bottom: 1rem; }
.brand-text { font-family: var(--display); font-size: 1.2rem; }
.brand-text strong { font-weight: 800; }
.brand-text span { color: var(--muted); font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 16px; }
.main-nav > a, .nav-drop-btn { position: relative; white-space: nowrap; padding: 8px 12px; font-weight: 600; font-size: .95rem; color: var(--ink-2); background: none; border: 0; font-family: inherit; cursor: pointer; border-radius: 8px; }
.main-nav > a:hover, .nav-drop-btn:hover { color: var(--ink); }
.main-nav .is-active { color: var(--ink); }
.main-nav > a.is-active::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--signal); }
.nav-drop { position: relative; }
.nav-drop-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-3px); margin-inline-start: 8px; }
.nav-drop-panel { position: absolute; top: calc(100% + 10px); inset-inline-start: -8px; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 24px 48px -24px rgba(20, 26, 51, .35); padding: 8px; display: none; }
.nav-drop:hover .nav-drop-panel, .nav-drop.open .nav-drop-panel { display: block; }
.nav-drop:hover .nav-drop-panel::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-drop-panel a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.nav-drop-panel a:hover { background: var(--mist); }
.nav-drop-panel small { color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-mobile-actions { display: none; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.lang-label { display: none; }
@media (min-width: 640px) { .lang-label { display: inline; } }
@media (max-width: 1180px) {
  .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 16px 24px; margin: 0; gap: 0; max-height: calc(100vh - 72px); overflow: auto; display: none; }
  .main-nav.open { display: flex; }
  .main-nav > a, .nav-drop-btn { padding: 14px 4px; text-align: start; width: 100%; font-family: var(--display); font-size: 1.4rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav > a.is-active::after { display: none; }
  .nav-drop-panel { position: static; box-shadow: none; border: 0; padding: 4px 0 8px; display: none; background: transparent; }
  .nav-drop:hover .nav-drop-panel { display: none; }
  .nav-drop.open .nav-drop-panel { display: block; }
  .nav-mobile-actions { display: flex; gap: 8px; padding-top: 16px; }
  .nav-mobile-actions .btn { flex: 1; }
}

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 72px) 28px; }
.hero::before { content: ""; position: absolute; inset-inline-end: -12vw; top: -18vw; width: 52vw; height: 52vw; border-radius: 50%; background: var(--mist); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy, .ladder { min-width: 0; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); gap: 56px; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.hero-kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 22%, transparent); }
.hero-word { font-size: clamp(3.4rem, 17vw, 11.5rem); line-height: .92; letter-spacing: -.055em; font-weight: 800; margin: 0 0 .12em; font-variation-settings: "opsz" 96; }
.word-stage { display: grid; }
.word-stage .word { grid-area: 1 / 1; opacity: 0; transform: translateY(.18em); filter: blur(10px); transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .2, 1), filter .55s ease; white-space: nowrap; color: var(--ink); }
.word-stage .word.is-on { opacity: 1; transform: none; filter: none; }
.word-stage .word.is-out { opacity: 0; transform: translateY(-.18em); filter: blur(10px); }
.word-stage .word[dir="rtl"] { font-family: "Readex Pro", sans-serif; letter-spacing: 0; font-weight: 700; justify-self: start; }
[dir="rtl"] .word-stage .word[dir="ltr"] { justify-self: start; }
.word-stage .word::after { content: "."; color: var(--signal); }
.hero-line { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; max-width: 24ch; margin-bottom: .6em; }
.hero-sub { color: var(--ink-2); max-width: 52ch; }
.hero-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px; padding-inline-start: 20px; max-width: 580px; margin-top: 28px; }
.hero-search:focus-within { box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 22%, transparent); }
.hero-search svg { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.02rem; color: var(--ink); background: transparent; padding: 10px 4px; }
.lang-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.lang-pills a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
[dir="rtl"] .lang-pills a { padding: 7px 14px 7px 8px; }
.lang-pills a span { min-width: 26px; text-align: center; padding: 2px 7px; border-radius: 999px; background: var(--mist); color: var(--blue-deep); font-size: .8rem; font-variant-numeric: tabular-nums; }
.lang-pills a:hover { border-color: var(--ink); }

/* The CEFR staircase */
.ladder { background: var(--ink-panel); color: var(--on-ink); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 34px); position: relative; }
.ladder h2 { color: #fff; font-size: 1.7rem; margin-bottom: .25em; }
.ladder > p { color: var(--on-ink-2); font-size: .95rem; margin-bottom: 22px; }
.ladder ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 8px; }
.ladder li { width: calc(52% + var(--step) * 12%); }
.ladder li a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 11px 16px; border-radius: 14px; background: color-mix(in srgb, #7d93ff calc(18% + var(--step) * 14%), #1d2547); transition: transform .2s ease, background .2s; }
.ladder li a:hover { transform: translateX(6px); background: var(--signal); }
[dir="rtl"] .ladder li a:hover { transform: translateX(-6px); }
.ladder strong { grid-row: span 2; font-family: var(--display); font-size: 1.7rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.ladder span { font-weight: 600; font-size: .92rem; color: #fff; line-height: 1.25; }
.ladder em { font-style: normal; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.ladder-note { margin: 18px 0 0; font-size: .92rem; color: var(--on-ink-2); }
.ladder-note a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 520px) { .ladder li { width: calc(62% + var(--step) * 9.5%); } }

.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 44px 0 0; padding-top: 22px; border-top: 1.5px solid var(--ink); color: var(--ink-2); font-size: 1rem; }
.hero-facts b { font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-inline-end: 6px; letter-spacing: -.02em; }

/* Sections --------------------------------------------------------------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: 40px 80px; }
.section-tint { background: color-mix(in srgb, var(--mist) 45%, var(--paper)); }
.section-ink { background: var(--ink-panel); color: var(--on-ink); }
.section-ink h2 { color: #fff; }
.section-ink .link-plain { color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 46ch; }
.section-head.small h2 { font-size: 1.6rem; max-width: none; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--blue); }

/* Category index --------------------------------------------------------- */
.cat-index { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.cat-index li { border-bottom: 1px solid var(--line); }
.cat-index a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name n" "subs n"; gap: 2px 24px; align-items: center; padding: 22px 4px; transition: padding .25s ease, background .25s; }
@media (min-width: 900px) { .cat-index a { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; grid-template-areas: "name subs thumbs n"; padding: 26px 8px; } }
.cat-name { grid-area: name; font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.cat-subs { grid-area: subs; color: var(--muted); font-size: .95rem; }
.cat-thumbs { grid-area: thumbs; display: none; }
@media (min-width: 900px) { .cat-thumbs { display: flex; } }
.cat-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; border: 3px solid var(--paper); margin-inline-start: -14px; transition: transform .3s ease; }
.cat-n { grid-area: n; font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: end; }
.cat-index a:hover { background: var(--surface); padding-inline: 20px; }
.cat-index a:hover .cat-name { color: var(--blue); }
.cat-index a:hover .cat-n { color: var(--signal); font-weight: 700; }
.cat-index a:hover .cat-thumbs img:nth-child(2) { transform: translateY(-6px); }

/* Course cards ----------------------------------------------------------- */
.course-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.course-card { display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); transition: border-color .2s; }
.course-card:hover { border-color: var(--ink); }
.section-ink .course-card { border-color: transparent; }
.course-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--mist); overflow: hidden; display: block; margin: 8px 8px 0; border-radius: 11px; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.course-card:hover .course-thumb img { transform: scale(1.05); }
.chip-level { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--surface); color: var(--ink); border: 0; }
.course-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.course-body .eyebrow { font-size: .8rem; }
.course-body h3 { margin: 0; font-size: 1.12rem; }
.course-body h3 a:hover { color: var(--blue); }
.course-instructor { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin: 0; }
.course-meta { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--ink-2); }
.course-meta span { display: inline-flex; align-items: center; gap: 6px; }
.price { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: #fff; background: hsl(var(--h) 55% 42%); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--mist); color: var(--blue-deep); border: 0; }
.chip-star svg { color: var(--signal); }
.page-hero .chip, .course-hero .chip { background: var(--surface); color: var(--ink); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Instructors ------------------------------------------------------------ */
.faces { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.face { display: flex; flex-direction: column; gap: 2px; }
.face-photo { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--mist); margin-bottom: 12px; outline: 0 solid var(--signal); outline-offset: 4px; transition: outline-width .15s; }
.face:hover .face-photo { outline-width: 3px; }
.face-photo img { width: 100%; height: 100%; object-fit: cover; }
.face strong { font-family: var(--display); font-size: 1.1rem; letter-spacing: -.01em; }
.face small { color: var(--muted); }
.avatar { display: inline-block; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--mist); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .thumb-fallback { font-size: 1.1rem; }
.avatar.sm { width: 44px; height: 44px; }
.avatar.lg { width: 116px; height: 116px; }
.avatar.lg .thumb-fallback { font-size: 1.9rem; }
.avatar.xl { width: 148px; height: 148px; }
.avatar.xl .thumb-fallback { font-size: 2.6rem; }
.inst-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.inst-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.inst-card { text-align: center; padding: 30px 20px 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; transition: border-color .2s; }
.inst-card:hover { border-color: var(--ink); }
.inst-card .avatar { margin-bottom: 16px; }
.inst-card h3 { margin-bottom: 2px; }
.inst-card p { color: var(--muted); margin-bottom: 14px; }
.inst-stats { display: flex; gap: 18px; font-size: .9rem; color: var(--ink-2); }
.inst-stats strong { font-family: var(--display); }
.inst-hero-grid { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; max-width: 880px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Inner page heroes ------------------------------------------------------ */
.page-hero, .course-hero { position: relative; overflow: hidden; background: var(--mist); color: var(--ink); padding-block: 52px 56px; }
.page-hero::after, .course-hero::after { content: ""; position: absolute; inset-inline-end: -120px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; border: 56px solid color-mix(in srgb, var(--blue) 14%, transparent); pointer-events: none; }
.page-hero h1 { margin-bottom: .2em; max-width: 20ch; }
.page-hero .lead { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--blue); }
.course-hero h1 { max-width: 20ch; }
.hero-instructor { display: inline-flex; align-items: center; gap: 12px; margin-top: 24px; }
.hero-instructor small { display: block; color: var(--muted); font-size: .8rem; }
.inst-hero .avatar.xl { border: 5px solid var(--surface); }

/* Course page ------------------------------------------------------------ */
.course-layout { display: grid; gap: 36px; }
@media (min-width: 960px) { .course-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .buy-card { position: sticky; top: 96px; margin-top: -170px; } }
.buy-card { position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(20, 26, 51, .35); }
.buy-thumb { aspect-ratio: 1 / 1; background: var(--mist); margin: 10px 10px 0; border-radius: 18px; overflow: hidden; }
.buy-thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.buy-body h3 { margin: 14px 0 2px; font-size: 1rem; }
.buy-price { font-family: var(--display); font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: .94rem; }
.check-list li { display: flex; gap: 10px; align-items: center; }
.check-list svg { color: var(--blue); }
.course-main h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.prose { color: var(--ink-2); font-size: 1.05rem; line-height: 1.7; overflow-wrap: anywhere; }
.prose > * { max-width: 70ch; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); font-size: 1.2rem; margin-top: 1.2em; }
.prose img { height: auto; border-radius: var(--r-sm); }
.prose a { color: var(--blue); text-decoration: underline; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose table { border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.prose.narrow { margin-bottom: 36px; }
.lesson-list { list-style: none; padding: 0; margin: 0 0 12px; border-top: 1.5px solid var(--ink); }
.lesson-list li { display: flex; align-items: center; gap: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.lesson-no { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--blue); font-size: .95rem; width: 26px; }
.lesson-title { flex: 1; font-weight: 600; }
.lesson-dur { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.lesson-lock { color: var(--muted); }

/* Category & programme pages -------------------------------------------- */
.sub-block + .sub-block { margin-top: 56px; }
.group-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.group-card { display: flex; flex-direction: column; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s; }
.group-card:hover { border-color: var(--ink); }
.group-thumb { aspect-ratio: 1 / 1; background: var(--mist); display: block; overflow: hidden; margin: 8px 8px 0; border-radius: 11px; }
.group-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.group-card:hover .group-thumb img { transform: scale(1.05); }
.group-info { padding: 14px 16px 16px; display: flex; flex-direction: column; }
.group-info strong { font-family: var(--display); font-size: 1.08rem; letter-spacing: -.01em; }
.group-info small { color: var(--muted); }

/* Filters ---------------------------------------------------------------- */
.filters { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); margin-top: -70px; position: relative; z-index: 2; box-shadow: 0 30px 60px -36px rgba(20, 26, 51, .4); }
@media (min-width: 860px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.search-field { display: flex; align-items: center; gap: 8px; padding-inline: 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.search-field svg { color: var(--muted); }
.search-field input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 11px 0; width: 100%; }
.filters select, .form input, .form textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; width: 100%; }
.filters select { border-radius: 999px; }
.filters select:focus, .form input:focus, .form textarea:focus, .search-field:focus-within { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.page-hero:has(+ .section .filters) { padding-bottom: 110px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 18px; color: var(--ink-2); }
.result-bar strong { font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.empty { padding: 56px; text-align: center; color: var(--muted); background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r-lg); }

/* Partners --------------------------------------------------------------- */
.partners { padding-block: 64px; border-top: 1px solid var(--line); }
.partners-title { font-size: 1.3rem; color: var(--ink-2); font-weight: 600; margin-bottom: 28px; max-width: none; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; align-items: center; animation: marquee 110s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: 64px; width: 120px; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.marquee img:hover { filter: none; opacity: 1; }
:root[data-theme="dark"] .marquee img { mix-blend-mode: normal; background: #fff; border-radius: 10px; padding: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marquee img { mix-blend-mode: normal; background: #fff; border-radius: 10px; padding: 6px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* CTA -------------------------------------------------------------------- */
.cta { position: relative; overflow: hidden; display: grid; gap: 8px 32px; padding: clamp(32px, 6vw, 72px); border-radius: var(--r-lg); background: var(--signal); color: #fff; }
.cta::after { content: "؟?"; position: absolute; inset-inline-end: -10px; bottom: -80px; font-family: var(--display); font-weight: 800; font-size: clamp(10rem, 26vw, 22rem); line-height: 1; color: rgba(255, 255, 255, .14); pointer-events: none; letter-spacing: -.05em; }
.cta h2 { color: #fff; max-width: 16ch; font-size: clamp(2rem, 4.6vw, 3.6rem); }
.cta p { color: rgba(255, 255, 255, .92); margin: 0; max-width: 50ch; font-size: 1.1rem; position: relative; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; position: relative; z-index: 1; }

/* Live ------------------------------------------------------------------- */
.live-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.live-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.live-card h3 { margin: 4px 0 0; font-size: 1.25rem; }
.live-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--signal) 14%, transparent); color: var(--signal); }
.live-icon svg { width: 22px; height: 22px; }
.live-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Contact ---------------------------------------------------------------- */
.contact-layout { display: grid; gap: 24px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 36px); margin-top: -80px; position: relative; z-index: 2; box-shadow: 0 30px 60px -36px rgba(20, 26, 51, .4); }
.page-hero:has(+ .section .contact-card) { padding-bottom: 112px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-self: start; }
.field-error { color: #d92d20; font-weight: 500; font-size: .85rem; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert-err { padding: 12px 16px; border-radius: 14px; background: #fdecea; color: #b42318; margin: 0 0 16px; font-weight: 600; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.form label.check input { width: auto; }
.auth-card .form { margin-top: 18px; }
.lesson-watch { margin-inline-start: 8px; }
.alert-ok { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: #e6f6ec; color: #11683a; margin-bottom: 16px; font-weight: 600; }
.contact-quick { display: grid; gap: 12px; }
.quick { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
a.quick:hover { border-color: var(--ink); }
.quick > svg { width: 22px; height: 22px; color: var(--signal); margin-top: 2px; }
.quick small { display: block; color: var(--muted); }
.quick strong { font-weight: 600; overflow-wrap: anywhere; }
.branch-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.branch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.branch h3 { margin: 4px 0 12px; font-size: 1.2rem; }
.branch p { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .93rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.branch p svg { margin-top: 3px; color: var(--muted); }
.branch a { color: var(--blue); }
.map summary { cursor: pointer; color: var(--blue); font-weight: 600; margin-top: 8px; font-size: .92rem; }
.map iframe { width: 100%; height: 220px; border: 0; border-radius: 12px; margin-top: 10px; }

/* Auth / 404 ------------------------------------------------------------- */
.auth { display: grid; place-items: center; min-height: 62vh; }
.auth-card { width: min(460px, calc(100% - 32px)); text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px 30px; }
.auth-card h1 { font-size: 2rem; }
.auth-actions { display: grid; gap: 10px; margin-top: 24px; }
.big-404 { display: block; font-family: var(--display); font-size: 6rem; font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--signal); margin-bottom: 12px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink-panel); color: var(--on-ink-2); padding-top: 72px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-bottom: 48px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.brand-light { color: #fff; margin-bottom: 14px; }
.brand-light .brand-text span { color: var(--on-ink-2); }
.footer-about p { font-size: .93rem; max-width: 36ch; }
.socials { display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink-line); color: #fff; }
.socials a:hover { background: var(--signal); border-color: var(--signal); }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list svg { margin-top: 4px; color: var(--signal); }
.site-footer .btn { margin-top: 16px; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--ink-line); padding-block: 22px; font-size: .86rem; }

.popup-ad { border: 0; padding: 0; border-radius: var(--r-lg); max-width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); overflow: hidden; }
.popup-ad::backdrop { background: rgba(20, 26, 51, .6); backdrop-filter: blur(3px); }
.popup-ad img { width: 100%; height: auto; }
.popup-title { font-family: var(--display); font-size: 1.3rem; font-weight: 700; padding: 18px 22px 0; margin: 0; }
.popup-ad .btn { margin: 14px 22px 22px; }
.popup-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #141a33; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.wa-float { position: fixed; inset-inline-end: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45); z-index: 40; }
.wa-float svg { width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee { mask-image: none; }
}
