/* Itqan, an online learning and certification platform. One stylesheet drives
   English (ltr) and Arabic (rtl) across every page via logical properties;
   [dir="rtl"] only overrides what must genuinely change. Motion is progressive
   enhancement: content is fully readable with no JS and reveals fail open. */

:root {
  --indigo: #1A1B40;
  --indigo-2: #24264F;
  --indigo-3: #2E3160;
  --ink: #131428;
  --paper: #F6F4EE;
  --paper-2: #EFEDE4;
  --white: #FCFBF7;
  --slate: #585A78;
  --slate-2: #797B95;
  --amber: #E8A12C;
  --amber-deep: #B97D14;
  --teal: #1F9E96;
  --teal-deep: #13746b;
  --line: rgba(19,20,40,0.12);
  --line-2: rgba(19,20,40,0.06);
  --line-dark: rgba(246,244,238,0.14);
  --line-dark-2: rgba(246,244,238,0.07);
  --display: "Clash Display", ui-sans-serif, system-ui, sans-serif;
  --sans: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ar: "Tajawal", "General Sans", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 5vw, 64px);
  --gut: clamp(46px, 6vw, 92px);
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 24px 50px -32px rgba(19,20,40,0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
[dir="rtl"] body { font-family: var(--ar); line-height: 1.85; }
body.noscroll { overflow: hidden; }

img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--amber); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -.01em; line-height: 1.12; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--ar); font-weight: 700; line-height: 1.3; letter-spacing: 0; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--pad); }
.wrap-wide { max-width: 1440px; }
.section { padding-block: var(--gut); }
.section--indigo { background: var(--indigo); color: var(--white); }
.section--paper2 { background: var(--paper-2); }

.eyebrow { display: inline-flex; align-items: center; gap: .55em; font-size: .9rem; font-weight: 600; color: var(--teal-deep); }
.eyebrow::before { content: ""; width: 18px; height: 18px; border-radius: 5px; background: var(--teal); opacity: .25; flex: none; }
[dir="rtl"] .eyebrow { font-size: 1rem; }
.section--indigo .eyebrow { color: var(--amber); }
.section--indigo .eyebrow::before { background: var(--amber); }

.display { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.02em; }
[dir="rtl"] .display { letter-spacing: 0; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--slate); line-height: 1.55; }
.lat { direction: ltr; unicode-bidi: isolate; }
.num { direction: ltr; unicode-bidi: isolate; font-feature-settings: "tnum" 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; font-family: var(--sans); font-weight: 600; font-size: .98rem; padding: .85em 1.7em; background: var(--indigo); color: var(--white); border: 1px solid var(--indigo); border-radius: 100px; transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease); }
[dir="rtl"] .btn { font-family: var(--ar); font-weight: 700; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(26,27,64,.6); }
.btn--amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn--amber:hover { box-shadow: 0 14px 26px -14px rgba(232,161,44,.7); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.section--indigo .btn--ghost { color: var(--white); border-color: var(--line-dark); }
.section--indigo .btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--sm { padding: .6em 1.2em; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.tlink { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--teal-deep); }
.tlink .arr { transition: transform .35s var(--ease); }
.tlink:hover .arr { transform: translateX(4px); }
[dir="rtl"] .tlink .arr { transform: scaleX(-1); }
[dir="rtl"] .tlink:hover .arr { transform: scaleX(-1) translateX(4px); }

/* reveal: visible by default, hidden only once JS confirms it runs */
html.js .reveal { opacity: 0; transform: translateY(26px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.d2 { transition-delay: .08s; }
html.js .reveal.d3 { transition-delay: .16s; }
html.js .reveal.d4 { transition-delay: .24s; }
html.js .reveal.d5 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1 !important; transform: none !important; } }

/* a subtle scroll-driven progress bar on the root, fail-open via @supports */
.read-bar { position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px; background: var(--amber); transform-origin: left; transform: scaleX(0); z-index: 80; }
[dir="rtl"] .read-bar { transform-origin: right; }
@supports (animation-timeline: scroll()) {
  .read-bar { animation: growbar linear; animation-timeline: scroll(root); }
  @keyframes growbar { to { transform: scaleX(1); } }
}

/* ---------------------------------------------------------------- nav */
.nav { position: sticky; inset-block-start: 0; z-index: 70; background: rgba(246,244,238,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-block-start: 2px solid var(--indigo); border-block-end: 1px solid var(--line); transition: box-shadow .4s; }
.nav.scrolled { box-shadow: 0 6px 24px -20px rgba(19,20,40,.5); }
.nav-in { display: flex; align-items: center; gap: 18px; padding: 12px var(--pad); max-width: 1440px; margin-inline: auto; }
.nav-in .brand { margin-inline-end: clamp(20px, 4vw, 56px); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .mark svg { width: 100%; height: 100%; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.04; }
.brand-en { font-family: var(--display); font-weight: 600; font-size: 1.24rem; letter-spacing: -.01em; }
.brand-ar { font-size: .82rem; color: var(--slate); }
[dir="rtl"] .brand-en { font-family: var(--ar); font-weight: 700; }
.nav-links { display: flex; align-items: center; flex: 1; gap: clamp(18px, 2.6vw, 38px); margin-inline-start: 0; }
.nav-links .lang { margin-inline-start: auto; }
.nav-links .btn { margin-inline-start: 4px; }
.nav-links a { font-size: .96rem; font-weight: 500; color: var(--ink); opacity: .82; transition: opacity .3s, color .3s; }
.nav-links a:not(.btn):not(.lang) { position: relative; }
.nav-links a:not(.btn):not(.lang)::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -5px; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: inline-start; transition: transform .3s var(--ease); }
.nav-links a:not(.btn):not(.lang):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--indigo); }
.nav-links a.btn { color: var(--white); opacity: 1; }
.nav-links a.btn:hover { color: var(--white); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.lang .globe { width: 17px; height: 17px; }
.lang .globe svg { width: 100%; height: 100%; display: block; }
.nav-links .lang { letter-spacing: 0; text-transform: none; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .4s var(--ease), opacity .3s; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding-block: clamp(40px, 6vw, 72px) var(--gut); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); letter-spacing: -.025em; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
.hero h1 .hl { color: var(--teal-deep); position: relative; white-space: nowrap; }
.hero-tag { margin-block: 22px 0; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-block-start: 34px; }
.hero-meta .m .n { font-family: var(--display); font-weight: 600; font-size: 1.7rem; }
.hero-meta .m .l { font-size: .88rem; color: var(--slate); margin-block-start: 2px; }
.hero-visual { position: relative; }
.hero-photo { aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-card { position: absolute; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.hero-card .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.hero-card .ic svg { width: 22px; height: 22px; }
.hero-card .t { font-weight: 600; font-size: .95rem; }
.hero-card .s { font-size: .82rem; color: var(--slate); }
.hero-card--a { inset-block-start: 8%; inset-inline-start: -7%; }
.hero-card--b { inset-block-end: 10%; inset-inline-end: -6%; }
@media (max-width: 520px) { .hero-card--a { inset-inline-start: 0; } .hero-card--b { inset-inline-end: 0; } }

/* ---------------------------------------------------------------- editorial hero (landing) */
.hero-ed { position: relative; padding-block: clamp(34px, 5vw, 68px) var(--gut); }
.dateline { display: inline-flex; align-items: center; gap: 11px; font-size: .86rem; color: var(--slate); font-weight: 500; }
.dateline::before { content: ""; width: 30px; height: 2px; background: var(--amber); }
.hero-ed-title { font-family: var(--display); font-weight: 600; font-size: clamp(2.7rem, 7.6vw, 6rem); line-height: 1; letter-spacing: -.03em; margin-block: 18px 0; max-width: 17ch; }
[dir="rtl"] .hero-ed-title { font-family: var(--ar); font-weight: 700; line-height: 1.16; letter-spacing: 0; }
.hero-ed-title em { font-style: normal; color: var(--teal-deep); }
.hero-ed-row { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 64px); align-items: end; margin-block-start: clamp(26px, 3vw, 42px); padding-block-end: clamp(24px, 3vw, 40px); border-block-end: 1px solid var(--line); }
.hero-ed-lead { font-size: clamp(1.05rem, 1.5vw, 1.24rem); color: var(--slate); max-width: 44ch; margin: 0; }
.hero-ed-cta { display: flex; gap: 13px; flex-wrap: wrap; justify-content: flex-end; }
.hero-ed-figure { position: relative; margin-block-start: clamp(28px, 4vw, 52px); }
.hero-ed-figure .ph { aspect-ratio: 2 / 1; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.hero-ed-figure .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero-ed-figure .hero-card--a { inset-block-start: auto; inset-block-end: 9%; inset-inline-start: 4%; }
.hero-ed-figure .hero-card--b { inset-block-end: auto; inset-block-start: 9%; inset-inline-end: 4%; }
.hero-ed-stats { display: flex; flex-wrap: wrap; margin-block-start: clamp(24px, 3vw, 40px); border-block-start: 2px solid var(--indigo); }
.hero-ed-stats span { padding: 16px clamp(22px, 3vw, 48px) 0; border-inline-end: 1px solid var(--line); }
.hero-ed-stats span:first-child { padding-inline-start: 0; }
.hero-ed-stats span:last-child { border-inline-end: 0; }
.hero-ed-stats b { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); display: block; letter-spacing: -.01em; }
.hero-ed-stats i { font-style: normal; font-size: .9rem; color: var(--slate); }

/* ---------------------------------------------------------------- editorial principles (replaces feature cards) */
.principles { border-block-start: 2px solid var(--indigo); }
.principle { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 50px); align-items: start; padding-block: clamp(26px, 3.4vw, 46px); border-block-end: 1px solid var(--line); }
.principle .pn { font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 4vw, 3.4rem); color: var(--amber); line-height: .85; }
.principle h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.01em; margin: 0; }
[dir="rtl"] .principle h3 { font-family: var(--ar); font-weight: 700; }
.principle p { color: var(--slate); margin-block-start: 8px; max-width: 62ch; font-size: 1.05rem; }

/* editorial steps (replaces how-it-works cards) */
.steps-ed { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 50px); }
.step-ed .sn { font-family: var(--display); font-weight: 600; font-size: clamp(3.2rem, 6vw, 5.4rem); color: var(--indigo); opacity: .13; line-height: .75; display: block; }
.step-ed h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin-block: 2px 8px; }
[dir="rtl"] .step-ed h3 { font-family: var(--ar); font-weight: 700; }
.step-ed p { color: var(--slate); margin: 0; }

@media (max-width: 820px) {
  .hero-ed-row { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .hero-ed-cta { justify-content: flex-start; }
  .hero-ed-figure .ph { aspect-ratio: 3 / 2; }
  .principle { grid-template-columns: 1fr; gap: 6px; }
  .steps-ed { grid-template-columns: 1fr; gap: 28px; }
}

/* stack the hero floating cards below the photo on phones, no overlap */
@media (max-width: 640px) {
  .hero-ed-figure { display: grid; gap: 12px; }
  .hero-ed-figure .ph { aspect-ratio: 4 / 3; }
  .hero-ed-figure .ph img { object-position: 50% 14%; }
  .hero-ed-figure .hero-card { position: static; inset: auto; box-shadow: 0 12px 30px -22px rgba(19,20,40,.5); }
  .hero-ed-figure .hero-card--a, .hero-ed-figure .hero-card--b { inset: auto; }
}
@media (min-width: 481px) and (max-width: 640px) {
  .hero-ed-figure { grid-template-columns: 1fr 1fr; }
  .hero-ed-figure .ph { grid-column: 1 / -1; }
}

/* trust strip */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; justify-content: center; }
.trust .lbl { font-size: .82rem; color: var(--slate); width: 100%; text-align: center; margin-block-end: 4px; }
.trust .logo { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--slate); }

/* ---------------------------------------------------------------- feature cards */
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-block-end: clamp(28px, 4vw, 48px); }
.head-row .display { margin-block-start: 14px; max-width: 20ch; }
.head-row p { margin-block-start: 12px; max-width: 42ch; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 26px); }
.feat { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); padding: clamp(24px, 2.4vw, 32px); }
.feat .ic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; margin-block-end: 18px; background: rgba(31,158,150,.12); color: var(--teal-deep); }
.feat .ic svg { width: 26px; height: 26px; }
.feat:nth-child(2) .ic { background: rgba(232,161,44,.16); color: var(--amber-deep); }
.feat:nth-child(3) .ic { background: rgba(26,27,64,.08); color: var(--indigo); }
.feat h3 { font-size: 1.32rem; margin-block-end: 8px; }
.feat p { color: var(--slate); font-size: .98rem; margin: 0; }

/* ---------------------------------------------------------------- catalog / course cards */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block-end: clamp(24px, 3vw, 36px); }
.search { position: relative; flex: 1; min-width: 220px; }
.search input { width: 100%; font: inherit; font-size: .98rem; padding: .8em 1em .8em 2.6em; border: 1px solid var(--line); border-radius: 100px; background: var(--white); }
[dir="rtl"] .search input { padding: .8em 2.6em .8em 1em; }
.search .si { position: absolute; inset-block-start: 50%; inset-inline-start: 14px; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate); pointer-events: none; display: block; }
.search .si svg { width: 100%; height: 100%; display: block; }
.search input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,158,150,.16); }
.chip { font-family: var(--sans); font-weight: 500; font-size: .92rem; padding: .55em 1.1em; border-radius: 100px; border: 1px solid var(--line); background: var(--white); color: var(--ink); transition: border-color .3s, background .3s, color .3s; }
[dir="rtl"] .chip { font-family: var(--ar); }
.chip:hover { border-color: var(--slate); }
.chip.active { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
.sortwrap { margin-inline-start: auto; }
.sortwrap select { font: inherit; font-size: .92rem; padding: .55em 2em .55em 1em; border: 1px solid var(--line); border-radius: 100px; background: var(--white); }
[dir="rtl"] .sortwrap { margin-inline-start: 0; margin-inline-end: auto; }

.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.2vw, 28px); }
.course { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.course:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course.hide { display: none; }
.course-thumb { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--paper-2); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.course:hover .course-thumb img { transform: scale(1.05); }
.course-cat { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; background: rgba(19,20,40,.78); color: var(--white); font-size: .76rem; font-weight: 600; padding: .35em .8em; border-radius: 100px; backdrop-filter: blur(4px); }
.course-body { padding: 20px clamp(16px, 1.6vw, 22px) 22px; display: flex; flex-direction: column; flex: 1; }
.course h3 { font-size: 1.18rem; line-height: 1.25; }
.course .by { font-size: .88rem; color: var(--slate); margin-block-start: 6px; }
.course-meta { display: flex; align-items: center; gap: 14px; margin-block: 14px 0; font-size: .85rem; color: var(--slate); }
.course-meta .mi { display: inline-flex; align-items: center; gap: 5px; }
.course-meta .mi svg { width: 15px; height: 15px; }
/* darker gold than amber-deep so the small rating number clears AA on white */
.course-meta .star { color: #9C660A; font-weight: 600; }
.course-foot { margin-block-start: auto; padding-block-start: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-block-start: 1px solid var(--line-2); }
.course-price { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.course-price .free { color: var(--teal-deep); }
.course-level { font-size: .82rem; color: var(--slate); }
.empty-note { grid-column: 1 / -1; text-align: center; color: var(--slate); padding-block: 40px; }

/* ---------------------------------------------------------------- paths (learning tracks) */
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2vw, 26px); }
.path { position: relative; border-radius: var(--r); overflow: hidden; min-height: 240px; display: flex; align-items: flex-end; color: var(--white); isolation: isolate; }
.path img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease); }
.path::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(19,20,40,.92), rgba(19,20,40,.15) 75%); }
.path:hover img { transform: scale(1.05); }
.path-body { padding: clamp(20px, 2vw, 28px); }
.path-body .k { font-size: .82rem; color: var(--amber); font-weight: 600; }
.path-body h3 { font-size: 1.5rem; margin-block: 6px 6px; }
.path-body p { font-size: .92rem; color: rgba(246,244,238,.85); margin: 0; max-width: 40ch; }

/* ---------------------------------------------------------------- curriculum accordion */
.curriculum { display: grid; gap: 12px; }
.module { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); overflow: hidden; }
.module-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; background: transparent; border: 0; text-align: start; }
.module-head .mn { width: 30px; height: 30px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: .9rem; flex: none; }
.module-head .mt { display: block; font-weight: 600; font-size: 1.05rem; }
.module-head .ms { display: block; font-size: .84rem; color: var(--slate); margin-block-start: 2px; }
.module-head .chev { margin-inline-start: auto; width: 20px; height: 20px; color: var(--slate); transition: transform .35s var(--ease); }
.module-head .chev svg { width: 100%; height: 100%; display: block; }
[dir="rtl"] .module-head .chev { margin-inline-start: 0; margin-inline-end: auto; }
.module.open .module-head .chev { transform: rotate(180deg); }
.module-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.module.open .module-body { grid-template-rows: 1fr; }
.module-body > div { overflow: hidden; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 62px; border-block-start: 1px solid var(--line-2); font-size: .96rem; }
[dir="rtl"] .lesson-row { padding: 11px 62px 11px 18px; }
.lesson-row .lic { width: 18px; height: 18px; color: var(--teal-deep); flex: none; }
.lesson-row .lic svg { width: 100%; height: 100%; display: block; }
.lesson-row .ldur { margin-inline-start: auto; font-size: .84rem; color: var(--slate); }
[dir="rtl"] .lesson-row .ldur { margin-inline-start: 0; margin-inline-end: auto; }
html:not(.js) .module-body { grid-template-rows: 1fr; }

/* ---------------------------------------------------------------- lesson player (learn page) */
.learn { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - 60px); }
.learn-side { background: var(--white); border-inline-end: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 60px); position: sticky; inset-block-start: 60px; }
.learn-side h4 { padding: 20px 20px 6px; font-size: 1.1rem; }
.learn-prog { padding: 0 20px 16px; }
.pbar { height: 8px; border-radius: 100px; background: var(--paper-2); overflow: hidden; }
.pbar > span { display: block; height: 100%; background: var(--teal); border-radius: 100px; transition: width .5s var(--ease); }
.learn-prog .pl { font-size: .84rem; color: var(--slate); margin-block-start: 7px; }
.lside-lesson { display: flex; align-items: center; gap: 11px; padding: 12px 20px; border-block-start: 1px solid var(--line-2); width: 100%; text-align: start; background: transparent; border-inline: 0; border-block-end: 0; font-size: .94rem; transition: background .25s; }
.lside-lesson:hover { background: var(--paper); }
.lside-lesson.current { background: rgba(31,158,150,.1); box-shadow: inset 3px 0 0 var(--teal); }
[dir="rtl"] .lside-lesson.current { box-shadow: inset -3px 0 0 var(--teal); }
.lside-lesson .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.lside-lesson .tick svg { width: 12px; height: 12px; opacity: 0; }
.lside-lesson.done .tick { background: var(--teal); border-color: var(--teal); color: var(--white); }
.lside-lesson.done .tick svg { opacity: 1; }
.lside-lesson .ltt { flex: 1; }
.lside-lesson .ldur { font-size: .8rem; color: var(--slate); }
.learn-main { padding: clamp(20px, 3vw, 40px); overflow-y: auto; }
.player { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; position: relative; background: var(--ink); isolation: isolate; }
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; z-index: -1; }
.player .play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; background: rgba(252,251,247,.92); border: 0; display: grid; place-items: center; box-shadow: 0 16px 40px -16px rgba(0,0,0,.5); transition: transform .3s var(--ease); }
.player .play:hover { transform: scale(1.06); }
.player .play svg { width: 30px; height: 30px; color: var(--indigo); margin-inline-start: 4px; }
.player .bar { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 14px 18px; background: linear-gradient(to top, rgba(19,20,40,.85), transparent); color: var(--white); display: flex; align-items: center; gap: 12px; }
.player .bar .track { flex: 1; height: 5px; border-radius: 100px; background: rgba(252,251,247,.3); overflow: hidden; }
.player .bar .track > span { display: block; height: 100%; width: 34%; background: var(--amber); }
.player .bar .tt { font-size: .82rem; font-variant-numeric: tabular-nums; }
.learn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-block: 26px 0; }
.learn-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.learn-body { color: var(--slate); margin-block: 14px 0; max-width: 64ch; }
.learn-actions { display: flex; gap: 12px; margin-block-start: 26px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- quiz */
.quiz { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 2.6vw, 34px); max-width: 720px; }
.quiz .qn { font-size: .84rem; color: var(--teal-deep); font-weight: 600; }
.quiz h3 { font-size: 1.4rem; margin-block: 8px 20px; }
.quiz .opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); margin-block-end: 10px; transition: border-color .25s, background .25s; font-size: 1rem; }
.quiz .opt:hover { border-color: var(--slate); }
.quiz .opt .mk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.quiz .opt .mk svg { width: 13px; height: 13px; opacity: 0; }
.quiz .opt.correct { border-color: var(--teal); background: rgba(31,158,150,.1); }
.quiz .opt.correct .mk { background: var(--teal); border-color: var(--teal); color: #fff; }
.quiz .opt.correct .mk svg { opacity: 1; }
.quiz .opt.wrong { border-color: #c0492f; background: rgba(192,73,47,.08); }
.quiz .opt.wrong .mk { background: #c0492f; border-color: #c0492f; color: #fff; }
.quiz .opt[disabled] { cursor: default; }
.quiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-block-start: 18px; }
.quiz-feedback { font-weight: 600; }
.quiz-feedback.ok { color: var(--teal-deep); }
.quiz-feedback.no { color: #c0492f; }

/* ---------------------------------------------------------------- certificate */
.cert { position: relative; background: var(--white); border: 1px solid var(--amber); border-radius: var(--r); padding: clamp(28px, 4vw, 52px); text-align: center; max-width: 680px; margin-inline: auto; box-shadow: var(--shadow); overflow: hidden; }
.cert::before, .cert::after { content: ""; position: absolute; width: 160px; height: 160px; border: 2px solid rgba(232,161,44,.3); border-radius: 50%; }
.cert::before { inset-block-start: -80px; inset-inline-start: -80px; }
.cert::after { inset-block-end: -80px; inset-inline-end: -80px; }
.cert .seal { display: grid; place-items: center; width: 64px; height: 64px; margin-inline: auto; color: var(--amber-deep); }
.cert .seal svg { width: 100%; height: 100%; display: block; }
.cert .k { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-block-start: 16px; }
[dir="rtl"] .cert .k { letter-spacing: 0; text-transform: none; }
.cert h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-block: 8px; }
.cert .who { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--indigo); margin-block: 14px 6px; }
.cert .meta { color: var(--slate); font-size: .92rem; }
.cert .sig { display: flex; justify-content: space-between; gap: 20px; margin-block-start: 30px; }
.cert .sig .s { flex: 1; border-block-start: 1px solid var(--line); padding-block-start: 8px; font-size: .82rem; color: var(--slate); }

/* ---------------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: 1fr; gap: clamp(20px, 2.4vw, 30px); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(20px, 2.4vw, 30px); align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); padding: clamp(20px, 2vw, 28px); }
.panel h3 { font-size: 1.2rem; margin-block-end: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.4vw, 18px); }
.stat { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; }
.stat .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(31,158,150,.12); color: var(--teal-deep); margin-block-end: 14px; }
.stat .ic svg { width: 22px; height: 22px; }
.stat .n { font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1; }
.stat .l { font-size: .88rem; color: var(--slate); margin-block-start: 6px; }
.enrolled { display: grid; gap: 14px; }
.enroll-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; }
.enroll-row .et { width: 84px; height: 56px; border-radius: 9px; overflow: hidden; background: var(--paper-2); }
.enroll-row .et img { width: 100%; height: 100%; object-fit: cover; }
.enroll-row .en-t { font-weight: 600; }
.enroll-row .en-by { font-size: .85rem; color: var(--slate); }
.enroll-row .pbar { margin-block-start: 8px; }
.enroll-row .pct { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
/* progress ring */
.ring { --p: 0; width: 130px; height: 130px; margin-inline: auto; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .ring svg { transform: rotate(-90deg) scaleX(-1); }
.ring .bg { fill: none; stroke: var(--paper-2); stroke-width: 11; }
.ring .fg { fill: none; stroke: var(--teal); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 339.292; stroke-dashoffset: calc(339.292 - 339.292 * var(--p)); transition: stroke-dashoffset 1s var(--ease); }
.ring .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .ctr .n { font-family: var(--display); font-weight: 600; font-size: 1.7rem; }
.ring .ctr .l { font-size: .78rem; color: var(--slate); }

/* ---------------------------------------------------------------- testimonial / outcomes */
.quote-band { background: var(--indigo); color: var(--white); border-radius: clamp(18px, 2vw, 28px); padding: clamp(34px, 5vw, 64px); position: relative; overflow: hidden; }
.quote-band .eyebrow { color: var(--amber); }
.quote-band .eyebrow::before { background: var(--amber); }
.quote-band .qt { font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.4; max-width: 26ch; }
[dir="rtl"] .quote-band .qt { line-height: 1.6; }
.quote-band .qby { margin-block-start: 22px; display: flex; align-items: center; gap: 12px; }
.quote-band .qby img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote-band .qby .nm { font-weight: 600; }
.quote-band .qby .rl { font-size: .86rem; color: rgba(246,244,238,.7); }

/* ---------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 26px); align-items: stretch; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 2.4vw, 34px); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--indigo); box-shadow: var(--shadow); position: relative; }
.plan.featured .tag { position: absolute; inset-block-start: -12px; inset-inline-start: clamp(24px,2.4vw,34px); background: var(--amber); color: var(--ink); font-size: .78rem; font-weight: 600; padding: .3em .9em; border-radius: 100px; }
.plan .pn { font-weight: 600; font-size: 1.1rem; }
.plan .pp { font-family: var(--display); font-weight: 600; font-size: 2.6rem; margin-block: 10px 2px; }
.plan .pp .per { font-family: var(--sans); font-weight: 400; font-size: .95rem; color: var(--slate); }
.plan ul { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 11px; }
.plan li { display: flex; align-items: flex-start; gap: 10px; font-size: .96rem; color: var(--slate); }
.plan li svg { width: 19px; height: 19px; color: var(--teal); flex: none; margin-block-start: 1px; }
.plan .btn { margin-block-start: auto; }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--white); padding-block: clamp(54px, 7vw, 84px) 30px; border-block-start: 3px solid var(--amber); }
.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.footer .brand .mark { width: 40px; height: 40px; }
.footer .brand-en { color: var(--white); font-size: 1.55rem; }
.footer .brand-ar { color: rgba(246,244,238,.55); }
.footer-blurb { color: rgba(246,244,238,.62); margin: 16px 0 20px; max-width: 34ch; font-size: .95rem; }
.socials { display: flex; gap: 11px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--white); transition: background .3s, color .3s, border-color .3s; }
.socials a:hover { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.socials svg { width: 18px; height: 18px; }
.footer-col h5 { font-size: .92rem; font-weight: 600; color: var(--amber); margin: 0 0 14px; font-family: var(--display); }
[dir="rtl"] .footer-col h5 { font-family: var(--ar); }
.footer-col a { display: block; color: rgba(246,244,238,.74); font-size: .94rem; padding-block: 5px; transition: color .3s; }
.footer-col a:hover { color: var(--white); }
.footer-base { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-block-start: clamp(40px, 5vw, 60px); padding-block-start: 24px; border-block-start: 1px solid var(--line-dark); font-size: .84rem; color: rgba(246,244,238,.55); }
.credit { display: inline-flex; align-items: center; gap: 12px; }
.credit-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: rgba(246,244,238,.6); }
[dir="rtl"] .credit-label { letter-spacing: 0; text-transform: none; font-size: .9rem; font-family: var(--ar); }
.wlogo { display: inline-flex; align-items: center; gap: 11px; opacity: .9; transition: opacity .4s; }
.wlogo:hover { opacity: 1; }
.wlogo-mark { height: 38px; width: auto; display: block; }
.wlogo-word { height: 26px; width: auto; display: block; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19,20,40,.6); backdrop-filter: blur(4px); }
.modal-card { position: relative; background: var(--white); max-width: 460px; width: 100%; padding: clamp(28px, 4vw, 44px); border-radius: var(--r); text-align: center; box-shadow: var(--shadow); animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal-card .mk { width: 54px; height: 54px; margin-inline: auto 16px; margin-inline: auto; margin-block-end: 16px; border-radius: 14px; display: grid; place-items: center; background: rgba(31,158,150,.14); color: var(--teal-deep); }
.modal-card .mk svg { width: 28px; height: 28px; }
.modal-card h3 { font-size: 1.5rem; }
.modal-card p { color: var(--slate); margin: 12px 0 0; }
.modal-close { margin-block-start: 22px; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--indigo); color: var(--white); padding: 10px 16px; z-index: 200; border-radius: 8px; }
.skip:focus { inset-inline-start: 12px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cards-3, .courses, .plans { grid-template-columns: repeat(2, 1fr); }
  .paths { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; position: relative; z-index: 66; margin-inline-start: auto; }
  /* the closed menu sits off-screen via translateX, which would widen the page
     and add a horizontal scrollbar. clip it here. while closed the blurred .nav
     is its containing block so this catches it; while open .nav resolves against
     the viewport and is not clipped, so the full-screen panel still shows. */
  .nav { overflow: clip; }
  /* backdrop-filter on .nav makes it the containing block for fixed children,
     which traps the menu inside the bar. drop it while the menu is open so the
     overlay resolves against the viewport. */
  body.menu-open .nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-links { position: fixed; inset: 0; z-index: 65; flex: none; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 80px var(--pad) 40px; background: var(--paper); transform: translateX(100%); transition: transform .5s var(--ease); pointer-events: none; margin: 0; overflow-y: auto; }
  [dir="rtl"] .nav-links { transform: translateX(-100%); }
  body.menu-open .nav-links { transform: none; pointer-events: auto; }
  .nav-links a { font-size: 1.3rem; opacity: 1; }
  .nav-links .lang { margin-inline-start: 0; margin-block-start: 4px; }
  .nav-links .btn { margin-inline-start: 0; margin-block-start: 6px; font-size: 1.05rem; padding: .8em 2em; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; margin-inline: auto; }
  .learn { grid-template-columns: 1fr; }
  .learn-side { position: static; max-height: none; border-inline-end: 0; border-block-end: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .cards-3, .courses, .plans { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}
