/* ============ Ilm Academy — dark theme ============ */

:root {
  --bg: #0a0e13;
  --bg-2: #0e141c;
  --surface: #121a24;
  --surface-2: #172230;
  --surface-3: #1d2a3a;
  --border: rgba(212, 175, 55, 0.14);
  --border-soft: rgba(255, 255, 255, 0.06);
  --gold: #d4af37;
  --gold-bright: #e8c96a;
  --gold-dim: rgba(212, 175, 55, 0.35);
  --emerald: #3aa981;
  --emerald-dim: rgba(58, 169, 129, 0.25);
  --text: #eae7de;
  --text-soft: #b8bfca;
  --muted: #7d8896;
  --danger: #e0705f;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-ar: "Amiri", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--gold-dim); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ---------- background art ---------- */

#bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='0.05'%3E%3Crect x='36' y='36' width='48' height='48'/%3E%3Crect x='36' y='36' width='48' height='48' transform='rotate(45 60 60)'/%3E%3Ccircle cx='60' cy='60' r='7'/%3E%3C/g%3E%3C/svg%3E");
}

#bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(212, 175, 55, 0.09), transparent 70%),
    radial-gradient(ellipse 45% 40% at 85% 100%, rgba(58, 169, 129, 0.06), transparent 70%),
    radial-gradient(ellipse 40% 35% at 8% 85%, rgba(212, 175, 55, 0.05), transparent 70%);
  pointer-events: none;
}

/* ---------- header ---------- */

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(10, 14, 19, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  font-size: 26px;
  color: var(--gold);
  text-shadow: 0 0 18px var(--gold-dim);
  animation: markPulse 4s ease-in-out infinite;
}

@keyframes markPulse {
  0%, 100% { text-shadow: 0 0 12px var(--gold-dim); }
  50% { text-shadow: 0 0 26px rgba(212, 175, 55, 0.6); }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-ar {
  font-family: var(--font-ar);
  font-size: 13px;
  color: var(--gold);
  opacity: 0.85;
}

.header-right { display: flex; align-items: center; gap: 18px; }

.overall-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.overall-progress svg { display: block; }
.overall-progress .ring-track { stroke: var(--surface-3); }
.overall-progress .ring-fill { stroke: var(--gold); transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1); filter: drop-shadow(0 0 4px var(--gold-dim)); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.icon-btn:hover { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 16px rgba(212, 175, 55, 0.15); }

/* ---------- admin bar ---------- */

.admin-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 40px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), rgba(58, 169, 129, 0.08));
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 3px 10px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
}

.admin-hint { font-size: 13px; color: var(--muted); }
.admin-bar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.hidden { display: none !important; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8942a);
  color: #161208;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212, 175, 55, 0.4); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald), #2b8264);
  color: #08130e;
  box-shadow: 0 4px 20px rgba(58, 169, 129, 0.25);
}

.btn-emerald:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(58, 169, 129, 0.4); }

.ghost-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.ghost-btn.small { padding: 5px 12px; font-size: 12px; }
.ghost-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.mini-btn {
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 90px 24px 70px;
  position: relative;
  overflow: hidden;
}

.hero-bismillah {
  font-family: var(--font-ar);
  font-size: clamp(26px, 4vw, 40px);
  color: var(--gold);
  opacity: 0.9;
  margin-bottom: 28px;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  background: linear-gradient(160deg, #f5efdd 30%, var(--gold) 75%, #8a6d1f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.hero p.sub {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--text-soft);
  font-size: 16.5px;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  color: var(--gold-bright);
}
.hero-stat .lbl {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px auto 0;
  color: var(--gold-dim);
}

.divider-ornament::before,
.divider-ornament::after {
  content: "";
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.divider-ornament::after {
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

/* floating gold specks in the hero */
.hero-particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.hero-particles span {
  position: absolute;
  bottom: -24px;
  color: var(--gold);
  opacity: 0;
  animation: floatUp 12s linear infinite;
  text-shadow: 0 0 8px var(--gold-dim);
}

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.55; }
  80% { opacity: 0.3; }
  100% { transform: translateY(-430px); opacity: 0; }
}

/* light sweep across gold/emerald buttons */
.btn-gold, .btn-emerald { position: relative; overflow: hidden; }

.btn-gold::after, .btn-emerald::after {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn-gold:hover::after, .btn-emerald:hover::after { left: 140%; }

/* soft shine sweep across cards */
.topic-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(232, 201, 106, 0.09), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.topic-card:hover::after { left: 140%; }

/* ---------- roadmap ---------- */

.roadmap-section { max-width: 1080px; margin: 0 auto; padding: 60px 24px 100px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.section-sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-bottom: 70px; }

.roadmap { position: relative; }

.roadmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.road-base {
  fill: none;
  stroke: rgba(212, 175, 55, 0.16);
  stroke-width: 2.5;
  transition: stroke-dashoffset 2.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.road-lit {
  fill: none;
  stroke: url(#roadGrad);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.45));
  transition: stroke-dashoffset 2.6s cubic-bezier(0.4, 0, 0.2, 1) 0.35s;
}

.road-connector {
  fill: none;
  stroke: rgba(212, 175, 55, 0.35);
  stroke-width: 2;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}

.road-dot .dot-core {
  fill: var(--bg);
  stroke: var(--gold);
  stroke-width: 2;
  transition: fill 0.4s ease;
}

.road-dot.complete .dot-core { fill: var(--gold); }
.road-dot .dot-halo { fill: none; stroke: var(--gold); }
.road-dot .dot-check {
  fill: none;
  stroke: #161208;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roadmap-node { position: absolute; width: 30%; z-index: 2; }
.roadmap-node.side-l { transform: translate(-100%, -50%); }
.roadmap-node.side-r { transform: translate(0, -50%); }

.roadmap-node .topic-card { padding: 22px 24px; }

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: translateY(0) scale(1); }

.topic-card {
  width: 100%;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.topic-card:hover {
  transform: translateY(-5px);
  border-color: var(--border);
  box-shadow: var(--shadow), 0 0 30px rgba(212, 175, 55, 0.08);
}

.topic-card:hover::before { opacity: 1; }

.topic-card .topic-num {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  color: rgba(212, 175, 55, 0.12);
  line-height: 1;
}

.topic-card .topic-ar {
  font-family: var(--font-ar);
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 4px;
}

.topic-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
}

.topic-card .tagline { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }

.topic-progress {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.topic-progress .fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 8px var(--gold-dim);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.topic-card.complete .topic-progress .fill { background: linear-gradient(90deg, var(--emerald), #56c498); box-shadow: 0 0 8px var(--emerald-dim); }

.topic-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.topic-meta .pct { color: var(--gold-bright); font-weight: 500; }
.topic-card.complete .topic-meta .pct { color: var(--emerald); }

.topic-card .admin-row { margin-top: 14px; display: flex; gap: 8px; }

.add-topic-wrap { text-align: center; margin-top: 8px; }

/* ---------- topic page ---------- */

.page { max-width: 980px; margin: 0 auto; padding: 56px 24px 100px; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 34px;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--gold-bright); }

.topic-hero { text-align: center; margin-bottom: 56px; }

.topic-hero .topic-ar-big {
  font-family: var(--font-ar);
  font-size: clamp(36px, 6vw, 56px);
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
  margin-bottom: 6px;
}

.topic-hero h2 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); font-weight: 600; }
.topic-hero .tagline { color: var(--muted); margin-top: 6px; }

.topic-hero .topic-progress { max-width: 380px; margin: 26px auto 10px; }
.topic-hero .topic-meta { max-width: 380px; margin: 0 auto; }

.lesson-list { display: flex; flex-direction: column; gap: 12px; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
}

.lesson-row:hover { border-color: var(--border); transform: translateX(6px); }

.lesson-row .lesson-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
  color: transparent;
}

.lesson-row.done .lesson-check {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #08130e;
  box-shadow: 0 0 12px var(--emerald-dim);
}

.lesson-row .lesson-idx {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold-dim);
  width: 30px;
  flex-shrink: 0;
}

.lesson-row .lesson-info { flex: 1; min-width: 0; }
.lesson-row .lesson-title { font-size: 16px; font-weight: 400; }
.lesson-row.done .lesson-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--emerald-dim); }
.lesson-row .lesson-desc { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lesson-row .chev { color: var(--muted); transition: transform 0.25s ease; flex-shrink: 0; }
.lesson-row:hover .chev { transform: translateX(4px); color: var(--gold); }

.lesson-row .admin-row { display: flex; gap: 6px; flex-shrink: 0; }

.add-lesson-btn {
  margin-top: 18px;
  width: 100%;
  padding: 16px;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.add-lesson-btn:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(212, 175, 55, 0.04); }

/* ---------- lesson page ---------- */

.lesson-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }

@media (max-width: 880px) {
  .lesson-layout { grid-template-columns: 1fr; }
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.video-shell video, .video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.07), transparent 60%),
    var(--bg-2);
  color: var(--muted);
  font-size: 14px;
}

.video-empty .star { font-size: 34px; color: var(--gold-dim); }

.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 28px 0 14px; flex-wrap: wrap; }

.lesson-head h2 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 38px); font-weight: 600; line-height: 1.2; }

.lesson-body-text { color: var(--text-soft); font-size: 15px; white-space: pre-wrap; max-width: 68ch; }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.complete-toggle.done-state { background: linear-gradient(135deg, var(--emerald), #2b8264); color: #08130e; }

/* ---------- resources sidebar ---------- */

.resources {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 96px;
}

.resources h4 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.resources .res-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

.resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 13.5px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.resource-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--gold-bright);
}

.resource-item .res-icon { flex-shrink: 0; color: var(--gold-dim); }
.resource-item:hover .res-icon { color: var(--gold); }
.resource-item .res-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-item .res-ext { font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.resources-empty { font-size: 13px; color: var(--muted); padding: 8px 2px; font-style: italic; }

.resources .admin-row { margin-top: 14px; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.modal {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h3 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.field textarea { resize: vertical; min-height: 90px; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.radio-row { display: flex; gap: 8px; }

.radio-pill {
  flex: 1;
  padding: 9px;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-pill.active { border-color: var(--gold); color: var(--gold-bright); background: rgba(212, 175, 55, 0.06); }

.file-drop {
  padding: 18px;
  border: 1.5px dashed var(--border-soft);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-drop:hover { border-color: var(--gold-dim); color: var(--text-soft); }
.file-drop .file-name { color: var(--gold-bright); font-weight: 500; }

.attach-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

.attach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
}

.attach-row .attach-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-row .attach-type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-dim); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }

.modal .divider { height: 1px; background: var(--border-soft); margin: 22px 0; }

/* ---------- toast ---------- */

#toast-root {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  padding: 11px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.success { border-color: var(--emerald-dim); }
.toast.error { border-color: rgba(224, 112, 95, 0.4); color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- footer ---------- */

#site-footer {
  text-align: center;
  padding: 50px 24px 44px;
  border-top: 1px solid var(--border-soft);
}

.footer-ar { font-family: var(--font-ar); font-size: 24px; color: var(--gold); opacity: 0.85; margin-bottom: 6px; }
.footer-en { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* ---------- responsive roadmap ---------- */

@media (max-width: 880px) {
  .roadmap { aspect-ratio: auto !important; height: auto; padding-left: 36px; }

  .roadmap::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--gold-dim) 6%, var(--gold-dim) 94%, transparent);
  }

  .roadmap-svg { display: none; }

  .roadmap-node,
  .roadmap-node.side-l,
  .roadmap-node.side-r {
    position: relative;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100%;
    margin-bottom: 22px;
  }

  .roadmap-node::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 28px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  }
}

@media (max-width: 720px) {
  #site-header { padding: 14px 20px; }
  .admin-bar { padding: 10px 20px; }
  .brand-ar { display: none; }
  #admin-btn-label { display: none; }

  .header-right { gap: 10px; }
  .overall-progress .op-label { display: none; }
}

/* ---------- startup-style structure ---------- */

section[id] { scroll-margin-top: 84px; }

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-links button {
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-links button:hover { color: var(--gold-bright); background: rgba(212, 175, 55, 0.06); }

.nav-links .nav-cta {
  border: 1px solid var(--border);
  color: var(--gold-bright);
  margin-left: 6px;
}

.nav-links .nav-cta:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.15); }

.grad-text {
  background: linear-gradient(115deg, #f0d98c 10%, var(--gold) 45%, var(--emerald) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.eyebrow.center::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.hero .eyebrow { margin-bottom: 20px; }

.btn-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.hero .hero-stats { margin-top: 52px; }

.section { padding: 100px 24px; }

.section-inner { max-width: 1080px; margin: 0 auto; text-align: center; }

.mission-section {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(ellipse 50% 60% at 15% 20%, rgba(212, 175, 55, 0.05), transparent 70%),
    radial-gradient(ellipse 45% 60% at 85% 80%, rgba(58, 169, 129, 0.05), transparent 70%);
}

.mission-quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 500;
  line-height: 1.32;
  max-width: 24ch;
  margin: 28px auto 38px;
}

.mission-hadith { font-family: var(--font-ar); font-size: 24px; color: var(--gold); margin-bottom: 6px; }

.mission-hadith-en { font-size: 13px; color: var(--muted); font-style: italic; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 54px;
  text-align: left;
}

.feature-card {
  position: relative;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border);
  box-shadow: var(--shadow), 0 0 24px rgba(212, 175, 55, 0.06);
}

.feature-num {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: rgba(212, 175, 55, 0.12);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  color: var(--gold);
  margin-bottom: 18px;
}

.feature-card h4 { font-size: 16.5px; font-weight: 500; margin-bottom: 6px; }

.feature-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ---------- CTA band ---------- */

.cta-band { padding: 20px 24px 110px; max-width: 1128px; margin: 0 auto; }

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 78px 40px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 50% -20%, rgba(212, 175, 55, 0.14), transparent 65%),
    linear-gradient(140deg, rgba(212, 175, 55, 0.1), rgba(58, 169, 129, 0.08) 60%, rgba(212, 175, 55, 0.05)),
    var(--surface);
  border: 1px solid var(--border);
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 46px);
  pointer-events: none;
}

.cta-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 600;
  margin: 16px 0 10px;
}

.cta-panel p { color: var(--text-soft); font-size: 15.5px; margin-bottom: 30px; }

.cta-shape { position: absolute; color: var(--gold); opacity: 0.28; pointer-events: none; }

.cta-shape.star {
  width: 130px;
  height: 130px;
  top: -34px;
  left: -30px;
  animation: slowSpin 46s linear infinite;
}

.cta-shape.ring {
  width: 170px;
  height: 170px;
  bottom: -56px;
  right: -46px;
  color: var(--emerald);
  animation: slowSpin 60s linear infinite reverse;
}

@keyframes slowSpin { to { transform: rotate(360deg); } }

/* ---------- footer columns ---------- */

.footer-grid {
  max-width: 1080px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  text-align: left;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-brand .brand-mark { color: var(--gold); font-size: 20px; }

.footer-blurb { font-size: 13.5px; color: var(--muted); max-width: 34ch; }

.footer-col h5 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13.5px;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--gold-bright); }

.footer-note { font-size: 13px; color: var(--muted); line-height: 1.6; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 70px 20px; }
  .cta-panel { padding: 56px 24px; }
}
