/* ==========================================================================
   منصة النور المبين — ورقة الأنماط
   الاتجاه: RTL | السمة: كحلي داكن + تركوازي + ذهبي
   الزخرفة المتكررة: المشكاة/المحراب (القوس) والنجمة الثمانية
   ========================================================================== */

/* ---------- 1. الرموز (Design Tokens) ---------- */
:root {
  /* الأرضيات */
  --navy-950: #05141F;
  --navy-900: #081C2E;
  --navy-850: #0A2237;
  --navy-800: #0E2C45;
  --navy-700: #14395A;

  /* النور — تركوازي */
  --teal-600: #0F8A80;
  --teal-500: #17A398;
  --teal-400: #22C3B4;
  --teal-300: #5BDCCB;

  /* الدفء — ذهبي */
  --gold-600: #A9871F;
  --gold-500: #C9A227;
  --gold-400: #D9BC5F;

  --wa: #25D366;
  --wa-dark: #1DA851;

  /* النصوص */
  --text:        #EAF2F5;  /* ‎13.9:1‎ على navy-900 */
  --text-soft:   #C6D8E2;  /* ‎10.4:1‎ */
  --text-muted:  #9FB6C4;  /* ‎8.3:1‎  — يفي بـ AA للنص العادي */
  --text-faint:  #7D97A6;  /* ‎5.2:1‎  — للنصوص الثانوية فقط */

  /* الحدود والأسطح */
  --surface:     rgba(255,255,255,.035);
  --surface-2:   rgba(255,255,255,.06);
  --border:      rgba(255,255,255,.09);
  --border-2:    rgba(255,255,255,.16);

  /* التباعد — سلّم 4/8 */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;

  /* الأنصاف والظلال */
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;  --r-xl: 28px;  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 4px 16px rgba(0,0,0,.28);
  --sh-3: 0 12px 40px rgba(0,0,0,.38);
  --sh-4: 0 24px 70px rgba(0,0,0,.5);

  /* الحركة */
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: 150ms;  --t-mid: 240ms;  --t-slow: 380ms;

  /* الطبقات */
  --z-bg: 0; --z-body: 1; --z-sticky: 40; --z-fab: 60; --z-modal: 100;

  --wrap: 1200px;
  --header-h: 72px;
}

/* ---------- 2. إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;               /* 16px — لا تنزل عن ذلك في المتن */
  line-height: 1.75;
  color: var(--text);
  background: var(--navy-900);
  min-height: 100dvh;
  overflow-x: hidden;            /* لا تمرير أفقي */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }

/* التركيز — لا تُزال حلقة التركيز أبدًا */
:focus-visible {
  outline: 3px solid var(--teal-400);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; inset-inline-start: var(--sp-4); top: -100px;
  z-index: 200; padding: var(--sp-3) var(--sp-5);
  background: var(--teal-400); color: var(--navy-950);
  border-radius: var(--r-md); font-weight: 700;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- 3. الأدوات ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-5); }
.wrap-narrow { max-width: 760px; }

@media (min-width: 768px)  { .wrap { padding-inline: var(--sp-6); } }
@media (min-width: 1024px) { .wrap { padding-inline: var(--sp-7); } }

/* الأيقونات تُحقن كـ SVG داخل span من main.js */
.ico { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; }
.ico svg { width: 100%; height: 100%; display: block; }
.fab-wa .ico { width: 28px; height: 28px; }
.lb-close .ico { width: 20px; height: 20px; }
.lb-nav .ico { width: 22px; height: 22px; }
.course-zoom .ico, .course-zoom svg { width: 16px; height: 16px; }
.scroll-hint .ico { width: 18px; height: 18px; }
.pillar-arch svg { width: 26px; height: 26px; }

/* تنبيه تعطيل الجافاسكربت */
.noscript-note {
  padding: var(--sp-5);
  background: var(--gold-500); color: #241A02;
  text-align: center; font-weight: 700;
}

/* شارة المعاينة المحلية — تظهر فقط عند وجود تعديلات غير منشورة */
.local-badge {
  position: fixed; z-index: var(--z-fab);
  inset-block-end: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  inset-inline-start: var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(201,162,39,.14);
  border: 1px solid rgba(201,162,39,.45);
  border-radius: var(--r-pill);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--gold-400); font-size: .8125rem; font-weight: 600;
  box-shadow: var(--sh-2);
}
.local-badge a {
  display: inline-flex; align-items: center; min-height: 32px;
  padding-inline: var(--sp-3);
  background: var(--gold-500); color: #241A02;
  border-radius: var(--r-pill); font-weight: 800;
}
@media (max-width: 560px) {
  .local-badge { inset-inline: var(--sp-4) auto; inset-block-end: calc(88px + env(safe-area-inset-bottom, 0px)); font-size: .75rem; }
}

/* النجمة الثمانية — زخرفة الخلفية (مأخوذة من إعلاناتكم) */
.hero-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%2322C3B4' stroke-width='1' stroke-opacity='.5'%3E%3Cpath d='M36 6 L44 20 L60 20 L52 34 L60 48 L44 48 L36 62 L28 48 L12 48 L20 34 L12 20 L28 20 Z'/%3E%3Cpath d='M36 14 L41 24 L52 24 L46.5 34 L52 44 L41 44 L36 54 L31 44 L20 44 L25.5 34 L20 24 L31 24 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  opacity: .05;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 15%, transparent 72%);
}

/* الوهج — «النور» */
.hero-glow {
  position: absolute;
  inset-inline-start: 50%;
  top: -18%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(50%);
  background:
    radial-gradient(circle at 50% 42%, rgba(34,195,180,.20) 0%, transparent 52%),
    radial-gradient(circle at 50% 62%, rgba(201,162,39,.10) 0%, transparent 46%);
  filter: blur(14px);
  pointer-events: none;
}

/* ---------- 4. الترويسة ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(8,28,46,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease-out);
}
.site-header.is-stuck {
  background: rgba(5,20,31,.92);
  border-bottom-color: var(--border);
  box-shadow: var(--sh-2);
}

.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
@media (min-width: 1024px) {
  .header-inner { gap: var(--sp-5); }
}

.brand { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand-mark { width: 34px; height: auto; filter: drop-shadow(0 2px 8px rgba(34,195,180,.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 1.0625rem; letter-spacing: -.02em; }
.brand-sub { font-size: .6875rem; color: var(--text-faint); font-weight: 500; }

.nav { margin: 0; }
.nav-list { display: flex; align-items: center; gap: var(--sp-2); }
.nav-list a {
  display: block; padding: var(--sp-2) var(--sp-3);
  font-size: .9375rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap;
  border-radius: var(--r-pill);
  transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.nav-list a:hover { color: var(--text); background: var(--surface-2); }
.nav-list a.is-current { color: var(--teal-300); background: rgba(34,195,180,.10); }

.header-cta { flex: none; }
.nav-toggle { display: none; }

/* ---------- 5. الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-3);
  min-height: 48px;                       /* ≥44px — هدف لمس */
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-weight: 700; font-size: .9375rem;
  cursor: pointer; position: relative;
  transition: transform var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 44px; padding: var(--sp-2) var(--sp-4); font-size: .875rem; }
.btn-lg { min-height: 56px; padding: var(--sp-4) var(--sp-7); font-size: 1.0625rem; }

.btn-wa {
  background: linear-gradient(160deg, var(--wa) 0%, var(--wa-dark) 100%);
  color: #04220F;
  box-shadow: 0 6px 22px rgba(37,211,102,.28), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-wa:hover { box-shadow: 0 10px 30px rgba(37,211,102,.40), inset 0 1px 0 rgba(255,255,255,.3); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--teal-400); color: var(--teal-300); }
.ico-arrow { transition: transform var(--t-fast) var(--ease-out); }
.btn-ghost:hover .ico-arrow { transform: translateX(-4px); }   /* RTL: للأمام = يسار */

.tel-num { font-variant-numeric: tabular-nums; letter-spacing: .06em; }

/* ---------- 6. الواجهة (Hero) ---------- */
.hero {
  position: relative;
  padding-block: clamp(var(--sp-8), 10vw, var(--sp-10)) var(--sp-9);
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-850) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: var(--z-bg); pointer-events: none; }

.hero-arch {
  position: absolute;
  inset-inline-start: 50%; transform: translateX(50%);
  bottom: 0;
  width: min(560px, 90vw); height: auto;
  opacity: .5;
}

.hero-inner {
  position: relative; z-index: var(--z-body);
  display: grid; gap: var(--sp-8);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: var(--sp-7); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(34,195,180,.09);
  border: 1px solid rgba(34,195,180,.24);
  border-radius: var(--r-pill);
  font-size: .8125rem; font-weight: 600; color: var(--teal-300);
  margin-bottom: var(--sp-5);
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 rgba(34,195,180,.65);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,195,180,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(34,195,180,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,195,180,0); }
}

.hero-title { margin-bottom: var(--sp-5); }
.hero-title-main {
  display: block;
  font-size: clamp(2.75rem, 8.5vw, 5.25rem);
  font-weight: 900; line-height: 1.06; letter-spacing: -.03em;
  background: linear-gradient(150deg, #FFFFFF 0%, var(--teal-300) 48%, var(--gold-400) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: .08em;           /* حتى لا تُقصّ النزلات */
}
.hero-title-sub {
  display: block;
  margin-top: var(--sp-3);
  font-family: 'Amiri', 'Tajawal', serif;
  font-size: clamp(1.125rem, 3.2vw, 1.75rem);
  font-weight: 400; color: var(--gold-400);
  letter-spacing: 0;
}

.hero-lede {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-soft);
  max-width: 62ch;                 /* ‎طول سطر مقروء‎ */
  margin-bottom: var(--sp-6);
}
.hero-lede strong { color: var(--teal-300); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-7); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: var(--sp-6); justify-content: start;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.stat dt { font-size: .8125rem; color: var(--text-faint); margin-bottom: var(--sp-1); }
.stat dd { margin: 0; }
.stat-num {
  font-size: 2rem; font-weight: 900; color: var(--teal-300);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stat-txt { font-size: 1.0625rem; font-weight: 700; color: var(--text); }

/* البطاقات الزجاجية الطائرة */
.hero-cards { position: relative; min-height: 340px; display: none; }
@media (min-width: 1024px) { .hero-cards { display: block; } }

.glass-card {
  position: absolute;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255,255,255,.10);
  padding: var(--sp-5);
  animation: float 7s var(--ease-out) infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.gc-verse {
  inset-inline-end: 0; top: 0; width: 300px;
  text-align: center;
  border-color: rgba(201,162,39,.30);
  background: linear-gradient(155deg, rgba(201,162,39,.10), rgba(255,255,255,.04));
}
.gc-label { font-size: .75rem; color: var(--gold-400); font-weight: 700; }
.verse {
  font-family: 'Amiri', serif; font-size: 1.375rem; line-height: 1.9;
  color: #FFF7E4; margin-block: var(--sp-3);
}
.gc-src { font-size: .75rem; color: var(--text-faint); }

.gc-live {
  inset-inline-start: 0; top: 168px; width: 290px;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  animation-delay: -2.4s;
}
.gc-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 9px; flex: none;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 rgba(34,195,180,.6);
  animation: pulse 2.4s var(--ease-out) infinite;
}
.gc-live strong { display: block; font-size: .9375rem; }
.gc-live span { font-size: .8125rem; color: var(--text-faint); }

.gc-logo {
  inset-inline-end: 24px; top: 292px; width: 236px;
  display: flex; align-items: center; gap: var(--sp-3);
  animation-delay: -4.8s;
}
.gc-logo img { width: 38px; }
.gc-logo strong { display: block; font-size: .9375rem; }
.gc-logo span { font-size: .6875rem; color: var(--text-faint); letter-spacing: .08em; }

.scroll-hint {
  position: relative; z-index: var(--z-body);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-8);
  font-size: .75rem; color: var(--text-faint);
}
.scroll-hint svg { width: 18px; height: 18px; animation: nudge 2s var(--ease-out) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(5px); opacity: 1; } }

/* ---------- 7. الأقسام ---------- */
.section { position: relative; padding-block: clamp(var(--sp-8), 9vw, var(--sp-10)); }
.section-alt { background: var(--navy-950); }

.sec-head { max-width: 68ch; margin-bottom: var(--sp-8); }
.sec-eyebrow {
  font-size: .8125rem; font-weight: 700; color: var(--teal-400);
  letter-spacing: .1em; margin-bottom: var(--sp-3);
  display: flex; align-items: center; gap: var(--sp-3);
}
.sec-eyebrow::after {
  content: ""; flex: 1; height: 1px; max-width: 90px;
  background: linear-gradient(to left, rgba(34,195,180,.5), transparent);
}
.sec-title {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  margin-bottom: var(--sp-4);
}
.sec-lede { font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--text-muted); max-width: 60ch; }

/* ---------- 8. الأركان الثلاثة ---------- */
.pillars {
  display: grid; gap: var(--sp-5);
  margin-bottom: var(--sp-9);
}
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

.pillar {
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--t-mid) var(--ease-out),
              border-color var(--t-mid) var(--ease-out),
              background var(--t-mid) var(--ease-out);
}
.pillar:hover {
  transform: translateY(-5px);
  border-color: rgba(34,195,180,.35);
  background: var(--surface-2);
}

/* المشكاة — القوس الذي يحتضن الأيقونة */
.pillar-arch {
  width: 60px; height: 74px;
  display: grid; place-items: center;
  margin-bottom: var(--sp-5);
  color: var(--teal-300);
  background: linear-gradient(180deg, rgba(34,195,180,.16), rgba(34,195,180,.03));
  border: 1px solid rgba(34,195,180,.28);
  border-radius: 30px 30px var(--r-sm) var(--r-sm) / 38px 38px var(--r-sm) var(--r-sm);
}
.pillar-arch svg { width: 26px; height: 26px; }
.pillar h3 { font-size: 1.375rem; margin-bottom: var(--sp-3); }
.pillar p { color: var(--text-muted); font-size: .9375rem; }

/* ---------- 9. خطوات المنهج ---------- */
.method {
  padding: var(--sp-7);
  background: linear-gradient(150deg, rgba(34,195,180,.06), rgba(201,162,39,.03));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.method-title { font-size: 1.5rem; margin-bottom: var(--sp-6); }
.method-steps { display: grid; gap: var(--sp-5); counter-reset: step; }
@media (min-width: 900px) { .method-steps { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }

.method-steps li { display: flex; gap: var(--sp-4); align-items: flex-start; }
@media (min-width: 900px) { .method-steps li { flex-direction: column; gap: var(--sp-3); } }

.step-n {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(34,195,180,.12);
  border: 1px solid rgba(34,195,180,.3);
  color: var(--teal-300);
  font-weight: 900; font-size: 1.0625rem;
}
.method-steps strong { display: block; margin-bottom: var(--sp-1); font-size: 1rem; }
.method-steps p { color: var(--text-muted); font-size: .875rem; line-height: 1.65; }

/* ---------- 10. الدورات ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.chip {
  min-height: 44px; padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .875rem; font-weight: 600;
  transition: all var(--t-fast) var(--ease-out);
  touch-action: manipulation;
}
.chip:hover { color: var(--text); border-color: var(--teal-400); }
.chip.is-active {
  background: var(--teal-400); border-color: var(--teal-400);
  color: var(--navy-950); font-weight: 700;
}

.courses { display: grid; gap: var(--sp-5); }
@media (min-width: 600px)  { .courses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .courses { grid-template-columns: repeat(3, 1fr); } }

.course {
  transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out);
}
.course[hidden] { display: none; }

.course-btn {
  display: block; width: 100%; text-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease-out),
              border-color var(--t-mid) var(--ease-out),
              box-shadow var(--t-mid) var(--ease-out);
}
.course-btn:hover {
  transform: translateY(-6px);
  border-color: rgba(34,195,180,.45);
  box-shadow: var(--sh-4);
}
.course-btn:active { transform: translateY(-2px) scale(.99); }

.course-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--navy-800);
}
.course-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform var(--t-slow) var(--ease-out);
}
.course-btn:hover .course-media img { transform: scale(1.045); }

.course-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5,20,31,.85) 100%);
  pointer-events: none;
}

.course-tag {
  position: absolute; z-index: 2;
  inset-block-start: var(--sp-3); inset-inline-start: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
}
.tag-men   { background: rgba(34,195,180,.9);  color: #04231F; }
.tag-women { background: rgba(201,162,39,.92); color: #241A02; }
.tag-both  { background: rgba(255,255,255,.9); color: var(--navy-950); }

.course-zoom {
  position: absolute; z-index: 2;
  inset-block-start: var(--sp-3); inset-inline-end: var(--sp-3);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(5,20,31,.6);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out);
}
.course-zoom svg { width: 16px; height: 16px; }
.course-btn:hover .course-zoom, .course-btn:focus-visible .course-zoom { opacity: 1; }

.course-body { padding: var(--sp-5); }
.course-title { font-size: 1.0625rem; margin-bottom: var(--sp-2); line-height: 1.45; }
.course-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  font-size: .8125rem; color: var(--text-faint);
}
.course-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.course-date { font-variant-numeric: tabular-nums; }

.courses-note {
  margin-top: var(--sp-7);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted); font-size: .9375rem;
}
.courses-note a {
  display: inline-flex; align-items: center;
  min-height: 44px;                        /* هدف لمس داخل النص */
  color: var(--teal-300); text-decoration: underline; text-underline-offset: 3px;
}
.courses-note a:hover { color: var(--teal-400); }

/* الشعار — يبقى ‎≥44px‎ للمس دون أن يكبر بصريًا */
.brand { min-height: 44px; }

/* ---------- 10ب. التبويبات ---------- */
.tabs {
  display: flex; gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}
.tab {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 48px; padding: 0 var(--sp-5);
  color: var(--text-muted); font-weight: 700; font-size: .9375rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
  touch-action: manipulation;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--teal-300); border-bottom-color: var(--teal-400); }
.tab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 rgba(34,195,180,.6);
  animation: pulse 2.4s var(--ease-out) infinite;
}
.tab-count {
  min-width: 22px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--surface-2); border-radius: var(--r-pill);
  font-size: .6875rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tab.is-active .tab-count { background: rgba(34,195,180,.2); color: var(--teal-300); }

.empty-state {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--r-lg);
  max-width: 56ch; margin-inline: auto;
}

/* ---------- 10ج. بطاقات الدورات الحالية ---------- */
.current-list { display: grid; gap: var(--sp-5); }
@media (min-width: 760px) { .current-list { grid-template-columns: repeat(2, 1fr); } }

.cur-btn {
  display: flex; flex-direction: column;
  width: 100%; height: 100%; text-align: start;
  background: linear-gradient(155deg, rgba(34,195,180,.07), var(--surface));
  border: 1px solid rgba(34,195,180,.28);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease-out),
              border-color var(--t-mid) var(--ease-out),
              box-shadow var(--t-mid) var(--ease-out);
}
.cur-btn:hover {
  transform: translateY(-5px);
  border-color: var(--teal-400);
  box-shadow: var(--sh-4), 0 0 0 1px rgba(34,195,180,.2);
}
.cur-btn:active { transform: translateY(-1px) scale(.995); }

.cur-media { aspect-ratio: 16 / 7; overflow: hidden; background: var(--navy-800); }
.cur-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.cur-body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.cur-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.cur-live {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: rgba(34,195,180,.14);
  border: 1px solid rgba(34,195,180,.4);
  border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700; color: var(--teal-300);
}
.cur-tags .course-tag { position: static; }
.cur-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-400);
  animation: pulse 2.4s var(--ease-out) infinite;
}
.cur-title { font-size: 1.25rem; margin-bottom: var(--sp-2); line-height: 1.4; }
.cur-sub { color: var(--text-muted); font-size: .875rem; margin-bottom: var(--sp-4); }

.cur-facts {
  display: flex; flex-wrap: wrap; gap: var(--sp-5);
  padding: var(--sp-4) 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.cur-facts dt { font-size: .75rem; color: var(--text-faint); margin-bottom: 2px; }
.cur-facts dd { margin: 0; font-size: .9375rem; font-weight: 700; color: var(--teal-300); }

.cur-cta {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: .875rem; font-weight: 700; color: var(--teal-300);
}
.cur-cta .ico { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease-out); }
.cur-btn:hover .cur-cta .ico { transform: translateX(-4px); }

/* ---------- 10د. الأوراق المنبثقة ---------- */
.sheet { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-4); }
.sheet[hidden] { display: none; }
.sheet-back {
  position: absolute; inset: 0;
  background: rgba(2,10,16,.86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade var(--t-mid) var(--ease-out);
}
.sheet-panel {
  position: relative;
  width: min(680px, 100%); max-height: 92dvh;
  background: var(--navy-850);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-4);
  overflow: hidden;
  animation: lbIn var(--t-slow) var(--ease-out);
}
.sheet-scroll { max-height: 92dvh; overflow-y: auto; padding: var(--sp-7) var(--sp-6) var(--sp-6); }
.sheet-x {
  position: absolute; z-index: 2;
  top: var(--sp-3); inset-inline-start: var(--sp-3);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(5,20,31,.7);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.sheet-x:hover { background: rgba(255,255,255,.16); }

/* تفاصيل الدورة */
.dt-head { margin-bottom: var(--sp-5); padding-inline-end: 44px; }
.dt-tag { position: static !important; display: inline-block; margin-bottom: var(--sp-3); }
.dt-head h2 { font-size: clamp(1.375rem, 3.5vw, 1.875rem); margin-bottom: var(--sp-2); }
.dt-head p { color: var(--text-muted); font-size: .9375rem; }

.dt-dates {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.dt-date { display: flex; gap: var(--sp-3); align-items: flex-start; }
.dt-date .ico { width: 18px; height: 18px; color: var(--teal-400); margin-top: 3px; }
.dt-date dt { font-size: .75rem; color: var(--text-faint); }
.dt-date dd { margin: 0; font-size: .875rem; font-weight: 700; }

.dt-cols { display: grid; gap: var(--sp-5); margin-bottom: var(--sp-5); }
@media (min-width: 620px) { .dt-cols { grid-template-columns: 1fr 1fr; } }
.dt-col h3 {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .9375rem; color: var(--teal-300);
  margin-bottom: var(--sp-3);
}
.dt-col h3 .ico { width: 16px; height: 16px; }
.dt-col ul { display: grid; gap: var(--sp-2); }
.dt-col li {
  position: relative;
  padding-inline-start: var(--sp-5);
  font-size: .875rem; color: var(--text-soft); line-height: 1.6;
}
.dt-col li::before {
  content: ""; position: absolute;
  inset-inline-start: 0; top: .6em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-400);
}
.dt-col li.muted { color: var(--text-faint); }
.dt-col li.muted::before { background: var(--text-faint); }

.dt-fee {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
  background: linear-gradient(150deg, rgba(201,162,39,.14), rgba(201,162,39,.04));
  border: 1px solid rgba(201,162,39,.35);
  border-radius: var(--r-lg);
}
.dt-fee span { font-size: .875rem; color: var(--gold-400); }
.dt-fee strong { font-size: 1.375rem; color: #FFF3D6; }

.dt-closed {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  background: rgba(240,104,94,.1);
  border: 1px solid rgba(240,104,94,.35);
  border-radius: var(--r-lg);
  color: #FFB4AE; font-size: .875rem;
}
.dt-closed .ico { width: 18px; height: 18px; margin-top: 2px; flex: none; }

.dt-agree {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.agree {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  min-height: 44px; margin-bottom: var(--sp-4);
  cursor: pointer; font-size: .9375rem; color: var(--text-soft);
}
.agree input {
  width: 20px; height: 20px; flex: none; margin-top: 3px;
  accent-color: var(--teal-400); cursor: pointer;
}
#btnRegister { width: 100%; }
#btnRegister:disabled { opacity: .45; cursor: not-allowed; }
#btnRegister:disabled:active { transform: none; }
.dt-hint { margin-top: var(--sp-2); font-size: .8125rem; color: var(--text-faint); text-align: center; }

/* الاستمارة */
.fm-head { margin-bottom: var(--sp-6); padding-inline-end: 44px; }
.fm-head h2 { font-size: 1.5rem; margin-bottom: var(--sp-1); }
.fm-head p { color: var(--teal-300); font-size: .875rem; font-weight: 700; }

.fm-step { margin-bottom: var(--sp-6); }
.fm-step h3 {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: 1rem; margin-bottom: var(--sp-4);
}
.fm-n {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(34,195,180,.16);
  border: 1px solid rgba(34,195,180,.35);
  color: var(--teal-300);
  font-size: .8125rem; font-weight: 900;
}

.fld { display: block; margin-bottom: var(--sp-4); }
.fld > span { display: block; margin-bottom: var(--sp-2); font-size: .8125rem; font-weight: 700; color: var(--text-soft); }
.fld > span b { color: var(--teal-400); }
.fld input, .fld select {
  width: 100%; min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--navy-950);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease-out);
}
.fld input:focus, .fld select:focus { border-color: var(--teal-400); }
.fld.is-bad input, .fld.is-bad select { border-color: #F0685E; }
.fld .hint { display: block; margin-top: var(--sp-2); font-size: .75rem; color: var(--text-faint); }
.err { display: block; margin-top: var(--sp-2); font-size: .8125rem; color: #FFB4AE; font-style: normal; }
.err:empty { display: none; }

.fld-row { display: grid; gap: var(--sp-4); }
@media (min-width: 560px) { .fld-row { grid-template-columns: 1fr 1fr; } }

.fld-guard {
  padding: var(--sp-4);
  background: rgba(201,162,39,.07);
  border: 1px solid rgba(201,162,39,.3);
  border-radius: var(--r-lg);
}
.guard-note {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  margin-bottom: var(--sp-4);
  font-size: .8125rem; color: var(--gold-400);
}
.guard-note .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; }

/* الدفع */
.pay-card {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
}
.pay-bank { margin-bottom: var(--sp-4); }
.pay-logo { height: 38px; width: auto; }
.pay-bank-txt strong { display: block; font-size: 1.0625rem; color: var(--teal-300); }
.pay-bank-txt span { font-size: .8125rem; color: var(--text-muted); }

.pay-acc { margin-bottom: var(--sp-4); }
.pay-acc > span { display: block; font-size: .75rem; color: var(--text-faint); margin-bottom: var(--sp-2); }
.pay-acc-row { display: flex; align-items: center; gap: var(--sp-3); }
.pay-acc-row strong {
  font-size: 1.5rem; font-weight: 900;
  letter-spacing: .12em; font-variant-numeric: tabular-nums;
  color: #FFF;
}
.pay-copy {
  min-height: 36px; padding: 0 var(--sp-4);
  background: rgba(34,195,180,.14);
  border: 1px solid rgba(34,195,180,.4);
  border-radius: var(--r-pill);
  color: var(--teal-300); font-size: .75rem; font-weight: 700;
}
.pay-copy:hover { background: rgba(34,195,180,.24); }
.pay-note { font-size: .8125rem; color: var(--text-muted); margin-bottom: var(--sp-4); }
.pay-fee {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.pay-fee span { font-size: .8125rem; color: var(--text-faint); }
.pay-fee strong { font-size: 1.125rem; color: var(--gold-400); }

/* رفع الإشعار */
.drop {
  position: relative;
  border: 2px dashed var(--border-2);
  border-radius: var(--r-lg);
  background: var(--navy-950);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.drop:hover, .drop.is-over { border-color: var(--teal-400); background: rgba(34,195,180,.06); }
.drop input[type="file"] { display: none; }

.drop-empty {
  display: grid; place-items: center; gap: var(--sp-2);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
}
.drop-empty .ico { width: 28px; height: 28px; color: var(--teal-400); }
.drop-empty strong { font-size: .9375rem; }
.drop-empty small { font-size: .75rem; color: var(--text-faint); }

.drop-has { display: flex; gap: var(--sp-4); align-items: center; padding: var(--sp-4); }
.drop-has[hidden] { display: none !important; }
.drop-has img {
  width: 76px; height: 96px; flex: none;
  object-fit: cover; border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
}
.drop-meta { min-width: 0; }
.drop-meta strong {
  display: block; font-size: .875rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drop-meta small { font-size: .75rem; color: var(--text-faint); }
.drop-rm {
  margin-top: var(--sp-2);
  min-height: 34px; padding: 0 var(--sp-4);
  background: rgba(240,104,94,.14);
  border: 1px solid rgba(240,104,94,.4);
  border-radius: var(--r-pill);
  color: #FFB4AE; font-size: .75rem; font-weight: 700;
}
.drop-rm:hover { background: rgba(240,104,94,.24); }

/* الإرسال */
.fm-send { padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.fm-privacy {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  margin-bottom: var(--sp-4);
  font-size: .75rem; color: var(--text-faint);
}
.fm-privacy .ico { width: 14px; height: 14px; margin-top: 2px; flex: none; }
#btnSubmit { width: 100%; }
#btnSubmit:disabled { opacity: .6; cursor: progress; }
.fm-error {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(240,104,94,.12);
  border: 1px solid rgba(240,104,94,.4);
  border-radius: var(--r-md);
  color: #FFB4AE; font-size: .8125rem;
}

.fm-done { text-align: center; padding: var(--sp-6) var(--sp-4); }
.done-mark {
  width: 64px; height: 64px; margin: 0 auto var(--sp-5);
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(53,208,127,.16);
  border: 1px solid rgba(53,208,127,.45);
  color: #35D07F;
}
.done-mark .ico { width: 30px; height: 30px; }
.fm-done h3 { font-size: 1.25rem; margin-bottom: var(--sp-3); }
.fm-done p { color: var(--text-muted); font-size: .9375rem; margin-bottom: var(--sp-5); max-width: 46ch; margin-inline: auto; }

@media (max-width: 560px) {
  .sheet { padding: 0; align-items: end; }
  .sheet-panel { max-height: 94dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; width: 100%; }
  .sheet-scroll { max-height: 94dvh; padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px)); }
  .cur-facts { gap: var(--sp-4); }
}

/* ---------- 11. آراء الطلاب ---------- */
.voices { display: grid; gap: var(--sp-5); }
@media (min-width: 800px) { .voices { grid-template-columns: repeat(3, 1fr); } }

.voice {
  position: relative;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.voice.is-placeholder {
  border-style: dashed;
  border-color: rgba(201,162,39,.3);
  background: rgba(201,162,39,.035);
}
.voice-badge {
  position: absolute; top: -10px; inset-inline-start: var(--sp-5);
  padding: 2px var(--sp-3);
  background: var(--gold-500); color: #241A02;
  border-radius: var(--r-pill);
  font-size: .6875rem; font-weight: 800;
}
.voice blockquote p {
  color: var(--text-soft); font-size: .9375rem; line-height: 1.8;
  margin-bottom: var(--sp-5);
}
.voice footer { display: flex; flex-direction: column; gap: 2px; }
.voice-name { font-weight: 700; font-size: .9375rem; }
.voice-meta { font-size: .8125rem; color: var(--text-faint); }

/* ---------- 12. الأسئلة الشائعة ---------- */
.faq-list { display: grid; gap: var(--sp-3); }
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-out);
}
.faq[open] { border-color: rgba(34,195,180,.35); background: var(--surface-2); }

.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 60px; padding: var(--sp-4) var(--sp-5);
  font-weight: 700; font-size: 1rem;
  cursor: pointer; list-style: none;
  touch-action: manipulation;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--teal-300); }

.faq-icon {
  position: relative; flex: none;
  width: 18px; height: 18px;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%;
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--teal-400);
  transition: transform var(--t-mid) var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }
.faq[open] .faq-icon::after { transform: rotate(0deg); }

.faq-body { padding: 0 var(--sp-5) var(--sp-5); }
.faq-body p { color: var(--text-muted); font-size: .9375rem; max-width: 68ch; }

/* ---------- 13. نداء التسجيل ---------- */
.section-cta {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
}
.cta-glow { top: -40%; opacity: .8; }
.cta-inner { position: relative; z-index: var(--z-body); }
.cta-inner .sec-eyebrow { justify-content: center; }
.cta-inner .sec-eyebrow::after { display: none; }
.cta-inner .sec-lede { margin-inline: auto; }

.cta-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-4);
  margin-block: var(--sp-7) var(--sp-4);
}
.cta-fine { font-size: .8125rem; color: var(--text-faint); }

/* ---------- 14. التذييل ---------- */
.site-footer {
  background: var(--navy-950);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-8) var(--sp-5);
}
.footer-inner {
  display: grid; gap: var(--sp-7);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 800px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-8); } }

.footer-brand img { width: 96px; margin-bottom: var(--sp-4); }
.footer-brand p { color: var(--text-faint); font-size: .875rem; max-width: 44ch; }

.site-footer h2 { font-size: .8125rem; color: var(--teal-400); letter-spacing: .1em; margin-bottom: var(--sp-4); }
.site-footer li a {
  display: inline-flex; align-items: center;
  min-height: 44px;                        /* هدف لمس */
  color: var(--text-muted); font-size: .9375rem;
  transition: color var(--t-fast) var(--ease-out);
}
.site-footer li a:hover { color: var(--teal-300); }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  font-size: .8125rem; color: var(--text-faint);
}
.footer-verse { font-family: 'Amiri', serif; font-size: 1rem; color: var(--gold-400); }

/* ---------- 15. زر واتساب العائم ---------- */
.fab-wa {
  position: fixed; z-index: var(--z-fab);
  inset-inline-end: var(--sp-5);
  inset-block-end: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px;                 /* ≥44px */
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--wa), var(--wa-dark));
  color: #04220F;
  box-shadow: 0 8px 28px rgba(37,211,102,.42);
  transform: translateY(80px); opacity: 0; pointer-events: none;
  transition: transform var(--t-slow) var(--ease-spring), opacity var(--t-mid) var(--ease-out);
}
.fab-wa.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.fab-wa:hover { box-shadow: 0 12px 36px rgba(37,211,102,.55); }
.fab-wa:active { transform: scale(.93); }
.fab-wa svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- 16. عارض الصور ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--sp-4);
}
.lightbox[hidden] { display: none; }

.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(2,10,16,.86);              /* حاجب قوي — تعتيم ‎>60%‎ */
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade var(--t-mid) var(--ease-out);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb-panel {
  position: relative;
  max-width: min(1000px, 100%);
  max-height: 92dvh;
  display: flex; align-items: center; justify-content: center;
  animation: lbIn var(--t-slow) var(--ease-out);
}
@keyframes lbIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }

.lb-figure {
  display: flex; flex-direction: column;
  max-height: 92dvh;
  background: var(--navy-850);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-4);
}
.lb-figure img {
  min-height: 0; flex: 1;
  object-fit: contain;
  max-height: calc(92dvh - 92px);
  background: var(--navy-950);
}
.lb-figure figcaption { padding: var(--sp-4) var(--sp-5); flex: none; }
.lb-figure h2 { font-size: 1rem; margin-bottom: 2px; }
.lb-figure p { font-size: .8125rem; color: var(--text-faint); }

.lb-close {
  position: absolute; z-index: 2;
  top: calc(var(--sp-3) * -1 - 40px);
  inset-inline-end: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lb-close:hover { background: rgba(255,255,255,.16); }
.lb-close svg { width: 20px; height: 20px; }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(5,20,31,.75);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background var(--t-fast) var(--ease-out);
}
.lb-nav:hover { background: var(--teal-500); color: var(--navy-950); border-color: var(--teal-400); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { inset-inline-end: calc(-24px - var(--sp-3)); }
.lb-next { inset-inline-start: calc(-24px - var(--sp-3)); }

@media (max-width: 900px) {
  .lb-prev { inset-inline-end: var(--sp-2); }
  .lb-next { inset-inline-start: var(--sp-2); }
  .lb-close { top: var(--sp-2); inset-inline-end: var(--sp-2); background: rgba(5,20,31,.8); }
}

body.lb-open { overflow: hidden; }

/* ---------- 17. الكشف عند التمرير ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 18. الجوال ---------- */
@media (max-width: 900px) {
  .header-cta { display: none; }

  /* المبدّل — تموضع مطلق حتى تلتقي الأعمدة في المركز تمامًا عند التحول إلى X */
  .nav-toggle {
    position: relative;
    display: block;
    width: 44px; height: 44px;                /* هدف لمس */
    margin-inline-start: auto;
    border-radius: var(--r-sm);
  }
  .nav-toggle-bar {
    position: absolute;
    inset-inline-start: 50%; top: 50%;
    width: 22px; height: 2px; margin-inline-start: -11px;
    border-radius: 2px;
    background: var(--text);
    transition: transform var(--t-mid) var(--ease-out), opacity var(--t-fast) var(--ease-out);
  }
  .nav-toggle-bar:nth-child(1) { transform: translateY(-8px); }
  .nav-toggle-bar:nth-child(2) { transform: translateY(0); }
  .nav-toggle-bar:nth-child(3) { transform: translateY(6px); }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(-1px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-1px) rotate(-45deg); }

  /* =========================================================================
     قائمة الموبايل الجانبية (بناء جديد ونظيف)
     ========================================================================= */
  .nav { margin: 0; }

  .nav-backdrop {
    position: fixed;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    left: 0; right: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }

  .nav-list {
    position: fixed;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    right: 0;
    left: auto;
    width: 320px;
    max-width: 90vw;
    background: var(--navy-950);
    z-index: 100;
    display: flex !important;
    flex-direction: column;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    
    visibility: hidden;
    transform: translateX(350px); /* إزاحة فيزيائية يميناً لتخطي مشاكل RTL في سفاري */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.4s;
  }
  .nav-list.is-open { 
    visibility: visible !important; 
    transform: translateX(0) !important; 
  }

  .nav-list li {
    list-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-list a {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }
  .nav-list a:hover, 
  .nav-list a:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--teal-300);
  }
  .nav-list a.is-current {
    color: var(--teal-300);
    background: rgba(34, 195, 180, 0.06);
    border-right: 4px solid var(--teal-400);
  }

  .nav-footer-mobile {
    display: block !important;
    margin-top: auto;
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
  }
  .nav-footer-mobile .footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    margin-top: 0;
  }
  .nav-footer-mobile .footer-social a {
    display: flex;
    padding: 8px;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
  }
  .nav-footer-mobile .footer-social a:hover {
    color: var(--teal-400);
    background: rgba(255, 255, 255, 0.1);
  }
  .nav-footer-mobile p {
    text-align: center;
    color: var(--text-faint);
    font-size: 0.875rem;
    margin: 0;
  }

  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .stat-num { font-size: 1.625rem; }
  .stat-txt { font-size: .9375rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .hero-stats { gap: var(--sp-3); }
  .stat dt { font-size: .6875rem; }
}

/* ---------- 19. تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .glass-card { animation: none; }
}

/* ---------- 20. الطباعة ---------- */
@media print {
  .site-header, .fab-wa, .scroll-hint, .filters, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   إضافات نسخة PHP — أزرار الترويسة، المساهمة، روابط التذييل
   ========================================================================== */
.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.ico-gold { color: var(--gold-400); }
.ico-navy { color: var(--navy-950); }

.header-give .ico { width: 18px; height: 18px; }
.nav-give { display: none; }   /* يظهر في قائمة الجوال فقط */

/* زر ذهبي (المساهمة في التذييل) */
.btn-gold {
  background: linear-gradient(160deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 6px 20px rgba(201,162,39,.25), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-gold:hover { box-shadow: 0 10px 28px rgba(201,162,39,.38), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-gold .ico { width: 18px; height: 18px; }

/* روابط التواصل الاجتماعي في التذييل */
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.footer-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.footer-social a:hover { background: var(--teal-500); color: var(--navy-950); border-color: var(--teal-400); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; }

/* قسم المساهمة في التذييل */
.footer-give h2 { font-size: .8125rem; color: var(--teal-400); letter-spacing: .1em; margin-bottom: var(--sp-4); }
.footer-give p { color: var(--text-faint); font-size: .875rem; margin-bottom: var(--sp-4); max-width: 34ch; }

/* سطر حقوق المطوّر */
.footer-credit {
  padding-top: var(--sp-4);
  text-align: center;
  font-size: .75rem; color: var(--text-faint);
}
.footer-credit a { color: var(--teal-300); font-weight: 700; border-bottom: 1px solid rgba(34,195,180,.3); }
.footer-credit a:hover { color: var(--teal-400); }

@media (max-width: 900px) {
  .header-actions { display: none; }   /* الأزرار تنتقل إلى قائمة الجوال */
  .nav-give { display: block; }
  .nav-give a { color: var(--gold-400) !important; font-weight: 800; }
  .nav-footer-mobile { display: block; margin-top: auto; padding-top: var(--sp-5); }
}
.nav-footer-mobile { display: none; } /* Hide on desktop */

/* قسم الإحصائيات (impact) */
.impact { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 700px) { .impact { grid-template-columns: repeat(3, 1fr); } }
.impact-card {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out);
}
.impact-card:hover { border-color: rgba(34,195,180,.35); transform: translateY(-4px); }
.impact-card dd {
  margin: 0 0 var(--sp-2);
  font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 900; line-height: 1;
  color: var(--teal-300);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(34,195,180,.35);
}
.impact-card dt { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

/* ==========================================================================
   صفحة تفاصيل الدورة والتسجيل (course.php)
   ========================================================================== */
.back-link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  color: var(--text-muted); font-weight: 700; font-size: .9375rem;
  transition: color var(--t-fast) var(--ease-out);
}
.back-link:hover { color: var(--teal-300); }
.back-link .ico { width: 18px; height: 18px; }

.course-detail { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 1000px) { .course-detail { grid-template-columns: 1.6fr 1fr; gap: var(--sp-7); } }

.cd-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.cd-poster { background: var(--navy-950); display: grid; place-items: center; padding: var(--sp-5); }
.cd-poster img { max-height: 520px; width: auto; max-width: 100%; border-radius: var(--r-md); }
.cd-body { padding: var(--sp-6); }
.cd-title { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: var(--sp-3) 0 var(--sp-2); }
.cd-sub { color: var(--text-muted); font-size: 1.0625rem; margin-bottom: var(--sp-5); }

.cd-date {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.cd-date .ico { width: 18px; height: 18px; color: var(--teal-400); }
.cd-date dt { font-size: .75rem; color: var(--text-faint); }
.cd-date dd { margin: 0; font-weight: 700; font-size: .9375rem; }

/* بطاقة التسجيل الجانبية */
.cd-side { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 999px) { .cd-side { position: static; } }
.cd-form-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}
.cd-form-title {
  font-size: 1.375rem; margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border);
}
.cd-form-card .pay-card { margin-bottom: var(--sp-5); }

.cd-closed { text-align: center; padding: var(--sp-6) var(--sp-2); }
.cd-closed-ico {
  width: 60px; height: 60px; margin: 0 auto var(--sp-4);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-muted);
}
.cd-closed-ico .ico { width: 28px; height: 28px; }
.cd-closed h2 { font-size: 1.25rem; margin-bottom: var(--sp-3); }
.cd-closed p { color: var(--text-muted); font-size: .9375rem; margin-bottom: var(--sp-5); }

/* صفحة النجاح */
.success-box {
  text-align: center;
  padding: var(--sp-9) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.success-mark {
  width: 72px; height: 72px; margin: 0 auto var(--sp-5);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(53,208,127,.16); border: 1px solid rgba(53,208,127,.45); color: #35D07F;
}
.success-mark .ico { width: 34px; height: 34px; }
.success-box h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: var(--sp-3); }
.success-box p { color: var(--text-muted); font-size: 1.0625rem; max-width: 48ch; margin: 0 auto var(--sp-6); }
.success-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }

/* اسم إياد في حقوق التطوير */
.footer-credit .credit-name { color: var(--teal-300); font-weight: 700; }

/* أزرار الموبايل في الترويسة */
.mobile-actions { display: none; }
@media (max-width: 900px) {
  .mobile-actions {
    display: flex; align-items: center; gap: 8px;
    margin-inline-start: auto;   /* يدفعه لجهة زر القائمة */
  }
  .wa-mobile {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(160deg, var(--wa), var(--wa-dark));
    color: #04220F;
    box-shadow: 0 4px 16px rgba(37,211,102,.28), inset 0 1px 0 rgba(255,255,255,.3);
    touch-action: manipulation;
  }
  .wa-mobile:active { transform: scale(.96); }
  .wa-mobile .ico { width: 22px; height: 22px; }

  .give-mobile {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 0 14px;
    border-radius: var(--r-pill);
    background: linear-gradient(160deg, var(--gold-400), var(--gold-600));
    color: var(--navy-950); font-weight: 800; font-size: .875rem;
    box-shadow: 0 4px 16px rgba(201,162,39,.28), inset 0 1px 0 rgba(255,255,255,.3);
    touch-action: manipulation;
  }
  .give-mobile:active { transform: scale(.96); }
  .give-mobile .ico { width: 16px; height: 16px; }
  .nav-toggle { margin-inline-start: 0 !important; }  /* الزر أخذ المساحة */
}
@media (max-width: 380px) {
  .give-mobile span:last-child { display: none; }  /* أيقونة فقط في الشاشات الضيقة جدًا */
  .give-mobile { padding: 0 10px; }
}

/* ==========================================================================
   ضبط أوزان الخطوط — نفس الخط (Tajawal)، متن أوضح وعناوين أجمل
   العناوين غامقة، والنص الجانبي متوسط لا رفيع.
   ========================================================================== */
body { font-weight: 500; }                    /* المتن: متوسط بدل الرفيع */

/* العناوين — غامقة وأوضح */
h1, h2, h3, h4,
.hero-title-main { font-weight: 800; letter-spacing: -.015em; }
.hero-title-main { font-weight: 900; }
.sec-title, .cd-title, .cur-title, .cd-form-title,
.method-title, .success-box h1 { font-weight: 800; }

/* نصوص المتن — متوسطة ومريحة للقراءة (ليست رفيعة) */
.hero-lede, .sec-lede, .pillar p, .method-steps p,
.cur-sub, .faq-body p, .dt-col li, .footer-brand p,
.cta-fine, .courses-note, .empty-state, .voice blockquote p,
.pay-note, .fm-privacy, .cd-sub { font-weight: 500; }

/* روابط القوائم والأزرار الثانوية — متوسطة واضحة */
.nav-list a { font-weight: 600; }

/* الأرقام والإحصاءات تبقى غامقة */
.stat-num, .impact-card dd, .tab-count, .cur-facts dd { font-weight: 900; }

/* وسم دورات الأطفال + شارة إغلاق التسجيل */
.tag-kids { background: rgba(139,124,246,.92); color: #120A2E; }

.cur-closed {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700; color: var(--text-muted);
}

/* شريط تنبيه وضع الصيانة (يراه الأدمن فقط) */
.maint-bar {
  position: relative; z-index: calc(var(--z-sticky) + 1);
  padding: var(--sp-3) var(--sp-5);
  background: var(--gold-500); color: var(--navy-950);
  font-weight: 800; font-size: .875rem; text-align: center;
}
.maint-bar a {
  margin-inline-start: var(--sp-3);
  text-decoration: underline; font-weight: 900;
}
