/* ============================================================
   الرعاية الخاصة لكبار السن من ضيوف الرحمن
   Main Stylesheet — Dark Green + Gold, RTL Arabic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;900&family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brand-navy:    #1a2e4a;
  --brand-green:   #1a8035;
  --brand-teal:    #0d6e6e;
  --brand-orange:  #d4820a;

  --bg-deep:       #f6f8fb;
  --bg-dark:       #eef2f7;
  --bg-card:       #ffffff;
  --bg-card2:      #f8fafc;

  --green-deep:    #094a1c;
  --green-mid:     #14702a;
  --green-light:   #1ea03c;

  --gold:          #d4820a;
  --gold-light:    #e89818;
  --gold-pale:     #f5b840;

  --text-primary:  #0b1a2c;
  --text-secondary:#2c3e55;
  --text-muted:    #607080;

  --border:        rgba(26,46,74,0.15);
  --border-light:  rgba(26,46,74,0.07);

  --shadow-gold:   0 0 40px rgba(212,130,10,0.14);
  --shadow-deep:   0 20px 60px rgba(0,0,0,0.10);
  --radius:        12px;
  --radius-lg:     20px;
  --transition:    0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Light Mode Token Overrides ─────────────────────────────── */
[data-theme="light"] {
  --bg-deep:       #f7f3ec;
  --bg-dark:       #f0ead8;
  --bg-card:       rgba(255,249,238,0.82);
  --bg-card2:      rgba(255,253,245,0.75);
  --green-deep:    #0d2e18;
  --green-mid:     #1a5030;
  --green-light:   #2a7045;
  --gold:          #9a6f1a;
  --gold-light:    #7a5510;
  --gold-pale:     #c89430;
  --text-primary:  #0d2218;
  --text-secondary:#2e4a38;
  --text-muted:    #5a7060;
  --border:        rgba(120,90,40,0.18);
  --border-light:  rgba(120,90,40,0.10);
  --shadow-gold:   0 0 40px rgba(154,111,26,0.10);
  --shadow-deep:   0 20px 60px rgba(0,0,0,0.12);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Cairo', 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  overflow-x: hidden;
}

body.lang-en {
  font-family: 'Segoe UI', Arial, sans-serif;
  text-align: left;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(200,149,42,0.08);
  border: 1px solid var(--border);
  padding: 0.45rem 1.3rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 1rem 0;
}

body.lang-en .gold-line {
  background: linear-gradient(90deg, transparent, var(--gold));
}

/* ── Noise overlay ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}

/* ── NAV ────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(246,248,251,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.65rem 0;
}

/* ── Scrolled state: dark text on white navbar ── */
#navbar.scrolled .nav-links a {
  color: var(--text-secondary);
}
#navbar.scrolled .lang-toggle {
  color: var(--gold);
  border-color: var(--border);
}
#navbar.scrolled .theme-toggle {
  color: var(--gold);
  border-color: var(--border);
}
#navbar.scrolled .nav-burger span {
  background: var(--text-primary);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo anchored to visual right in RTL layout */
.nav-logo   { order: 1; }
.nav-links  { order: 2; }
.nav-actions { order: 3; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.nav-logo-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(200,149,42,0.35));
  flex-shrink: 0;
}

.nav-logo-placeholder {
  width: 70px;
  height: 70px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(200,149,42,0.05);
  text-align: center;
  line-height: 1.3;
  padding: 0.3rem;
  flex-shrink: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.nav-logo-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.nav-logo-sub {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

body.lang-en .nav-links a::after { right: auto; left: 0; }

.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.88);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.05em;
}

.lang-toggle:hover {
  background: rgba(200,149,42,0.1);
  border-color: var(--gold);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.88);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ───────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(140deg, #1a3a58 0%, #174d32 40%, #145050 100%);
}

/* Hajj photo layer — dimmed so the gradient glows through */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../haj picture.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.28;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Animated geometric mesh — brand glows over the dark hero */
.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 25% 55%, rgba(20,160,160,0.55) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 78% 18%, rgba(212,130,10,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 65% 55% at 60% 75%, rgba(40,180,80,0.42) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 5%  30%, rgba(40,80,160,0.55) 0%, transparent 60%);
}

.hero-grid { display: none; }

@keyframes gridFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(60px); }
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,149,42,0.06) 0%, transparent 70%);
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

.hero-ornament { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-top: 5rem;
  margin-inline: auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(240, 220, 170, 0.15);
  border: 1px solid rgba(200,149,42,0.30);
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gold);
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-badge span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.2;
  color: #f0f8ff;                /* always light — hero bg is dark */
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-title .gold-word {
  color: var(--gold-light);
  position: relative;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(220,238,255,0.82); /* always light — hero bg is dark */
  line-height: 1.85;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 3rem;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;  /* center the buttons */
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--gold), #a07020);
  color: #060e08;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(200,149,42,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,149,42,0.45);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: rgba(220,238,255,0.85);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(220,238,255,0.30);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,149,42,0.05);
}

.hero-stats-strip {
  position: absolute;
  bottom: 3rem;
  left: 0;
  right: 0;
  z-index: 1;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.hero-stats-inner {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(13,31,20,0.6);
  backdrop-filter: blur(10px);
  max-width: 700px;
  margin-inline: auto;
}

.hero-stat {
  flex: 1;
  padding: 1.2rem 1.5rem;
  text-align: center;
  border-left: 1px solid var(--border-light);
  position: relative;
}

body.lang-en .hero-stat { border-left: none; border-right: 1px solid var(--border-light); }

.hero-stat:last-child { border-left: none; }
body.lang-en .hero-stat:last-child { border-right: none; }

.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(200,225,255,0.65);
  font-weight: 500;
}

/* ── ABOUT ──────────────────────────────────────────────────── */
#about {
  padding: 5rem 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about-text--full {
  grid-column: 1 / -1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  direction: rtl;
}
.about-text--full .section-tag { margin: 0 auto 1rem; }
.about-text--full .gold-line   { margin: 1rem auto 1.5rem; }
.about-text--full h2,
.about-text--full p            { text-align: center; }

.about-visual {
  position: relative;
}

.about-card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.about-card-main::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200,149,42,0.08) 0%, transparent 70%);
  border-radius: 0 var(--radius-lg) 0 0;
}

.vision-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.vision-icon {
  width: 48px;
  height: 48px;
  background: rgba(200,149,42,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.vision-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.vision-text strong {
  display: block;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.about-ornament-text {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(200,149,42,0.05);
  line-height: 1;
  user-select: none;
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.about-float-card {
  position: absolute;
  bottom: -2rem;
  left: -2rem;
  background: var(--brand-navy);
  border: 1px solid rgba(212,130,10,0.35);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-deep);
  min-width: 180px;
}

body.lang-en .about-float-card { left: auto; right: -2rem; }

.about-float-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}

.about-float-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.70);
  margin-top: 0.3rem;
}

.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about-text p {
  font-size: 1.18rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 2rem;
}

/* ── GOALS ──────────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════
   GOALS — Ecosystem Orb  v2
══════════════════════════════════════════════════════════════ */

#goals {
  padding: 5rem 0 3rem;
  background: transparent;
  position: relative;
  overflow: visible;
}

.goals-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Pilgrim Journey Roadmap ───────────────────────────────── */
.journey-map {
  position: relative;
  direction: ltr;          /* force LTR so grid columns are predictable */
  padding: 1rem 0 3rem;
  margin-top: 0.5rem;
}

.journey-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}

.journey-rows {
  position: relative;
  z-index: 1;
}

/* Each goal is a 3-column grid row */
.j-row {
  display: grid;
  align-items: center;
  min-height: 120px;
  margin-bottom: 2.2rem;
  opacity: 0;             /* initial hidden — no transform so positions stay accurate */
}

/* Right node: spacer | dot | card */
.j-row--right { grid-template-columns: 58% 4% 38%; }
/* Left node:  card | dot | spacer */
.j-row--left  { grid-template-columns: 38% 4% 58%; }

/* Entrance animations */
@keyframes jSlideRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes jSlideLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

.j-row--right.j-visible { animation: jSlideRight 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }
.j-row--left.j-visible  { animation: jSlideLeft  0.6s cubic-bezier(0.22,1,0.36,1) forwards; }

/* Staggered delays */
.j-row[data-ji="1"] { animation-delay: 0.05s; }
.j-row[data-ji="2"] { animation-delay: 0.04s; }
.j-row[data-ji="3"] { animation-delay: 0.05s; }
.j-row[data-ji="4"] { animation-delay: 0.04s; }
.j-row[data-ji="5"] { animation-delay: 0.05s; }
.j-row[data-ji="6"] { animation-delay: 0.04s; }

.j-spacer { /* intentionally empty */ }

/* Dot column — vertically centres the dot */
.j-dot-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.j-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 237, 213, 0.95);
  border: 2.5px solid #e8924a;
  box-shadow: 0 0 0 4px rgba(232,146,74,0.15);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  flex-shrink: 0;
}

.j-dot.j-dot-active {
  background: #e8924a;
  box-shadow:
    0 0 0 5px rgba(232,146,74,0.25),
    0 0 18px 5px rgba(232,146,74,0.38);
  transform: scale(1.22);
}

/* Card column */
.j-card-col { display: flex; align-items: center; }

.j-row--right .j-card-col { padding-left: 1.2rem; }
.j-row--left  .j-card-col { padding-right: 1.2rem; }

/* The card itself — initiative blue glass */
.j-card {
  direction: rtl;
  text-align: right;
  width: 100%;
  background: linear-gradient(145deg, rgba(255,237,213,0.72) 0%, rgba(255,248,237,0.82) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px;
  border: 1px solid rgba(232,146,74,0.28);
  border-right: 3.5px solid #e8924a;
  padding: 1.5rem 1.8rem 1.5rem 1.6rem;
  box-shadow:
    0 4px 28px rgba(232,120,50,0.13),
    0 1px 4px rgba(180,80,10,0.07),
    inset 0 1px 0 rgba(255,255,255,0.85);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
  overflow: hidden;
}

.j-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to left, transparent, rgba(232,146,74,0.65), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.j-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(232,120,50,0.20),
    0 3px 10px rgba(180,80,10,0.10),
    inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(232,146,74,0.55);
}

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

.j-num {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(232,146,74,0.30);
  margin-bottom: 0.3rem;
  font-family: 'Cairo', sans-serif;
}

.j-short {
  font-size: 1.05rem;
  font-weight: 800;
  color: #7a3a10;
  margin: 0 0 0.6rem;
  line-height: 1.4;
}

.j-text {
  font-size: 0.9rem;
  color: #5a3a20;
  line-height: 1.9;
  margin: 0;
}

/* SVG pilgrim */
.j-pilgrim { transition: transform 0.08s linear; }

/* Mobile: stack single-column */
@media (max-width: 700px) {
  .journey-map { direction: rtl; }
  .j-row--right,
  .j-row--left  { grid-template-columns: 4% 1fr; }
  .j-row--right .j-spacer,
  .j-row--left  .j-spacer  { display: none; }
  .j-row--left  .j-card-col { order: 2; }
  .j-row--left  .j-dot-col  { order: 1; }
  .j-row--right .j-card-col { padding-left: 0; padding-right: 0.8rem; }
  .j-row--left  .j-card-col { padding-right: 0; padding-left: 0.8rem; }
  .j-dot { width: 14px; height: 14px; }
  .j-card { padding: 1.2rem 1.3rem; }
  .j-num { font-size: 2rem; }
}

/* ══════════════════════════════════════════════════════════════
   STRUGGLES GALLERY — واقع كبار السن
══════════════════════════════════════════════════════════════ */
#struggles-gallery {
  background: var(--bg-deep);
  padding-bottom: 0;
  overflow: hidden;
}

/* ── Cinematic Hero ─────────────────────────────────────────── */
.sg-hero {
  position: relative;
  height: 340px;
  background-size: cover;
  background-position: center 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,8,5,0.45) 0%,
    rgba(5,8,5,0.62) 60%,
    rgba(5,8,5,0.92) 100%
  );
}

.sg-hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 720px;
}

.sg-tag {
  background: rgba(232,146,74,0.18) !important;
  color: #e8924a !important;
  border: 1px solid rgba(232,146,74,0.35) !important;
  margin-bottom: 1.1rem;
}

.sg-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 0.9rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.sg-subtitle {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.85;
  margin: 0;
}

/* Scroll hint animated chevron */
.sg-hero-scroll-hint {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.sg-hero-scroll-hint span {
  display: block;
  width: 22px; height: 22px;
  border-right: 2.5px solid rgba(255,255,255,0.5);
  border-bottom: 2.5px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: sgChevron 1.4s ease-in-out infinite;
}
@keyframes sgChevron {
  0%,100% { opacity: 0.3; transform: rotate(45deg) translateY(-4px); }
  50%      { opacity: 0.9; transform: rotate(45deg) translateY(4px); }
}

/* ── Photo Mosaic ────────────────────────────────────────────── */
.sg-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  gap: 4px;
  padding: 4px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-deep);
}

.sg-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}

/* Size variants — more restrained */
.sg-item.sg-wide  { grid-column: span 2; }
.sg-item.sg-tall  { grid-row:    span 2; }
.sg-item.sg-large { grid-column: span 2; grid-row: span 2; }

.sg-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.5s ease;
  filter: brightness(0.88) saturate(0.9);
}

.sg-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.65) saturate(1.1);
}

/* Caption overlay — hidden */
.sg-overlay { display: none; }

/* Scroll-reveal */
.sg-reveal {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s ease var(--d, 0s),
              transform 0.6s ease var(--d, 0s);
}
.sg-reveal.sg-visible {
  opacity: 1;
  transform: scale(1);
}

/* Closing statement */
.sg-closing {
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  background: var(--bg-deep);
}
.sg-closing p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary, #555);
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
  border-top: 1px solid rgba(232,146,74,0.3);
  padding-top: 2rem;
  line-height: 1.9;
}

/* ── Results & Recommendations Tab Panel (#tab-results) ── */
#tab-results { padding: 0; overflow-y: auto; }

.res-wrap { display: flex; flex-direction: column; }

.res-header {
  padding: 2.4rem 3rem 2rem;
  background: #1a2e4a;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.res-header-eyebrow {
  display: inline-block;
  background: rgba(232,146,74,0.22);
  color: #e8924a;
  border: 1px solid rgba(232,146,74,0.5);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.25rem 1rem;
  margin-bottom: 0.8rem;
}
.res-header h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 0.6rem;
  color: #fff;
}
.res-header-src {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
  line-height: 1.7;
}

.res-section { padding: 0 2rem 2rem; background: var(--bg-card, #fff); }
.res-section:last-child { padding-bottom: 3rem; }

.res-section-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  margin: 2rem 0 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  direction: rtl;
}
.res-section-banner svg { width: 22px; height: 22px; flex-shrink: 0; }

.obs-banner { background: #0d6e6e; }
.rec-banner { background: #1a8035; }

/* Observations: 2-col grid */
.res-obs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.res-obs-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--bg-deep, #f6f8fb);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  direction: rtl;
}
.res-obs-num {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d6e6e;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.res-obs-card p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--text-main, #1a2e4a);
}

/* Recommendations: 2-col grid */
.res-rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.res-rec-card {
  background: var(--bg-deep, #f6f8fb);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.res-rec-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 14px;
  width: fit-content;
  color: #fff;
}
.res-rec-badge { background: #1a8035; }
.res-rec-card p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--text-main, #1a2e4a);
}

/* ── Gallery Tab Panel (#tab-gallery) ── */
#tab-gallery { padding: 0; overflow-y: auto; }

.gal-wrap { display: flex; flex-direction: column; min-height: 100%; }

.gal-header {
  padding: 2.2rem 2.4rem 1.4rem;
  background: linear-gradient(160deg, #1a2e4a 0%, #0d3d52 70%, #1a3a3a 100%);
  color: #fff;
  text-align: center;
}
.gal-header .section-tag {
  background: rgba(232,146,74,0.25);
  color: #e8924a;
  border: 1px solid rgba(232,146,74,0.4);
  display: inline-block;
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.7rem;
}
.gal-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin: 0 0 0.45rem;
  color: #fff;
}
.gal-header p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
  margin: 0;
  line-height: 1.7;
}

.gal-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 6px;
  padding: 6px;
  background: #0d1a28;
  flex: 1;
}

.gal-item {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
}
.gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gal-item:hover img { transform: scale(1.07); }

.gal-cap { display: none; }

/* Span variants */
.gal-feat   { grid-column: span 2; grid-row: span 2; }
.gal-feat-b { grid-column: span 2; grid-row: span 2; }
.gal-wide   { grid-column: span 2; }

/* Mobile */
@media (max-width: 900px) {
  .sg-mosaic {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 140px;
  }
}

@media (max-width: 600px) {
  .sg-hero { height: 260px; }
  .sg-mosaic {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 120px;
  }
  .sg-item.sg-large { grid-column: span 2; grid-row: span 1; }
  .sg-item.sg-tall  { grid-row: span 1; }
}

/* ══════════════════════════════════════════════════════════════
   CRITERIA PANEL (tab-criteria)
══════════════════════════════════════════════════════════════ */
.criteria-wrap { display: flex; flex-direction: column; gap: 2.4rem; padding: 0.5rem 0 1rem; }

.crit-section { }

.crit-section-title {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1.15rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(232,146,74,0.35);
}
.crit-icon { font-size: 1.3rem; }

/* Targeting cards */
.crit-target-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.crit-target-card {
  background: color-mix(in srgb, var(--tc, #0d9090) 12%, white);
  border: 1px solid color-mix(in srgb, var(--tc, #0d9090) 25%, transparent);
  border-top: 3px solid var(--tc, #0d9090);
  border-radius: 12px;
  padding: 1.2rem 1rem;
}
.crit-target-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--tc, #0d9090); margin-bottom: 0.5rem;
}
.crit-target-val { font-size: 0.95rem; font-weight: 600; line-height: 1.6; }

/* Company tables */
.crit-tables-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.crit-table-block { }
.crit-table-head {
  background: var(--th, #1a5896); color: #fff; font-weight: 700;
  font-size: 0.9rem; padding: 0.5rem 1rem; border-radius: 8px 8px 0 0; text-align: center;
}
.crit-table {
  width: 100%; border-collapse: collapse; font-size: 0.82rem;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-top: none; border-radius: 0 0 8px 8px; overflow: hidden;
}
.crit-table thead th {
  background: rgba(255,255,255,0.08); color: var(--text-secondary);
  font-weight: 700; padding: 0.5rem 0.7rem; text-align: right; font-size: 0.78rem;
}
.crit-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.06); }
.crit-table tbody tr:last-child { border-bottom: none; }
.crit-table tbody td {
  padding: 0.45rem 0.7rem; color: var(--text-primary); line-height: 1.4;
}
.crit-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }

/* Train / proposals grid */
.crit-proposals-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem;
}
.crit-prop-card {
  display: flex; align-items: flex-start; gap: 0.7rem;
  background: rgba(13,144,144,0.08); border: 1px solid rgba(13,144,144,0.2);
  border-radius: 10px; padding: 0.9rem 1rem;
}
.crit-prop-num {
  flex-shrink: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: #0d9090; color: #fff; font-size: 0.78rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.crit-prop-card p { font-size: 0.88rem; line-height: 1.65; margin: 0; color: var(--text-primary); }

/* Service category cards */
.crit-cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* Standards grid */
.crit-std-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.crit-std-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--cb, rgba(13,144,144,0.08));
  border: 1px solid color-mix(in srgb, var(--cs, #0d6e6e) 30%, transparent);
  direction: rtl;
}
.crit-std-num {
  flex-shrink: 0;
  min-width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cs, #0d6e6e);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.crit-std-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #1a2e4a);
  line-height: 1.5;
}
.crit-cat-card {
  background: color-mix(in srgb, var(--cc, #1a5896) 10%, white);
  border: 1px solid color-mix(in srgb, var(--cc, #1a5896) 22%, transparent);
  border-right: 3px solid var(--cc, #1a5896);
  border-radius: 12px; padding: 1.1rem 1.2rem;
}
.crit-cat-title {
  font-weight: 800; font-size: 0.9rem; color: var(--cc, #1a5896);
  margin-bottom: 0.75rem; padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.crit-cat-card ul { margin: 0; padding-right: 1.1rem; }
.crit-cat-card ul li { font-size: 0.85rem; line-height: 1.7; color: #2a2a2a; }

@media (max-width: 768px) {
  .crit-target-grid { grid-template-columns: 1fr; }
  .crit-tables-wrap { grid-template-columns: 1fr; }
  .crit-proposals-grid { grid-template-columns: 1fr 1fr; }
  .crit-cats-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────── */
.goals-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.goals-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Ecosystem wrapper ────────────────────────────────────── */
.eco-wrap {
  position: relative;
  width: 100%;
  height: 860px;
  user-select: none;
  overflow: visible;
}

/* SVG lines — hidden */
.eco-svg {
  display: none;
}

.eco-line {
  stroke-linecap: round;
  opacity: 0.22;
  transition: opacity 0.5s ease, stroke-width 0.5s ease, filter 0.5s ease;
  stroke-dasharray: 8 5;
}
.eco-line[data-goal="0"] { stroke: #4a6fa5; stroke-width: 2; }
.eco-line[data-goal="1"] { stroke: #1a8035; stroke-width: 2; }
.eco-line[data-goal="2"] { stroke: #0d6e6e; stroke-width: 2; }
.eco-line[data-goal="3"] { stroke: #d4820a; stroke-width: 2; }

.eco-line.is-active {
  opacity: 0.9;
  stroke-width: 3;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Orbit track ring (decorative) */
.eco-orbit-track {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(26,46,74,0.10);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Particles canvas */
.eco-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

/* ── Central Glow — hidden ── */
.eco-center {
  display: none;
}

/* ── Goal Nodes ───────────────────────────────────────────── */
.eco-node {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  font-family: inherit;
  z-index: 5;
  text-align: center;
  padding: 1rem 0.7rem;
  outline: none;
  transition:
    box-shadow 0.45s ease,
    opacity    0.45s ease;
  /* transform is controlled entirely by JS — no CSS transition on transform */
}

/* ── Glass nodes — brand identity colours ── */

/* Navy — توحيد إجراءات الخدمة */
/* Orange — ministry logo color 1 */
.eco-node[data-goal="0"] {
  --node-color: #F47920;
  background: linear-gradient(155deg, rgba(180,88,10,0.62) 0%, rgba(244,121,32,0.38) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(244,140,60,0.60);
  box-shadow:
    0 14px 44px rgba(180,88,10,0.32),
    0 3px  10px rgba(180,88,10,0.22),
    inset 0  2px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(180,88,10,0.28),
    inset 1px 0  0 rgba(255,255,255,0.30);
}

/* Green — ministry logo color 2 */
.eco-node[data-goal="1"] {
  --node-color: #27AE60;
  background: linear-gradient(155deg, rgba(20,120,55,0.62) 0%, rgba(39,174,96,0.38) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(55,195,110,0.58);
  box-shadow:
    0 14px 44px rgba(20,120,55,0.28),
    0 3px  10px rgba(20,120,55,0.18),
    inset 0  2px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(20,120,55,0.25),
    inset 1px 0  0 rgba(255,255,255,0.30);
}

/* Teal — ministry logo color 3 */
.eco-node[data-goal="2"] {
  --node-color: #0D7878;
  background: linear-gradient(155deg, rgba(8,90,90,0.62) 0%, rgba(13,120,120,0.38) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(20,160,160,0.58);
  box-shadow:
    0 14px 44px rgba(8,90,90,0.28),
    0 3px  10px rgba(8,90,90,0.18),
    inset 0  2px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(8,90,90,0.25),
    inset 1px 0  0 rgba(255,255,255,0.30);
}

/* Yellow-Gold — ministry logo color 4 */
.eco-node[data-goal="3"] {
  --node-color: #FDB913;
  background: linear-gradient(155deg, rgba(185,130,5,0.62) 0%, rgba(253,185,19,0.38) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(253,205,70,0.62);
  box-shadow:
    0 14px 44px rgba(185,130,5,0.30),
    0 3px  10px rgba(185,130,5,0.20),
    inset 0  2px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(185,130,5,0.28),
    inset 1px 0  0 rgba(255,255,255,0.30);
}

/* Halo ring on hover */
.eco-node-halo {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.34,1.3,0.64,1);
  pointer-events: none;
}
.eco-node.is-active .eco-node-halo {
  opacity: 1;
  transform: scale(1);
}

/* Icon circle — frosted white disc */
.eco-node-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.50);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.eco-node.is-active .eco-node-icon {
  background: rgba(255,255,255,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 0 12px rgba(255,255,255,0.3);
}

/* Label — white on glass nodes */
.eco-node-label {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0,0,0,0.20);
  letter-spacing: 0.01em;
}

/* Number badge — hidden */
.eco-node-num {
  display: none !important;
}
.eco-node-num-hidden {
  font-size: 0.72rem;
  font-weight: 900;
  color: rgba(255,255,255,0.90);
  background: rgba(255,255,255,0.22);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 8px;
  right: 8px;
}

/* Dimmed state */
.eco-node.is-dimmed {
  opacity: 0.28;
}

/* ── Detail Panel ─────────────────────────────────────────── */
.eco-detail {
  position: absolute;
  top: 50%;
  right: 2%;
  transform: translateY(-50%) translateX(20px);
  width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34,1.2,0.64,1);
  z-index: 20;
}

.eco-detail.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.eco-detail-inner {
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--detail-color, #F47920) 72%, #0a0f1a) 0%,
    color-mix(in srgb, var(--detail-color, #F47920) 48%, #0a0f1a) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 22px;
  padding: 2rem 1.8rem;
  border: 1px solid color-mix(in srgb, var(--detail-color, #F47920) 55%, rgba(255,255,255,0.5));
  box-shadow:
    0 16px 48px color-mix(in srgb, var(--detail-color, #F47920) 45%, transparent),
    0 2px 8px   color-mix(in srgb, var(--detail-color, #F47920) 30%, transparent),
    inset 0 2px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 color-mix(in srgb, var(--detail-color, #F47920) 30%, transparent);
  position: relative;
  overflow: hidden;
}

.eco-detail-num {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.15);
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
}

.eco-detail-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.eco-detail-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.eco-detail-desc {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.85;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.40);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .eco-wrap   { height: 780px; }
  .eco-node   { width: 160px; height: 160px; }
  .eco-node-label { font-size: 0.88rem; }
  .eco-center { width: 360px; height: 360px; }
  .eco-detail { display: none; }
}

@media (max-width: 600px) {
  .eco-wrap {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0 2rem;
    overflow: visible;
  }
  .eco-svg, .eco-particles, .eco-center, .eco-orbit-track { display: none; }
  .eco-node {
    position: static !important;
    width: 100%;
    height: auto;
    border-radius: 18px;
    flex-direction: row;
    padding: 1.2rem 1.4rem;
    gap: 1rem;
    justify-content: flex-start;
  }
  .eco-node-halo { display: none; }
  .eco-node-num  { position: static; width: 28px; height: 28px; font-size: 0.75rem; }
  .eco-node-label { font-size: 1rem; text-align: right; }
  .eco-node-icon { width: 46px; height: 46px; }
}

/* ── INTERACTIVE PANELS ─────────────────────────────────────── */
#panels-section {
  padding: 6rem 0 8rem;
  position: relative;
}

.panels-header {
  text-align: center;
  margin-bottom: 3rem;
}

.panels-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   FAN CARD CAROUSEL
   ──────────────────────────────────────────────────────────────
   Layout:
     .fan-scene      full-width wrapper, overflow:hidden on x axis
     .fan-stage      positioning context; overflow:visible so cards
                     peek out from sides but scene clips them
     .fan-card       absolutely positioned, transforms driven by JS
     .fan-nav        prev • dots • next controls below stage

   JS sets inline styles per card:
     transform: translateX(Xpx) rotate(Adeg) scale(S)
     opacity, z-index
   All driven by CSS transitions for 60fps smooth motion.
══════════════════════════════════════════════════════════════ */
.fan-scene {
  position: relative;
  width: 100%;
  /* overflow:hidden hard-clips box-shadows at the edge.
     Use clip-path instead — it hides off-screen cards while
     letting shadows breathe within the visible area. */
  overflow: visible;
  clip-path: inset(-60px 0px);   /* allow 60px shadow bleed top+bottom, clip left+right flush */
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.fan-stage {
  position: relative;
  height: 460px;             /* tall enough for card + tilt */
  width: 100%;
  overflow: visible;         /* cards extend beyond stage bounds; scene clips */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Individual fan card ──────────────────────────────────── */
.fan-card {
  position: absolute;
  width: 360px;
  height: 400px;

  /* GPU layer — JS only updates transform + opacity, no layout */
  will-change: transform, opacity;

  /* Single smooth transition for ALL transform changes */
  transition:
    transform  0.65s cubic-bezier(0.34, 1.10, 0.64, 1),
    opacity    0.65s ease,
    box-shadow 0.4s ease;

  /* Rotate around card centre (default transform-origin) */
  transform-origin: center center;

  cursor: pointer;
  user-select: none;
  outline: none;
  border-radius: var(--radius-lg);
}

/* The inner "face" of the card holds all the content */
.fan-card-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem 5.5rem;  /* bottom pad leaves room for footer */
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s;
}

/* Top shimmer bar — hidden until active/hover */
.fan-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.5s;
}

/* Hover state */
.fan-card:hover .fan-card-inner {
  border-color: rgba(200,149,42,0.3);
}
.fan-card:hover .fan-card-inner::before { transform: scaleX(1); }

/* Keyboard focus ring */
.fan-card:focus-visible .fan-card-inner {
  box-shadow: 0 0 0 3px var(--gold);
}

/* ── Active card (offset = 0) ─── applied by JS adding .is-active */
.fan-card.is-active .fan-card-inner {
  border-color: var(--gold);
  background: var(--bg-card2);
}

.fan-card.is-active .fan-card-inner::before { transform: scaleX(1); }

.fan-card.is-active {
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    0  0   60px rgba(200,149,42,0.12);
}

/* ── Shared card content pieces ──────────────────────────── */
.panel-card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  transition: color 0.4s;
}

.panel-card-icon svg {
  width: 52px;
  height: 52px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s;
}

.fan-card.is-active .panel-card-icon {
  color: var(--gold);
}

.panel-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.fan-card-inner h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  line-height: 1.35;
}

.fan-card-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Footer row inside card */
.fan-card-footer {
  position: absolute;
  bottom: 1.8rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(200,149,42,0.08);
  padding-top: 1rem;
}

.fan-card-index {
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(200,149,42,0.12);
  line-height: 1;
}

/* Arrow button */
.panel-card-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.35s, border-color 0.35s, color 0.35s;
  font-size: 0.85rem;
}

.fan-card:hover .panel-card-arrow,
.fan-card.is-active .panel-card-arrow {
  background: var(--gold);
  border-color: var(--gold);
  color: #060e08;
}

/* ── Navigation row ──────────────────────────────────────── */
.fan-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.fan-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.fan-arrow:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,149,42,0.06);
}

.fan-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.fan-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-mid);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.35s, width 0.35s, border-radius 0.35s;
  padding: 0;
}

.fan-dot.active {
  background: var(--gold);
  width: 26px;
  border-radius: 4px;
}

/* Tab Content Panels
   ─────────────────────────────────────────────────────────────
   .tab-content-wrap is hidden until the user clicks a card.
   JS adds .has-selection to #panels-section which triggers
   the reveal via the sibling/descendant selector below.
   ──────────────────────────────────────────────────────────── */
.tab-content-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);

  /* Hidden by default — no min-height until revealed */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.6s cubic-bezier(0.4,0,0.2,1),
              opacity    0.5s ease 0.1s;
}

/* Once a card is clicked, JS adds .revealed to the wrap */
.tab-content-wrap.revealed {
  max-height: 4000px;   /* large enough for gallery panel */
  opacity: 1;
  pointer-events: auto;
}

.tab-panel {
  display: none;
  padding: 3rem;
  animation: tabFadeIn 0.45s ease;
}

.tab-panel.active { display: block; }

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

/* Click-hint pulse on the active card arrow — draws attention until first click */
.fan-card.is-active .panel-card-arrow {
  animation: var(--arrow-pulse, arrowPulse 2s ease-in-out infinite);
}

@keyframes arrowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,149,42,0); }
  50%       { box-shadow: 0 0 0 6px rgba(200,149,42,0.22); }
}

/* ── STATISTICS PANEL ───────────────────────────────────────── */
.stats-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.stats-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.stats-highlight {
  background: linear-gradient(135deg, #1a2e4a 0%, #0d6e6e 60%, #1a8035 100%);
  border: none;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 24px rgba(26,46,74,0.18);
}

.stats-highlight-num {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.stats-highlight-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.80);
  font-weight: 500;
}

.stats-group {
  margin-bottom: 2rem;
}

.stats-group-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.stats-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.stat-box {
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-box:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.stat-box-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.stat-box-label {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 500;
}

.stat-box-sub {
  font-size: 0.8rem;
  color: var(--brand-teal);
  margin-top: 0.3rem;
  font-weight: 600;
}

/* ── Per-column brand colours for stat boxes ── */
.stats-grid .stat-box:nth-child(1) {
  background: #edf1f7;
  border: 1px solid rgba(26,46,74,0.15);
  border-top: 4px solid var(--brand-navy);
}
.stats-grid .stat-box:nth-child(1) .stat-box-value {
  color: var(--brand-navy);
}
.stats-grid .stat-box:nth-child(2) {
  background: #e6f4f4;
  border: 1px solid rgba(13,110,110,0.18);
  border-top: 4px solid var(--brand-teal);
}
.stats-grid .stat-box:nth-child(2) .stat-box-value {
  color: var(--brand-teal);
}
.stats-grid .stat-box:nth-child(3) {
  background: #fdf4e3;
  border: 1px solid rgba(212,130,10,0.20);
  border-top: 4px solid var(--brand-orange);
}
.stats-grid .stat-box:nth-child(3) .stat-box-value {
  color: var(--brand-orange);
}

.stats-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stats-divider::before,
.stats-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.stats-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.record-card {
  background: #e8f4ec;
  border: 1px solid rgba(26,128,53,0.20);
  border-top: 4px solid var(--brand-green);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.record-card:nth-child(2) {
  background: #edf1f7;
  border: 1px solid rgba(26,46,74,0.15);
  border-top: 4px solid var(--brand-navy);
}

.record-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(26,128,53,0.08), transparent);
}

.record-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.record-age {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--brand-green);
  line-height: 1;
  margin-bottom: 1rem;
}

.record-card:nth-child(2) .record-age {
  color: var(--brand-navy);
}

.record-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

.record-detail-key { color: var(--text-muted); font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   RISK MAP — Interactive SVG Infographic  (Redesign v2)
   Golden road · Walking old man · Red/green nodes · Large cards
══════════════════════════════════════════════════════════════ */

#tab-map { padding: 0; }

.rmap-wrap {
  padding: 2.4rem 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* ── Header ──────────────────────────────────────────────────── */
.rmap-header { text-align: center; }

.rmap-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.rmap-eyebrow-rule {
  flex: 0 0 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.5;
}
.rmap-eyebrow-rule:first-child {
  background: linear-gradient(270deg, transparent, var(--gold));
}

.rmap-title {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.rmap-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

.rmap-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--gold);
  opacity: 0.7;
  margin: 0;
}

/* ── SVG Scene ───────────────────────────────────────────────── */
.rmap-scene {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  /* Light sky-blue (سماوي) — airy airport atmosphere */
  background: radial-gradient(ellipse at 50% 30%, #d6eeff 0%, #c2e0fa 50%, #aed4f5 100%);
  box-shadow:
    0 4px 16px rgba(0,60,120,0.12),
    0 16px 50px rgba(0,60,120,0.14),
    inset 0 0 80px rgba(255,255,255,0.25);
}

#rmap-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* ── Node base — outletbuddy circular-badge style ────────────── */
.rmap-node { cursor: pointer; }

/* Default icon colour (dark on white circle) */
.rmap-icon { stroke: #374151; fill: none; }
.rmap-node-solution .rmap-icon { stroke: #166534; }

/* Muted: keep full colour, only reduce slightly so active node stands out */
.rmap-node.is-muted .rmap-node-bg   { opacity: 0.70; }
.rmap-node.is-muted .rmap-icon      { opacity: 0.65; }
.rmap-node.is-muted .rmap-badge     { opacity: 0.65; }
.rmap-node.is-muted .rmap-node-lbl  { opacity: 0.60; }

/* Active: white circle with vivid border ring */
.rmap-node.is-active .rmap-node-bg          { fill: #ffffff; stroke: #e74c3c !important; stroke-width: 4px; }
.rmap-node.is-active .rmap-icon             { stroke: #b91c1c !important; }
.rmap-node-solution.is-active .rmap-node-bg { fill: #ffffff; stroke: #22c55e !important; stroke-width: 4px; }
.rmap-node-solution.is-active .rmap-icon    { stroke: #166534 !important; }

/* Smooth transitions on node parts */
.rmap-node-bg, .rmap-icon, .rmap-node-lbl, .rmap-badge {
  transition: fill 0.35s ease, stroke 0.35s ease, opacity 0.35s ease;
}

/* Pulse ring */
.rmap-pulse-ring { transition: stroke 0.4s ease; }
.rmap-node.is-active .rmap-pulse-ring {
  animation: rmapPulseRed 1.8s ease-out infinite;
}
.rmap-node-solution.is-active .rmap-pulse-ring {
  animation: rmapPulseGreen 1.8s ease-out infinite;
}

@keyframes rmapPulseRed {
  0%   { r: 40; stroke: rgba(231,76,60,0.75); stroke-width: 2.5; }
  100% { r: 72; stroke: rgba(231,76,60,0);    stroke-width: 0.5; }
}
@keyframes rmapPulseGreen {
  0%   { r: 40; stroke: rgba(39,174,96,0.75); stroke-width: 2.5; }
  100% { r: 72; stroke: rgba(39,174,96,0);    stroke-width: 0.5; }
}

/* Active trail: stroke-dashoffset transition is set inline on the element */
#rmap-active-trail { /* transition set inline for dashoffset */ }

/* ── Floating popup — outletbuddy style ──────────────────────── */
.rmap-popup {
  position: absolute;
  width: 290px;
  padding: 1.2rem 1.4rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(14,18,28,0.97) 0%, rgba(8,11,20,0.99) 100%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.75),
    0 24px 64px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.08);
  direction: rtl;
  text-align: right;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.94);
  transition:
    opacity 0.30s cubic-bezier(0.4,0,0.2,1),
    transform 0.30s cubic-bezier(0.34,1.1,0.64,1);
  z-index: 30;
}
.rmap-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Close ✕ button */
.rmap-popup-close {
  position: absolute;
  top: 0.6rem;
  left: 0.65rem;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.rmap-popup-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* Header row */
.rmap-popup-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}
.rmap-popup-icon-wrap {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid rgba(231,76,60,0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.rmap-popup-icon-wrap.solution-icon { border-color: rgba(34,197,94,0.55); }

.rmap-popup-title {
  font-size: 0.97rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.18rem;
  line-height: 1.35;
}
.rmap-popup-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0;
  color: rgba(239,68,68,0.95);
}
.rmap-popup-subtitle.solution-sub { color: rgba(34,197,94,0.95); }

/* Stat chips row (like outletbuddy's "100 | Open 'til 6pm | $$$$") */
.rmap-popup-stats {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}
.rmap-popup-stat {
  flex: 1;
  padding: 0.38rem 0.5rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.4;
}
.rmap-popup-stat strong {
  display: block;
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

/* Divider rule */
.rmap-popup-rule {
  height: 1px;
  background: linear-gradient(270deg, rgba(200,149,42,0.5), transparent);
  margin: 0.65rem 0;
}
.rmap-popup-rule.green { background: linear-gradient(270deg, rgba(34,197,94,0.5), transparent); }

/* "More details" action button */
.rmap-popup-btn {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  font-size: 0.87rem;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}
.rmap-popup-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }

/* Data list */
.rmap-dl {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rmap-dl-row { display: flex; flex-direction: column; gap: 0.14rem; }

.rmap-dl-row dt {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.65);
}

.rmap-dl-row dd {
  font-size: 1rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.55;
  margin: 0;
  padding-right: 0.9rem;
}

.rmap-solution dd { color: rgba(46,204,113,0.95); }

.rmap-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rmap-dot.gold  { background: var(--gold); }
.rmap-dot.red   { background: #e74c3c; }
.rmap-dot.green { background: #27ae60; }

/* ── Legend ──────────────────────────────────────────────────── */
.rmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.rmap-legend-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.rmap-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Map Slider ───────────────────────────────────────────────── */
.rmap-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rmap-slide-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.rmap-view {
  flex: 0 0 100%;
  min-width: 100%;
}

/* Side navigation arrows */
.rmap-side-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(20,40,70,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.85);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.rmap-side-arrow:hover {
  background: rgba(244,121,32,0.85);
  border-color: #F47920;
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}
.rmap-side-arrow:hover::before {
  border-color: #ffffff;
}
.rmap-side-prev { left: 1rem; }
.rmap-side-next { right: 1rem; }

.rmap-side-arrow::before {
  content: '';
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2.5px solid rgba(255,255,255,0.85);
  border-right: 2.5px solid rgba(255,255,255,0.85);
  border-radius: 1px;
}
.rmap-side-prev::before { transform: rotate(-135deg) translateX(-1px); }
.rmap-side-next::before { transform: rotate(45deg) translateX(-1px); }

/* Land map node interactions */
.lmap-node { cursor: pointer; }
.lmap-node-bg { transition: r 0.2s ease; }
.lmap-node:hover .lmap-node-bg,
.lmap-node.is-active .lmap-node-bg { r: 40; }
.lmap-pulse-ring { animation: rmap-pulse 2s ease-out infinite; }
@keyframes lmap-pulse {
  0%   { r: 40; stroke-opacity: 0.6; }
  100% { r: 72; stroke-opacity: 0; }
}
.lmap-node.is-active .lmap-pulse-ring { stroke: rgba(231,76,60,0.7); animation: lmap-pulse 1.5s ease-out infinite; }
.lmap-node-solution.is-active .lmap-pulse-ring { stroke: rgba(34,197,94,0.7); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rmap-popup { width: 250px; padding: 1rem 1.1rem; }
  .rmap-popup-title { font-size: 0.88rem; }
  .rmap-dl-row dd { font-size: 0.82rem; }
}

@media (max-width: 640px) {
  .rmap-wrap { padding: 1.4rem 0.8rem; }
  .rmap-popup { width: 210px; padding: 0.85rem 0.9rem; }
  .rmap-popup-title { font-size: 0.8rem; }
  .rmap-popup-stats { display: none; } /* too cramped on mobile */
  .rmap-dl-row dd { font-size: 0.75rem; }
}
.record-detail-val { color: var(--text-secondary); font-weight: 600; text-align: left; }
body.lang-en .record-detail-val { text-align: right; }

/* ══════════════════════════════════════════════════════════════
   EXECUTIVE PHASE SLIDER  —  Premium Strategic Roadmap Component
   ──────────────────────────────────────────────────────────────
   Depth system:
     Layer 0  background page
     Layer 1  .exc-viewport  — the main elevated card
     Layer 2  .exc-nav       — floating buttons, higher elevation
     Layer 3  .exc-nav:hover — maximum elevation on interaction

   Slide transition: opacity + translateX via JS-toggled classes.
   No CSS animation on the track — avoids layout thrash.
══════════════════════════════════════════════════════════════ */

/* ── Section header ─────────────────────────────────────────── */
#tab-plans {
  padding: 2.8rem 2.2rem 2.4rem;
}

.exc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.exc-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.exc-eyebrow-rule {
  flex: 0 0 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.5;
}

.exc-eyebrow-rule:first-child {
  background: linear-gradient(270deg, transparent, var(--gold));
}

.exc-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 540px;
  margin: 0;
}

/* Phase counter display — large typographic element */
.exc-phase-display {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-shrink: 0;
  user-select: none;
}

.exc-phase-num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  transition: all 0.4s ease;
  display: inline-block;
}

.exc-phase-sep {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0.15rem;
}

.exc-phase-denom {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Progress bar + step markers ────────────────────────────── */
.exc-progress-area {
  margin-bottom: 2rem;
}

.exc-track-bar {
  height: 2px;
  background: rgba(200,149,42,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.exc-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(200,149,42,0.4);
}

/* Step markers — clickable numbered pills */
.exc-markers {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.exc-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.3s, border-color 0.35s, color 0.3s, box-shadow 0.3s;
  white-space: nowrap;
  font-family: inherit;
}

.exc-marker:hover {
  border-color: rgba(200,149,42,0.35);
  color: var(--text-secondary);
}

.exc-marker.is-active {
  background: rgba(200,149,42,0.1);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(200,149,42,0.12);
}

.exc-marker-n {
  font-size: 0.85rem;
  font-weight: 900;
  color: inherit;
}

/* ── Stage layout: [nav] [card] [nav] ───────────────────────── */
.exc-stage {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 1.2rem;
}

/* ── Floating nav buttons ───────────────────────────────────── */
.exc-nav {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(13,110,110,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal);
  font-family: inherit;

  background: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow:
    0 2px  8px  rgba(26,46,74,0.12),
    0 6px  20px rgba(26,46,74,0.10),
    0 0    0 1px rgba(13,110,110,0.10) inset;

  transition:
    transform    0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow   0.35s ease,
    border-color 0.35s ease,
    opacity      0.3s  ease;

  overflow: visible;
}

/* Outer glow pseudo-element — animates on hover */
.exc-nav-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,110,110,0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.exc-nav:hover {
  border-color: rgba(13,110,110,0.45);
  background: rgba(13,110,110,0.06);
  transform: translateY(-3px) scale(1.06);
  box-shadow:
    0 4px  12px rgba(13,110,110,0.18),
    0 12px 32px rgba(26,46,74,0.15),
    0 0    0 1px rgba(13,110,110,0.12) inset;
}

.exc-nav:hover .exc-nav-glow { opacity: 1; }

.exc-nav:active {
  transform: translateY(-1px) scale(1.02);
  transition-duration: 0.1s;
}

.exc-nav:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

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

/* ── Elevated card viewport ─────────────────────────────────── */
.exc-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 420px;

  box-shadow:
    0 2px  8px  rgba(26,46,74,0.08),
    0 8px  28px rgba(26,46,74,0.10),
    0 24px 60px rgba(26,46,74,0.08);

  border: 1px solid var(--border-light);

  transition: box-shadow 0.5s ease;
}

.exc-viewport:hover {
  box-shadow:
    0 4px  12px rgba(26,46,74,0.10),
    0 12px 36px rgba(26,46,74,0.12),
    0 32px 72px rgba(26,46,74,0.10);
}

/* ── Slides — stacked, one visible at a time ────────────────── */
.exc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  padding: 2.6rem 2.8rem;

  /* Default "incoming from left" starting position */
  transform: translateX(-28px);
  transition:
    opacity    0.48s cubic-bezier(0.4, 0, 0.2, 1),
    transform  0.48s cubic-bezier(0.4, 0, 0.2, 1);

  display: flex;
  flex-direction: column;
  gap: 1.4rem;

  background: #ffffff;
}

/* State: entering from the right side */
.exc-slide.exc-enter-right { transform: translateX(28px); }

/* State: active / visible */
.exc-slide.exc-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative; /* take up flow for viewport height */
}

/* State: exiting to the left */
.exc-slide.exc-exit-left {
  opacity: 0;
  transform: translateX(-28px);
  position: absolute;
}

/* State: exiting to the right */
.exc-slide.exc-exit-right {
  opacity: 0;
  transform: translateX(28px);
  position: absolute;
}

/* ── Card header ────────────────────────────────────────────── */
.exc-card-header { display: flex; flex-direction: column; gap: 0.8rem; }

.exc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  align-self: flex-start;
}

.exc-badge-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(13,110,110,0.10);
  border: 1.5px solid rgba(13,110,110,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-teal);
  flex-shrink: 0;
}

.exc-badge-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
}

.exc-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.35;
  margin: 0;
}

/* Rule beneath title */
.exc-gold-rule {
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--brand-navy) 0%,
    rgba(13,110,110,0.4) 50%,
    transparent 100%
  );
  flex-shrink: 0;
  border-radius: 2px;
}

body.lang-en .exc-gold-rule {
  background: linear-gradient(
    270deg,
    var(--brand-navy) 0%,
    rgba(13,110,110,0.4) 50%,
    transparent 100%
  );
}

/* ── Content blocks ─────────────────────────────────────────── */
.exc-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  flex: 1;
}

/* Top row: goal + criterion side by side */
.exc-top-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Shared block styles */
.exc-block {
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border-light);
  border-right: 4px solid transparent;
  background: #f8fafc;
  box-shadow: 0 1px 4px rgba(26,46,74,0.05);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.exc-block-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--brand-teal);
}

.exc-block-head svg {
  flex-shrink: 0;
  opacity: 0.9;
  stroke: currentColor;
}

.exc-block p,
.exc-block-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin: 0;
}

/* Goal block — navy accent */
.exc-block-goal {
  background: rgba(26,46,74,0.04);
  border-right-color: var(--brand-navy);
}
.exc-block-goal .exc-block-head {
  color: var(--brand-navy);
}
.exc-block-goal .exc-block-head svg {
  stroke: var(--brand-navy);
}

/* Criterion block — orange accent */
.exc-block-criterion {
  background: rgba(212,130,10,0.04);
  border-right-color: var(--brand-orange);
}
.exc-block-criterion .exc-block-head {
  color: var(--brand-orange);
}
.exc-block-criterion .exc-block-head svg {
  stroke: var(--brand-orange);
}

/* Mechanism block — teal accent */
.exc-block-mech {
  background: rgba(13,110,110,0.04);
  border-right-color: var(--brand-teal);
}
.exc-block-mech .exc-block-head {
  color: var(--brand-teal);
}
.exc-block-mech .exc-block-head svg {
  stroke: var(--brand-teal);
}

/* Output block — green accent */
.exc-block-output {
  background: rgba(26,128,53,0.04);
  border-right-color: var(--brand-green);
  margin-top: auto;
}
.exc-block-output .exc-block-head {
  color: var(--brand-green);
}
.exc-block-output .exc-block-head svg {
  stroke: var(--brand-green);
}

/* Mechanism list */
.exc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exc-list li {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.75;
  padding-right: 1.3rem;
  position: relative;
}

.exc-list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-teal);
  opacity: 0.85;
}

body.lang-en .exc-list li { padding-right: 0; padding-left: 1.2rem; }
body.lang-en .exc-list li::before { right: auto; left: 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  #tab-plans       { padding: 2rem 1.4rem; }
  .exc-stage       { grid-template-columns: 48px 1fr 48px; gap: 0.8rem; }
  .exc-nav         { width: 44px; height: 44px; }
  .exc-viewport    { min-height: 480px; }
  .exc-slide       { padding: 1.8rem 1.6rem; }
  .exc-top-row     { grid-template-columns: 1fr; }
  .exc-phase-num   { font-size: 2rem; }
}

@media (max-width: 480px) {
  .exc-stage       { grid-template-columns: 40px 1fr 40px; gap: 0.5rem; }
  .exc-nav         { width: 38px; height: 38px; }
  .exc-slide       { padding: 1.4rem 1.2rem; }
  .exc-markers     { gap: 0.3rem; }
  .exc-marker      { padding: 0.22rem 0.55rem; font-size: 0.65rem; }
}

/* ── HAJJ EXPERIENCE SECTION ────────────────────────────────── */
#hajj-experience {
  padding: 2rem 0 4rem;
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(13,40,40,0.6) 100%);
  overflow: hidden;
  position: relative;
}


.hexp-header {
  text-align: center;
  margin-bottom: 3rem;
}
.hexp-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.hexp-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}
.hexp-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* Track wrapper — force LTR; clip only horizontally so vertical shadows show */
.hexp-track-wrap {
  overflow-x: hidden;
  overflow-y: visible;
  padding: 1.2rem 0;
  margin-bottom: 0;
  direction: ltr;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* Scrolling track */
.hexp-track {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  animation: hexp-scroll 50s linear infinite;
}

/* Cards restore RTL for Arabic text */
.hexp-card { direction: rtl; }

/* Pause on hover */
.hexp-track-wrap:hover .hexp-track { animation-play-state: paused; }

@keyframes hexp-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Tweet card */
.hexp-card {
  flex-shrink: 0;
  width: 320px;
  background: #f0fafa;
  border: 1px solid rgba(13,120,120,0.22);
  border-radius: 18px;
  padding: 1.4rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: default;
}
.hexp-card:hover {
  border-color: rgba(244,121,32,0.5);
  box-shadow: 0 6px 28px rgba(0,0,0,0.22);
}
.hexp-card--accent {
  border-color: rgba(13,120,120,0.3);
  background: #f0fafa;
}
.hexp-card--accent:hover { border-color: rgba(13,120,120,0.6); }

.hexp-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hexp-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-green));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.hexp-name { display: none; }
.hexp-handle { display: none; }
.hexp-x-icon {
  width: 18px; height: 18px;
  fill: rgba(0,0,0,0.20);
  margin-right: auto;
  flex-shrink: 0;
}

.hexp-card p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: #111111;
  margin: 0;
  flex: 1;
}
.hexp-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-teal);
  letter-spacing: 0.04em;
}

/* ── PLACEHOLDER PANELS ─────────────────────────────────────── */
.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 400px;
  gap: 1.5rem;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: rgba(200,149,42,0.06);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.placeholder-panel h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.placeholder-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.7;
}

.coming-soon-badge {
  background: rgba(200,149,42,0.08);
  border: 1px dashed var(--border);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand .nav-logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-bottom .gold { color: var(--gold); }

/* ── Floating orbs (decorative) ─────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0;
  animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
  width: 300px; height: 300px;
  background: rgba(200,149,42,0.07);
  top: 15%; right: 10%;
  animation-delay: 0s;
  opacity: 0.6;
}

.orb-2 {
  width: 200px; height: 200px;
  background: rgba(26,64,39,0.5);
  bottom: 20%; left: 8%;
  animation-delay: 4s;
  opacity: 0.8;
}

.orb-3 {
  width: 150px; height: 150px;
  background: rgba(200,149,42,0.05);
  top: 60%; right: 35%;
  animation-delay: 8s;
  opacity: 0.5;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.1); }
  66%       { transform: translate(-15px, 20px) scale(0.9); }
}

.scan-line { display: none; }

@keyframes scanMove {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ── Card hover lift ─────────────────────────────────────────── */
.goal-card:hover { transform: translateY(-4px); }

/* ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── */

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Once visible, lock it in — no way back to hidden */
.reveal.visible {
  opacity: 1 !important;
  transform: none !important;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ══════════════════════════════════════════════════════════════
   KPI DASHBOARD PANEL  (#tab-kpi)
══════════════════════════════════════════════════════════════ */

.kpi-db {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* ── Row shared ── */
.kpi-gauges-row,
.kpi-mid-row,
.kpi-perform-row {
  display: grid;
  gap: 1.2rem;
}

/* ── Row 1: 3 gauge cards ── */
.kpi-gauges-row {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-gauge-card {
  background: linear-gradient(160deg, #1a2e4a 0%, #0d3d52 60%, #1a3a3a 100%);
  border-radius: 16px;
  padding: 1.4rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.kpi-gauge-svg {
  width: 100%;
  max-width: 200px;
}

/* ── Goal badge (مستهدف) ── */
.kpi-goal-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0d6e6e;
  background: rgba(13,110,110,0.18);
  border: 1px solid rgba(13,110,110,0.35);
  border-radius: 20px;
  padding: 0.18rem 0.7rem;
  align-self: flex-end;
  margin-bottom: -0.4rem;
  font-family: 'Cairo', sans-serif;
}

.kpi-goal-badge--warn {
  color: #d4820a;
  background: rgba(212,130,10,0.15);
  border-color: rgba(212,130,10,0.35);
}

.kpi-gauge-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  font-family: 'Cairo', sans-serif;
  text-align: center;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  justify-content: center;
}


/* ≥ / ≤ operator styling */
.kpi-gauge-op {
  font-size: 1rem;
  font-weight: 400;
  color: #0d9090;
  font-family: sans-serif;
}

.kpi-gauge-lbl {
  font-size: 0.88rem;
  color: #a8c8d8;
  text-align: center;
  line-height: 1.45;
  font-family: 'Cairo', sans-serif;
}

/* Target line on performance bars */
.kpi-perf-bar-wrap {
  position: relative;
}

.kpi-perf-bar--fixed {
  width: 20%;
}

.kpi-perf-target-line {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transform: translateX(-50%);
}

/* ── Multi-metric card (100%, 100%, 2) ── */
.kpi-multi-card {
  justify-content: flex-start;
  gap: 0;
}

.kpi-multi-metrics {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  justify-content: space-between;
  gap: 0;
  margin-top: 0.6rem;
}

.kpi-multi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.kpi-multi-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  width: 80%;
  align-self: center;
}

.kpi-multi-val {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  line-height: 1;
}

.kpi-multi-lbl {
  font-size: 0.72rem;
  color: #8aabb8;
  line-height: 1.4;
  font-family: 'Cairo', sans-serif;
}

/* ── Shared card tag ── */
.kpi-card-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-teal);
  background: rgba(13,110,110,0.10);
  border: 1px solid rgba(13,110,110,0.22);
  border-radius: 20px;
  padding: 0.25rem 0.9rem;
  margin-bottom: 1rem;
}

/* ── Row 2: Mission + Performance bars ── */
.kpi-mid-row {
  grid-template-columns: 1fr 1fr;
}

.kpi-mission-card,
.kpi-perf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.kpi-mission-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
}

.kpi-mission-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1.2rem;
}

.kpi-target-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.kpi-target-num {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
}

.kpi-target-lbl {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* Performance bar rows */
.kpi-perf-rows {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.kpi-perf-row {
  display: grid;
  grid-template-columns: 1fr 2.5fr auto;
  align-items: center;
  gap: 0.8rem;
}

.kpi-perf-label {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.kpi-perf-bar-wrap {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 99px;
  overflow: hidden;
}

.kpi-perf-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s ease;
}

.kpi-perf-pct {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 2.5rem;
  text-align: start;
}

/* ── Row 3: Roadmap + Donut ── */
.kpi-perform-row {
  grid-template-columns: 1.1fr 0.9fr;
}

.kpi-roadmap-card,
.kpi-donut-card,
.kpi-nat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.kpi-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kpi-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.kpi-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  z-index: 1;
}

.kpi-step-connector {
  width: 2px;
  height: 20px;
  background: var(--border);
  margin-right: 16px;
  margin-top: 0;
  margin-bottom: 0;
  align-self: stretch;
  flex-shrink: 0;
}

.kpi-step-body {
  padding-bottom: 1rem;
}

.kpi-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Donut */
.kpi-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.kpi-donut-svg {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
}

.kpi-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.kpi-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.kpi-legend-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ── Nationalities card ── */
.kpi-nat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  margin-top: 0.4rem;
}

.kpi-nat-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kpi-nat-flag {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .kpi-gauges-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .kpi-mid-row,
  .kpi-perform-row { grid-template-columns: 1fr; }
  .kpi-mission-targets { grid-template-columns: repeat(3,1fr); }
  .kpi-donut-wrap { flex-direction: column; }
}

@media (max-width: 480px) {
  .kpi-gauges-row { grid-template-columns: 1fr 1fr; }
  .kpi-perf-row { grid-template-columns: 1fr 2fr auto; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .goals-grid { grid-template-columns: 1fr; }
  .hero-stats-inner { flex-direction: column; border-radius: var(--radius); }
  .hero-stat { border-left: none; border-bottom: 1px solid var(--border-light); }
  .hero-stat:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-records { grid-template-columns: 1fr; }
  .tab-panel { padding: 2rem 1.5rem; }

  /* Fan carousel: narrower cards and tighter offsets on mobile */
  .fan-stage   { height: 380px; }
  .fan-card    { width: 280px; height: 340px; }
  .fan-card-inner { padding: 1.6rem 1.5rem 5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }

  /* Fan carousel: single-card view on very small screens */
  .fan-stage { height: 340px; }
  .fan-card  { width: 85vw; height: 310px; }
  .fan-card-inner { padding: 1.4rem 1.3rem 4.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════════════════════════════ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.34,1.2,0.64,1);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(200,149,42,0.1);
  border-color: var(--gold);
  transform: rotate(20deg) scale(1.08);
}

/* Which icon shows in which mode */
.theme-icon-sun  { display: block; }
.theme-icon-moon { display: none;  }

[data-theme="light"] .theme-icon-sun  { display: none;  }
[data-theme="light"] .theme-icon-moon { display: block; }

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE — Component Overrides
   All token-driven colours are handled by [data-theme="light"]
   custom properties above. These overrides handle surfaces,
   gradients, and components that use hard-coded colour values.
══════════════════════════════════════════════════════════════ */

/* ── Body & scrollbar ───────────────────────────────────────── */
[data-theme="light"] body {
  background-color: var(--bg-deep);
}
[data-theme="light"] ::-webkit-scrollbar-track { background: #ede5d8; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #9a6f1a; }

/* Suppress the dark noise overlay in light mode */
[data-theme="light"] body::before { opacity: 0.08; }

/* ── Navbar ─────────────────────────────────────────────────── */
[data-theme="light"] #navbar.scrolled {
  background: rgba(247,243,236,0.96);
  border-bottom: 1px solid rgba(120,90,40,0.12);
}

/* ── Hero ───────────────────────────────────────────────────── */
[data-theme="light"] #hero {
  background: linear-gradient(
    160deg,
    #f7f3ec 0%,
    #f0e8d4 40%,
    #e8dcc0 80%,
    #dfd0ae 100%
  );
}

/* Kill the dark animated mesh layers */
[data-theme="light"] .hero-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(42,112,64,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(154,111,26,0.06) 0%, transparent 60%);
}

[data-theme="light"] .hero-grid { opacity: 0.04; }
[data-theme="light"] .hero-glow { opacity: 0.3; }

/* Scan lines become very faint warm lines */
[data-theme="light"] .scan-line {
  background: linear-gradient(90deg, transparent, rgba(154,111,26,0.08), transparent);
}

/* Floating orbs: warm amber tints on ivory */
[data-theme="light"] .orb-1 { background: rgba(154,111,26,0.08); }
[data-theme="light"] .orb-2 { background: rgba(42,96,64,0.07); opacity: 0.5; }
[data-theme="light"] .orb-3 { background: rgba(154,111,26,0.06); }

/* Hero stats strip */
[data-theme="light"] .hero-stats-inner {
  background: rgba(255,249,238,0.85);
  backdrop-filter: blur(14px);
  border-color: rgba(120,90,40,0.14);
}

/* ── Sections (about, goals, panels) ───────────────────────── */
[data-theme="light"] #about,
[data-theme="light"] #goals,
[data-theme="light"] #panels-section {
  background: var(--bg-deep);
}

/* About visual card */
[data-theme="light"] .about-card {
  background: rgba(255,249,238,0.8);
  backdrop-filter: blur(18px);
  border-color: rgba(120,90,40,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
}

/* Goal cards */
[data-theme="light"] .goal-card {
  background: rgba(255,249,238,0.75);
  backdrop-filter: blur(16px);
  border-color: rgba(120,90,40,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
[data-theme="light"] .goal-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,0.12);
}

/* ── Fan carousel ───────────────────────────────────────────── */
[data-theme="light"] .fan-card-inner {
  background: rgba(255,249,238,0.82);
  backdrop-filter: blur(22px);
  border-color: rgba(120,90,40,0.14);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .fan-card.is-active .fan-card-inner {
  box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 0 0 1px rgba(154,111,26,0.2);
}

[data-theme="light"] .fan-arrow {
  background: rgba(255,249,238,0.9);
  border-color: rgba(120,90,40,0.18);
  color: var(--gold);
}

[data-theme="light"] .tab-content-wrap {
  background: transparent;
}

/* ── Stats panel ────────────────────────────────────────────── */
[data-theme="light"] .stat-box {
  background: rgba(255,249,238,0.7);
  backdrop-filter: blur(12px);
  border-color: rgba(120,90,40,0.12);
}
[data-theme="light"] .record-card {
  background: linear-gradient(135deg, rgba(255,249,238,0.8), rgba(240,232,210,0.8));
  border-color: rgba(120,90,40,0.14);
}

/* ── Executive Phase Slider ─────────────────────────────────── */
[data-theme="light"] .exc-viewport {
  box-shadow:
    0 2px 8px rgba(0,0,0,0.08),
    0 8px 28px rgba(0,0,0,0.10),
    0 24px 60px rgba(0,0,0,0.08);
}

[data-theme="light"] .exc-slide {
  background: linear-gradient(
    160deg,
    rgba(255,249,238,0.88) 0%,
    rgba(245,238,220,0.95) 100%
  );
}

[data-theme="light"] .exc-block-goal      { background: rgba(42,112,64,0.08);  }
[data-theme="light"] .exc-block-criterion { background: rgba(154,111,26,0.06); }
[data-theme="light"] .exc-block-mech      { background: rgba(200,185,155,0.25); }
[data-theme="light"] .exc-block-output    { background: rgba(200,185,155,0.15); }

[data-theme="light"] .exc-nav {
  background: linear-gradient(145deg, rgba(255,249,238,0.96), rgba(240,230,210,0.98));
  border-color: rgba(120,90,40,0.22);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.10),
    0 6px 20px rgba(0,0,0,0.10);
}
[data-theme="light"] .exc-nav:hover {
  box-shadow:
    0 4px 12px rgba(0,0,0,0.14),
    0 12px 32px rgba(0,0,0,0.12),
    0 0 20px rgba(154,111,26,0.10);
}

[data-theme="light"] .exc-marker {
  border-color: rgba(120,90,40,0.18);
  color: var(--text-muted);
}
[data-theme="light"] .exc-marker.is-active {
  background: rgba(154,111,26,0.10);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Risk Map ───────────────────────────────────────────────── */
[data-theme="light"] .rmap-scene {
  background: radial-gradient(ellipse at 50% 30%, #cde8ff 0%, #b8d8f8 50%, #a5ccf2 100%);   /* slightly warmer sky blue in light mode */
  box-shadow:
    0 2px 8px rgba(0,0,0,0.07),
    0 8px 30px rgba(0,0,0,0.09);
}

/* Road: dark to warm gray */
[data-theme="light"] #rmap-road-base {
  stroke: #b8ae9e;
}

/* Road dashes: subtle amber */
[data-theme="light"] #rmap-svg path[stroke="rgba(200,149,42,0.10)"] {
  stroke: rgba(154,111,26,0.15);
}

/* Active trail: deeper amber in light mode */
[data-theme="light"] #rmap-active-trail {
  stroke: rgba(154,111,26,0.70) !important;
}

/* Node bodies */
[data-theme="light"] .rmap-node-bg {
  fill: rgba(255,249,238,0.92);
  stroke: #c8b898;
}
[data-theme="light"] .rmap-node.is-active .rmap-node-bg {
  fill: #fff8ee;
  stroke: rgba(154,111,26,0.7);
}
[data-theme="light"] .rmap-node.is-muted .rmap-node-bg {
  fill: rgba(240,230,210,0.7);
  stroke: #d0c5ae;
}
[data-theme="light"] .rmap-icon { stroke: #7a6040; }
[data-theme="light"] .rmap-node.is-active .rmap-icon { stroke: var(--gold); }
[data-theme="light"] .rmap-node-solution .rmap-icon { stroke: #228040; }

/* Info cards */
[data-theme="light"] .rmap-card {
  background: linear-gradient(160deg, rgba(255,249,238,0.97) 0%, rgba(248,240,222,0.99) 100%);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.12),
    0 16px 40px rgba(0,0,0,0.10),
    0 0 0 1px rgba(120,90,40,0.12);
}

/* ── Footer ─────────────────────────────────────────────────── */
[data-theme="light"] #footer {
  background: #ede5d8;
  border-top-color: rgba(120,90,40,0.14);
}

/* ── Smooth theme transition (all elements) ─────────────────── */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, box-shadow, fill, stroke;
  transition-duration: 0.35s;
  transition-timing-function: ease;
}

/* But don't slow down transforms/opacity on animated things */
.fan-card,
.reveal,
.exc-slide,
.rmap-card,
.rmap-node-bg,
#rmap-active-trail {
  transition-property: background-color, border-color, color, box-shadow,
                       fill, stroke, transform, opacity;
}
