/* ==========================================================================
   مدرسة حسام أبو علي لتعليم السواقة — التصميم الأساسي
   Design tokens: deep navy + burnished gold (license-plate palette), a
   cedar-red accent used sparingly, green/red reserved strictly for quiz
   feedback. Signature element: a dashed "road" progress bar with a moving
   car marker, and question cards shaped like a driving-license panel.
   ========================================================================== */

:root {
  /* colors */
  --navy-950: #081020;
  --navy-900: #0d1b32;
  --navy-800: #122644;
  --navy-700: #1a3560;
  --navy-600: #234981;
  --gold-600: #a97f1c;
  --gold-500: #c9a227;
  --gold-300: #e3c465;
  --gold-100: #f7ecc9;
  --cedar-600: #9c3226;
  --cedar-500: #b8402f;
  --paper: #f7f6f2;
  --paper-dim: #eeece4;
  --white: #ffffff;
  --ink: #10182a;
  --ink-dim: #4a5468;
  --line: #dcd9cf;
  --success-600: #1c8a56;
  --success-100: #e3f6ea;
  --error-600: #c8382c;
  --error-100: #fbe6e3;

  /* type */
  --font-display: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;

  /* layout */
  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(8, 16, 32, 0.06);
  --shadow-md: 0 10px 30px rgba(8, 16, 32, 0.12);
  --shadow-lg: 0 24px 60px rgba(8, 16, 32, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

/* --------------------------------  الأزرار  ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-navy {
  background: var(--navy-800);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-700); }

.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--navy-700); }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------  الهيدر  ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 16, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); color: var(--white); font-size: 1.02rem; font-weight: 800; }
.brand-text span { color: var(--gold-300); font-size: 0.72rem; letter-spacing: 0.5px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.08); color: var(--gold-300); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent;
  color: var(--white);
  align-items: center; justify-content: center;
}
.hamburger svg { width: 26px; height: 26px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--navy-950);
  z-index: 99;
  padding: 20px 24px;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav .btn { margin-top: 20px; }

/* ---------------------------------  الهيرو  -------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(201,162,39,0.18), transparent 55%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 84px 0 120px;
}
.hero-road {
  position: absolute;
  inset: auto 0 0 0;
  height: 130px;
  pointer-events: none;
  opacity: 0.5;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-300);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  background: rgba(201,162,39,0.12);
  border: 1px solid rgba(201,162,39,0.3);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-300);
}
.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  max-width: 52ch;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-300); }
.hero-stat span { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  border: 1px solid rgba(201,162,39,0.25);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-visual svg { width: 82%; height: auto; }
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(201,162,39,0.16), transparent 55%);
}

/* -------------------------------  بطاقات الفئات  --------------------------- */
.categories {
  padding: 76px 0;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 46px;
}
.section-head .kicker {
  color: var(--cedar-600);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy-900); margin-bottom: 12px; }
.section-head p { color: var(--ink-dim); font-size: 1.05rem; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold-300); }
.category-card:active { transform: translateY(-2px) scale(0.99); }

.category-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,162,39,0.35);
}
.category-icon svg { width: 30px; height: 30px; }

.category-card h3 { font-size: 1.28rem; color: var(--navy-900); }
.category-card p.desc { color: var(--ink-dim); font-size: 0.96rem; }

.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.category-count { font-size: 0.85rem; color: var(--ink-dim); font-weight: 600; }
.category-count strong { color: var(--navy-800); font-family: var(--font-display); }

/* -----------------------------  محتوى عام (أقسام)  -------------------------- */
.section-alt { background: var(--white); }
.about-section, .contact-section { padding: 76px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.about-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px;
}
.about-card h3 { color: var(--navy-900); margin-bottom: 10px; font-size: 1.15rem; }
.about-list li { display: flex; gap: 10px; padding: 10px 0; color: var(--ink-dim); border-bottom: 1px solid var(--line); }
.about-list li:last-child { border-bottom: none; }
.about-list svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--gold-600); margin-top: 2px; }

/* -------------------------------  قسم التواصل  ----------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-item:hover { border-color: var(--gold-300); transform: translateX(-2px); }
.contact-item .icon-badge {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--navy-900); color: var(--gold-300);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item .icon-badge svg { width: 22px; height: 22px; }
.contact-item .label { font-size: 0.8rem; color: var(--ink-dim); }
.contact-item .value { font-weight: 700; color: var(--navy-900); }

.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-btn {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--navy-900); color: var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.social-btn:hover { background: var(--cedar-600); color: var(--white); transform: translateY(-2px); }
.social-btn svg { width: 20px; height: 20px; }

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 260px;
  background: var(--paper-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim);
  text-align: center;
  padding: 30px;
}

/* ---------------------------------  الفوتر  -------------------------------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; color: rgba(255,255,255,0.6); max-width: 34ch; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.65); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: 0.82rem; color: rgba(255,255,255,0.45);
  flex-wrap: wrap; gap: 10px;
}
.footer-license {
  color: var(--gold-300);
  font-weight: 700;
}

/* ---------------------------  منطقة التدريب / الاختبار  --------------------- */
.quiz-app {
  display: none;
  padding: 40px 0 90px;
  min-height: 60vh;
}
.quiz-app.active { display: block; }

/* -----------------------  شاشة اختيار مجموعة الأسئلة  ---------------------- */
.landing-primary-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn-outline-navy {
  background: var(--white);
  border: 1.5px solid var(--navy-700);
  color: var(--navy-800);
}
.btn-outline-navy:hover { background: var(--paper-dim); }

.landing-sets-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.landing-sets-title {
  font-size: 1.05rem;
  color: var(--navy-900);
  margin-bottom: 18px;
}
.sets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.set-btn {
  flex: 1 1 150px;
  min-width: 150px;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.quiz-title-block h2 { font-size: 1.5rem; color: var(--navy-900); }
.quiz-title-block span { color: var(--ink-dim); font-size: 0.92rem; }

.quiz-counter {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.95rem;
}

/* --- شريط التقدم على شكل طريق (العنصر المميّز) --- */
.road-progress {
  position: relative;
  height: 30px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #3a4a63 0 2px, #2c3a52 2px 4px);
  background-color: #33425c;
  overflow: hidden;
  margin-bottom: 34px;
  border: 1px solid var(--navy-800);
}
.road-progress .road-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
  transition: width 0.4s ease;
  border-radius: 999px;
}
.road-progress .road-dash {
  position: absolute; top: 50%; right: 0; left: 0;
  height: 3px; transform: translateY(-50%);
  background-image: repeating-linear-gradient(90deg, #fff 0 16px, transparent 16px 30px);
  opacity: 0.85;
}
.road-progress .road-car {
  position: absolute; top: 50%; transform: translate(50%, -50%);
  width: 34px; height: 34px;
  right: 0%;
  transition: right 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.road-progress .road-car svg { width: 100%; height: 100%; display: block; }

/* --- بطاقة السؤال (بنمط رخصة السوق) --- */
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 34px;
  position: relative;
  overflow: hidden;
}
.question-card::before {
  content: "";
  position: absolute; top: 0; right: 0; left: 0; height: 6px;
  background: linear-gradient(90deg, var(--gold-500), var(--cedar-600), var(--navy-700));
}
.question-eyebrow {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold-600); font-weight: 800; font-size: 0.82rem; margin-bottom: 14px;
}
.question-eyebrow svg { width: 16px; height: 16px; flex-shrink: 0; }
.question-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy-950);
  margin-bottom: 22px;
}

.sign-image-wrap {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1/1;
  margin: 0 auto 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.sign-image-wrap svg, .sign-image-wrap img { width: 100%; height: 100%; object-fit: contain; }

.options-list { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: right;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  min-height: 58px;
}
.option-btn:hover:not(:disabled) { border-color: var(--gold-500); background: var(--gold-100); }
.option-btn:active:not(:disabled) { transform: scale(0.995); }
.option-btn .opt-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy-900); color: var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.option-btn .opt-text { flex: 1; }
.option-btn .opt-icon { width: 16px; height: 16px; flex-shrink: 0; visibility: hidden; }

.option-btn.correct {
  background: var(--success-100);
  border-color: var(--success-600);
}
.option-btn.correct .opt-letter { background: var(--success-600); color: var(--white); }
.option-btn.correct .opt-icon { visibility: visible; color: var(--success-600); }

.option-btn.incorrect {
  background: var(--error-100);
  border-color: var(--error-600);
}
.option-btn.incorrect .opt-letter { background: var(--error-600); color: var(--white); }
.option-btn.incorrect .opt-icon { visibility: visible; color: var(--error-600); }

.option-btn:disabled { cursor: default; }
.option-btn.dim { opacity: 0.55; }

.feedback-banner {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 10px;
}
.feedback-banner.show { display: flex; }
.feedback-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.feedback-banner.correct { background: var(--success-100); color: var(--success-600); }
.feedback-banner.incorrect { background: var(--error-100); color: var(--error-600); }
.feedback-banner.pending { background: var(--gold-100); color: var(--gold-600); }
.feedback-explain { font-weight: 500; color: var(--ink-dim); display: block; margin-top: 4px; }

.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  gap: 12px;
  flex-wrap: wrap;
}
.quiz-nav-row .side { display: flex; gap: 10px; }

/* ------------------------------  شاشة النتيجة  ----------------------------- */
.result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 46px 34px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}
.result-ring {
  width: 150px; height: 150px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  background: conic-gradient(var(--gold-500) calc(var(--pct, 0) * 1%), var(--paper-dim) 0);
  position: relative;
}
.result-ring::before {
  content: "";
  position: absolute; inset: 10px;
  border-radius: 50%;
  background: var(--white);
}
.result-ring strong { position: relative; font-family: var(--font-display); font-size: 2rem; color: var(--navy-900); }
.result-ring span { position: relative; font-size: 0.8rem; color: var(--ink-dim); }

.result-card h3 { font-size: 1.5rem; color: var(--navy-900); margin-bottom: 10px; }
.result-card p.msg { color: var(--ink-dim); margin-bottom: 26px; font-size: 1.02rem; }

.result-stats { display: flex; justify-content: center; gap: 22px; margin-bottom: 30px; flex-wrap: wrap; }
.result-stat { min-width: 100px; }
.result-stat strong { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.result-stat.ok strong { color: var(--success-600); }
.result-stat.bad strong { color: var(--error-600); }
.result-stat.pending strong { color: var(--gold-600); }
.result-stat span { font-size: 0.82rem; color: var(--ink-dim); }

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* -------------------------------  وضع المراجعة  ---------------------------- */
.review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.review-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  border-right: 5px solid var(--line);
}
.review-item.is-correct { border-right-color: var(--success-600); }
.review-item.is-incorrect { border-right-color: var(--error-600); }
.review-item.is-pending { border-right-color: var(--gold-500); }
.review-item .rq { font-weight: 700; color: var(--navy-950); margin-bottom: 10px; }
.review-item .ra { font-size: 0.92rem; margin-bottom: 4px; }
.review-item .ra.correct-line { color: var(--success-600); }
.review-item .ra.wrong-line { color: var(--error-600); }
.review-item .ra.pending-line { color: var(--gold-600); }
.review-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.review-tag.ok { background: var(--success-100); color: var(--success-600); }
.review-tag.bad { background: var(--error-100); color: var(--error-600); }
.review-tag.pending { background: var(--gold-100); color: var(--gold-600); }

/* --------------------------------  عناصر عامة  ----------------------------- */
.empty-note {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-dim);
}

.back-home-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--navy-700); font-weight: 700; font-size: 0.92rem; margin-bottom: 20px;
}
.back-home-link svg { width: 18px; height: 18px; }

/* -----------------------------------  الاستجابة  --------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .header-actions .btn-gold-desktop { display: none; }
  .hamburger { display: flex; }
  .category-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 90px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-stats { justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .quiz-topbar { flex-direction: column; align-items: flex-start; }
  .question-card { padding: 22px 18px; }
  .question-text { font-size: 1.12rem; }
  .result-card { padding: 32px 20px; }
  .quiz-nav-row { flex-direction: column-reverse; align-items: stretch; }
  .quiz-nav-row .side { flex-direction: column; }
  .quiz-nav-row .btn { width: 100%; }
  .landing-primary-actions { flex-direction: column; align-items: stretch; }
  .sets-grid { flex-direction: column; }
  .set-btn { width: 100%; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .option-btn { padding: 14px; }
}
