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

:root {
  --bg-deep: #030a06;
  --bg-emerald: #061f14;
  --bg-card: rgba(8, 28, 18, 0.65);
  --saudi-green: #00843D;
  --saudi-green-light: #00a850;
  --saudi-green-glow: rgba(0, 168, 80, 0.35);
  --gold: #f0c961;
  --gold-light: #fae498;
  --gold-dark: #b8912e;
  --gold-dim: rgba(240, 201, 97, 0.22);
  --gold-glow: rgba(240, 201, 97, 0.45);
  --ink: #f8faf6;
  --muted: #cbd7cc;
  --glass-border: rgba(240, 201, 97, 0.25);
  --font-display: 'Cairo', 'Amiri', sans-serif;
  --font-serif: 'Amiri', serif;
  --font-body: 'Tajawal', sans-serif;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════ خلفيات الشاشة والتأثيرات الحية ═══════════ */
#anti-gravity-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

/* تدرج وطني عميق وإضاءة هادئة */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0, 132, 61, 0.28) 0%, transparent 70%),
    radial-gradient(circle 700px at 85% 85%, rgba(11, 46, 28, 0.35) 0%, transparent 60%),
    radial-gradient(circle 600px at 15% 90%, rgba(240, 201, 97, 0.08) 0%, transparent 65%),
    linear-gradient(180deg, #04120a 0%, #030805 100%);
}

/* طبقة النقش التراثي (نقش السدو الهندسي الخفيف) */
.bg-sadu-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: radial-gradient(#f0c961 1px, transparent 1px);
  background-size: 32px 32px;
}

/* تأثير السينما Vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 38;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(1, 6, 3, 0.75) 100%);
}

/* تأثير حبيبات الفيلم */
body::after {
  content: '';
  position: fixed;
  inset: -60px;
  z-index: 39;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* أشرطة السينما */
.letterbox {
  position: fixed;
  left: 0;
  right: 0;
  height: 6.5vh;
  background: #010503;
  z-index: 45;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.letterbox.top { top: 0; transform: scaleY(0); transform-origin: top; }
.letterbox.bottom { bottom: 0; transform: scaleY(0); transform-origin: bottom; }
body.cinema .letterbox { transform: scaleY(1); }
body.cinema .top-nav-bar { opacity: 0; pointer-events: none; }
body.cinema .reveal .controls { opacity: 0; pointer-events: none; }

/* ═══════════ شريط التحكم العلوي الفاخر ═══════════ */
.top-nav-bar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(4, 18, 11, 0.78);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0, 132, 61, 0.15);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.top-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline-end: 12px;
  border-inline-end: 1px solid rgba(240, 201, 97, 0.2);
  cursor: pointer;
}
.top-nav-logo svg {
  width: 26px;
  height: 26px;
  fill: var(--gold);
}
.top-nav-logo span {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240, 201, 97, 0.08);
  color: var(--ink);
  border: 1px solid rgba(240, 201, 97, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}
.nav-btn:hover {
  background: rgba(240, 201, 97, 0.2);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-1px);
}
.nav-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.nav-btn--primary {
  background: linear-gradient(135deg, rgba(0, 132, 61, 0.8), rgba(0, 84, 41, 0.9));
  border-color: rgba(240, 201, 97, 0.4);
  color: var(--gold-light);
  box-shadow: 0 0 15px rgba(0, 132, 61, 0.3);
}
.nav-btn--primary:hover {
  background: linear-gradient(135deg, rgba(0, 168, 80, 0.9), rgba(0, 110, 53, 0.95));
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(0, 168, 80, 0.45);
}

/* ═══════════ Reveal Presentation Styles ═══════════ */
.reveal {
  position: relative;
  z-index: 10;
  height: 100%;
}
.reveal .slides {
  height: 100%;
}
.reveal .slides section {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 2vh, 22px);
  padding: clamp(65px, 9vh, 90px) clamp(20px, 5vw, 60px) clamp(35px, 6vh, 60px);
  box-sizing: border-box;
}

.reveal .progress {
  height: 4px;
  background: rgba(240, 201, 97, 0.15);
}
.reveal .progress span {
  background: linear-gradient(90deg, var(--saudi-green), var(--gold));
}

.reveal .controls button {
  color: var(--gold);
}

/* ═══════════ خلفيات الشرائح السينمائية ═══════════ */
.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.1) brightness(0.65) contrast(1.1);
  transform: scale(1.06);
  transition: opacity 1.5s ease;
}
.present .slide-bg img {
  opacity: 0.35;
  animation: kenburns 22s ease-in-out forwards;
}

@keyframes kenburns {
  0%   { transform: scale(1.05) translate3d(0, 0, 0); }
  50%  { transform: scale(1.16) translate3d(-1.5%, 1%, 0); }
  100% { transform: scale(1.08) translate3d(1%, -1%, 0); }
}

.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 40%, rgba(6, 31, 20, 0.4) 0%, rgba(3, 10, 6, 0.85) 80%),
    linear-gradient(180deg, rgba(2, 8, 4, 0.7) 0%, transparent 35%, rgba(2, 8, 4, 0.9) 100%);
}

/* محتوى الشرائح فوق الخلفيات */
.reveal .slides section > *:not(.slide-bg):not(.scrim):not(.vision-num) {
  position: relative;
  z-index: 5;
}

/* ═══════════ النصوص والعناوين ═══════════ */
.kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vh, 16px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kicker--center {
  justify-content: center;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 15%, var(--gold-light) 65%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.display--xl {
  font-size: clamp(36px, 8.5vh, 76px);
}
.display--lg {
  font-size: clamp(28px, 6vh, 56px);
}
.display--h2 {
  font-size: clamp(24px, 4.8vh, 44px);
}

.slogan-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  background: radial-gradient(ellipse at center, rgba(0, 132, 61, 0.45) 0%, rgba(3, 18, 10, 0.6) 100%);
  border: 1px solid var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 25px rgba(240, 201, 97, 0.25), inset 0 0 15px rgba(0, 132, 61, 0.3);
}
.slogan-badge .slogan-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.6vh, 32px);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.lede {
  margin: 0;
  max-width: 58ch;
  text-align: center;
  color: var(--muted);
  font-size: clamp(15px, 2.1vh, 19px);
  line-height: 1.85;
}

.folio {
  position: absolute;
  bottom: 2.8vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: var(--gold);
  opacity: 0.65;
  font-size: 13px;
  font-family: var(--font-display);
  letter-spacing: 2px;
}

/* ═══════════ الزخارف والرموز ═══════════ */
.orn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(440px, 70vw);
}
.orn .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.star8 {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  flex-shrink: 0;
}
.emblem-icon {
  width: 48px;
  height: 48px;
  fill: #ffffff !important;
  color: #ffffff !important;
  filter: drop-shadow(0 0 14px var(--gold-glow));
}

/* ═══════════ البطاقات الزجاجية Glassmorphism ═══════════ */
.glass {
  background: rgba(6, 22, 14, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* ═══════════ شريحة ٢: الدولتان الأولى والثانية ═══════════ */
.ledger {
  width: min(920px, 92vw);
  padding: clamp(16px, 3vh, 32px) clamp(20px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 24px);
}
.era {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  align-items: flex-start;
  transition: transform 0.3s ease;
}
.era-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
  flex-shrink: 0;
  text-align: right;
}
.era-hijri {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 2.2vh, 18px);
}
.era-grego {
  color: var(--muted);
  font-size: clamp(12px, 1.8vh, 14px);
  opacity: 0.85;
}
.era-rule {
  width: 2px;
  align-self: stretch;
  background: linear-gradient(180deg, var(--gold), rgba(0, 132, 61, 0.3));
  border-radius: 2px;
}
.era-body {
  flex: 1;
}
.era-body h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vh, 23px);
  color: var(--gold-light);
}
.era-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: clamp(13px, 1.9vh, 15.5px);
}
.pull-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.7vh, 23px);
  color: var(--gold);
  text-align: center;
  font-style: italic;
}

/* ═══════════ استعراض محطات التوحيد التفاعلي ═══════════ */
.unification-container {
  width: min(960px, 94vw);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
  align-items: center;
}

.milestone-spotlight {
  width: 100%;
  padding: clamp(16px, 2.6vh, 26px) clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(4, 22, 13, 0.78);
  border: 1px solid var(--gold);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(240, 201, 97, 0.2);
  backdrop-filter: blur(16px);
  transition: all 0.4s ease;
}
.spotlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 8px;
}
.spotlight-badge {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.7vh, 14px);
  color: var(--gold);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.spotlight-step-indicator {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-light);
  background: rgba(240, 201, 97, 0.12);
  border: 1px solid var(--gold-dim);
  padding: 2px 10px;
  border-radius: 999px;
}
.spotlight-body {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  text-align: right;
}
.spotlight-year-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 130px;
  flex-shrink: 0;
}
.spotlight-year {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vh, 52px);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 20px var(--gold-glow);
  transition: all 0.3s ease;
}
.spotlight-hijri {
  font-size: clamp(13px, 1.8vh, 15px);
  color: var(--muted);
  margin-top: 4px;
}
.spotlight-rule {
  width: 2px;
  align-self: stretch;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.spotlight-content-col {
  flex: 1;
}
.spotlight-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.7vh, 24px);
  font-weight: 700;
  color: var(--gold-light);
  transition: all 0.3s ease;
}
.spotlight-desc {
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 1.9vh, 15.5px);
  line-height: 1.8;
  transition: all 0.3s ease;
}

/* شبكة أزرار المحطات الستة التفاعلية */
.milestones-timeline-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
  width: 100%;
}
.milestone-step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: rgba(4, 18, 11, 0.7);
  border: 1px solid rgba(240, 201, 97, 0.2);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.35s ease;
  font-family: var(--font-body);
}
.milestone-step-btn:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.milestone-step-btn.active {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(0, 132, 61, 0.55), rgba(4, 25, 15, 0.85));
  box-shadow: 0 0 20px rgba(240, 201, 97, 0.35), 0 0 10px rgba(0, 132, 61, 0.5);
  transform: scale(1.05);
}
.m-step-num {
  font-size: 10px;
  color: var(--gold);
  opacity: 0.85;
}
.milestone-step-btn.active .m-step-num {
  color: #ffffff;
  font-weight: 700;
}
.milestone-step-btn.active .m-year {
  color: #ffffff;
  text-shadow: 0 0 12px var(--gold);
}
.milestone-step-btn.active .m-place {
  color: var(--gold-light);
  font-weight: 700;
}

@media (max-width: 760px) {
  .spotlight-body {
    flex-direction: column;
    text-align: center;
  }
  .spotlight-rule { display: none; }
  .milestones-timeline-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ═══════════ شريحة ٤: ملوك المجد ═══════════ */
.kings-wrapper {
  width: min(980px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 20px);
}
.kings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
  width: 100%;
}
.king-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  background: rgba(6, 25, 16, 0.65);
  border: 1px solid rgba(240, 201, 97, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.king-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: rgba(9, 36, 23, 0.85);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 132, 61, 0.25);
}
.king-card--highlight {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(12, 45, 28, 0.85), rgba(5, 20, 12, 0.9));
  box-shadow: 0 0 20px rgba(240, 201, 97, 0.18);
}
.king-card--highlight::before {
  content: 'العهد الميمون';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
}
.k-avatar-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  fill: var(--gold);
}
.k-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 2.1vh, 17px);
  color: var(--ink);
  margin-bottom: 3px;
}
.k-title {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 4px;
}
.k-period {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.8;
}

.leadership-note {
  max-width: 78ch;
  text-align: center;
  color: var(--muted);
  font-size: clamp(13px, 1.8vh, 15px);
  line-height: 1.8;
  margin: 0;
  padding: 10px 20px;
  background: rgba(0, 132, 61, 0.1);
  border-radius: 12px;
  border: 1px dashed rgba(240, 201, 97, 0.25);
}

/* ═══════════ استعراض ملوك المملكة الفردي الفاخر ═══════════ */
.king-showcase {
  width: min(1040px, 94vw);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.5vw, 48px);
  padding: clamp(18px, 3vh, 32px) clamp(20px, 3.5vw, 40px);
  background: rgba(4, 20, 12, 0.72);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.king-portrait-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.king-portrait-frame {
  width: clamp(180px, 22vw, 240px);
  height: clamp(230px, 29vh, 320px);
  border-radius: 20px;
  border: 2px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(240, 201, 97, 0.25), 0 15px 35px rgba(0, 0, 0, 0.6);
  position: relative;
  background: #06190f;
}
.king-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s ease;
}
.king-portrait-frame:hover img {
  transform: scale(1.04);
}
.king-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(240, 201, 97, 0.12);
  border: 1px solid rgba(240, 201, 97, 0.35);
}
.king-status-badge--living {
  background: linear-gradient(135deg, rgba(0, 132, 61, 0.8), rgba(0, 70, 34, 0.9));
  border-color: var(--gold);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 132, 61, 0.4);
}

.king-info-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: clamp(8px, 1.4vh, 14px);
}
.king-order-tag {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.7vh, 14.5px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.king-name-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.8vh, 34px);
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1.25;
}
.king-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.king-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 132, 61, 0.18);
  border: 1px solid rgba(240, 201, 97, 0.22);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: clamp(12px, 1.7vh, 13.5px);
  color: var(--muted);
}
.king-meta-chip strong {
  color: var(--gold);
  font-family: var(--font-display);
}

.king-achievements-box {
  width: 100%;
  background: rgba(2, 12, 7, 0.45);
  border-radius: 14px;
  border: 1px solid rgba(240, 201, 97, 0.15);
  padding: clamp(10px, 1.8vh, 16px) clamp(12px, 1.8vw, 18px);
}
.achievements-heading {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vh, 15px);
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}
.king-achievements-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.king-achievements-list li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: clamp(13px, 1.8vh, 15px);
  line-height: 1.7;
}
.king-achievements-list li::before {
  content: '◆';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-size: 10px;
  top: 1px;
}

@media (max-width: 820px) {
  .king-showcase {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }
  .king-info-content {
    align-items: center;
    text-align: center;
  }
  .king-achievements-list li {
    text-align: right;
  }
  .king-portrait-frame {
    width: 150px;
    height: 190px;
  }
}

/* ═══════════ شريحة ٥: رؤية ٢٠٣٠ وسمو الأمير محمد بن سلمان ═══════════ */
.vision-num {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: clamp(110px, 25vh, 240px);
  font-weight: 900;
  line-height: 1;
  color: rgba(240, 201, 97, 0.04);
}

.vision-mbs-wrapper {
  width: min(1080px, 95vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  position: relative;
  z-index: 5;
}

.mbs-cutout-container {
  flex-shrink: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.mbs-cutout-img {
  height: clamp(310px, 58vh, 560px);
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 35px rgba(0, 168, 80, 0.4)) drop-shadow(0 0 15px rgba(240, 201, 97, 0.25));
  mask-image: linear-gradient(to top, transparent 0%, black 12%, black 100%);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 12%, black 100%);
  animation: mbsGlow 6s ease-in-out infinite alternate;
}
@keyframes mbsGlow {
  0% { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 25px rgba(0, 168, 80, 0.35)) drop-shadow(0 0 12px rgba(240, 201, 97, 0.2)); }
  100% { transform: translateY(-6px) scale(1.015); filter: drop-shadow(0 0 40px rgba(0, 168, 80, 0.55)) drop-shadow(0 0 20px rgba(240, 201, 97, 0.35)); }
}

.vision-mbs-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 16px);
  text-align: right;
  padding: clamp(16px, 2.6vh, 28px) clamp(20px, 2.8vw, 36px);
}
.mbs-badge-leader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 132, 61, 0.22);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 16px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-light);
  width: fit-content;
}
.mbs-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.4vh, 21px);
  color: var(--ink);
  font-style: italic;
  line-height: 1.7;
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 14px;
}
.mbs-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.mbs-pillar-box {
  background: rgba(2, 14, 8, 0.55);
  border: 1px solid rgba(240, 201, 97, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: right;
}
.mbs-pillar-title {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vh, 15px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mbs-pillar-desc {
  font-size: clamp(11px, 1.5vh, 12.5px);
  color: #f0f4f1;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .vision-mbs-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .mbs-cutout-img {
    height: 220px;
  }
  .mbs-pillars-grid {
    grid-template-columns: 1fr;
  }
}

/* شريط تقدم العرض السينمائي في الأعلى */
#cinema-progress-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
body.cinema #cinema-progress-wrapper {
  opacity: 1;
}
#cinema-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--saudi-green), var(--gold));
  box-shadow: 0 0 10px var(--gold);
  transition: width 0.1s linear;
}
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(8, 38, 23, 0.8), rgba(4, 18, 11, 0.9));
  border-color: rgba(240, 201, 97, 0.4);
}
.p-badge {
  display: inline-block;
  font-size: 10px;
  color: var(--gold);
  background: rgba(240, 201, 97, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.p-name {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.6vh, 22px);
  font-weight: 700;
  color: var(--gold-light);
  margin: 0;
}
.p-desc {
  color: var(--muted);
  font-size: clamp(12px, 1.7vh, 14px);
  line-height: 1.65;
  margin: 0;
}

/* ═══════════ شريحة ٦: همة طويق والمستقبل ═══════════ */
.tuwaiq-quote-box {
  width: min(840px, 90vw);
  padding: clamp(20px, 3.5vh, 36px) clamp(24px, 4vw, 48px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-radius: 22px;
  position: relative;
}
.tuwaiq-quote-text {
  font-family: var(--font-serif);
  font-size: clamp(18px, 3vh, 27px);
  font-weight: 700;
  line-height: 1.8;
  color: var(--ink);
  margin: 0;
}
.tuwaiq-quote-author {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.9vh, 16px);
  color: var(--gold);
  font-weight: 700;
}
.achievements-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 18px);
  width: min(920px, 92vw);
}
.achievement-card {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 16px;
  background: rgba(6, 25, 16, 0.6);
  border: 1px solid rgba(240, 201, 97, 0.2);
  border-radius: 14px;
}
.ach-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vh, 17px);
  font-weight: 700;
  color: var(--gold);
}
.ach-sub {
  font-size: 12px;
  color: #f0f4f1;
  margin-top: 2px;
}

/* ═══════════ شريحة ٧: بطاقة التهنئة التفاعلية ═══════════ */
.greeting-section {
  width: min(860px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.greeting-generator {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(16px, 2.5vh, 26px);
}
.name-input-group {
  display: flex;
  gap: 10px;
  width: min(480px, 100%);
}
.name-input {
  flex: 1;
  padding: 10px 18px;
  background: rgba(4, 18, 11, 0.85);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  text-align: center;
  outline: none;
  transition: all 0.25s ease;
}
.name-input:focus {
  box-shadow: 0 0 18px var(--gold-glow);
  border-color: var(--gold-light);
}
.generate-card-btn {
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--saudi-green), #034f26);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.generate-card-btn:hover {
  background: linear-gradient(135deg, var(--saudi-green-light), var(--saudi-green));
  box-shadow: 0 0 20px rgba(0, 168, 80, 0.4);
  transform: translateY(-1px);
}

/* معاينة البطاقة الرقمية */
.card-preview-box {
  width: min(520px, 96vw);
  background: linear-gradient(145deg, #072617 0%, #03140b 60%, #082d1c 100%);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.7), 0 0 35px rgba(240, 201, 97, 0.2);
  position: relative;
  overflow: hidden;
}
.card-preview-box::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(240, 201, 97, 0.35);
  border-radius: 14px;
  pointer-events: none;
}
.card-preview-emblem {
  width: 42px;
  height: 42px;
  fill: var(--gold);
}
.card-preview-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  margin: 0;
}
.card-preview-slogan {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #ffffff;
  margin: 0;
}
.card-preview-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  margin: 6px 0 0;
  padding: 4px 18px;
  border-bottom: 1px solid var(--gold-dim);
}
.card-preview-wishes {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}
.card-preview-date {
  font-size: 11.5px;
  color: var(--gold);
  opacity: 0.8;
  margin-top: 4px;
}

.download-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 24px;
  background: rgba(240, 201, 97, 0.15);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.download-card-btn:hover {
  background: var(--gold);
  color: #03140b;
  box-shadow: 0 0 25px var(--gold-glow);
}

/* ═══════════ شريط الترجمة والتعليق الصوتي المباشر ═══════════ */
#subtitle-bar {
  display: none !important;
}

/* ═══════════ نوافذ السينما والبدء ═══════════ */
#cinema-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(2, 9, 5, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#cinema-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#play-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, rgba(0, 132, 61, 0.6) 0%, rgba(3, 20, 12, 0.9) 100%);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 0 50px rgba(240, 201, 97, 0.35), 0 0 30px rgba(0, 132, 61, 0.4);
}
#play-btn:hover {
  transform: scale(1.1);
  border-color: #ffffff;
  box-shadow: 0 0 65px var(--gold-glow), 0 0 45px rgba(0, 168, 80, 0.6);
}
#play-btn svg {
  width: 42px;
  height: 42px;
  fill: var(--gold-light);
  margin-inline-start: 4px;
}
.cinema-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 44px 36px;
  border-radius: 28px;
  border: 1.5px solid var(--gold);
  background: radial-gradient(circle at 50% 20%, rgba(5, 30, 18, 0.92) 0%, rgba(2, 12, 7, 0.95) 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 132, 61, 0.4), 0 0 25px rgba(240, 201, 97, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  max-width: 680px;
  margin: 0 20px;
  text-align: center;
  animation: cardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(15px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.co-kicker {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-light);
  text-transform: uppercase;
  opacity: 0.9;
}
.co-emblem,
.co-emblem-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 35px rgba(240, 201, 97, 0.8));
  margin: 4px auto 0;
  display: block;
}

.emblem-img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 16px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 28px rgba(240, 201, 97, 0.6));
  display: inline-block;
}
.co-title {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: clamp(26px, 4.2vh, 38px);
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(240, 201, 97, 0.6), 0 2px 10px #000000;
  text-align: center;
  letter-spacing: 0;
}
.co-slogan {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.6vh, 22px);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  margin-top: -8px;
}
.co-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 70%;
  max-width: 260px;
  margin: 2px 0;
}
.co-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.co-divider .star8 {
  width: 14px;
  height: 14px;
  fill: var(--gold);
  flex-shrink: 0;
}
.co-hint {
  margin: 0;
  color: #ffffff !important;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: clamp(14px, 2vh, 16px);
  font-weight: 500;
  text-align: center;
  max-width: 50ch;
  line-height: 1.75;
  opacity: 0.92;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  letter-spacing: 0;
}
.co-play-label {
  color: #f0c961;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: -6px;
}
.co-skip-btn {
  margin-top: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 97, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}
.co-skip-btn:hover {
  border-color: var(--gold);
  color: #ffffff;
  background: rgba(240, 201, 97, 0.08);
}
.co-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
#skip-btn {
  background: none;
  border: 1px solid rgba(240, 201, 97, 0.3);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 24px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.25s ease;
}
#skip-btn:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(240, 201, 97, 0.1);
}

#stop-cinema {
  display: none !important;
}

/* ═══════════ قائمة الفهرس السريع السفلية / الجانبية ═══════════ */
#toc-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 8, 4, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.35s ease;
}
#toc-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.toc-box {
  width: min(640px, 92vw);
  background: rgba(6, 25, 16, 0.95);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 30px rgba(0, 132, 61, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 12px;
}
.toc-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
}
.toc-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.toc-close:hover {
  color: var(--gold);
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.toc-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(240, 201, 97, 0.06);
  border: 1px solid rgba(240, 201, 97, 0.15);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  text-align: right;
  cursor: pointer;
  transition: all 0.25s ease;
}
.toc-item-btn:hover {
  background: rgba(0, 132, 61, 0.3);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateX(-4px);
}
.toc-item-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}

/* ═══════════ تحسينات التجاوب للشاشات المختلفة ═══════════ */
@media (max-width: 920px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .kings-grid { grid-template-columns: repeat(2, 1fr); }
  .milestones-grid { grid-template-columns: repeat(3, 1fr); }
  .top-nav-logo span { display: none; }
  .toc-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .top-nav-bar { width: 92vw; justify-content: space-between; padding: 6px 12px; }
  .nav-btn span { display: none; }
  .nav-btn { padding: 6px 10px; }
  .dyad { flex-direction: column; }
  .dyad-sep { width: 60%; height: 1px; }
  .era { flex-direction: column; gap: 8px; }
  .era-rule { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card--lead { flex-direction: column; align-items: flex-start; }
  .name-input-group { flex-direction: column; }
  .generate-card-btn { width: 100%; }
}

/* ═══════════ تصميم شريحة صناع المشروع (شكل سينمائي فاخر) ═══════════ */
.project-credits-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
}

.project-credits-card {
  width: 100%;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 132, 61, 0.25);
  background: rgba(3, 16, 10, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.credits-emblem {
  width: 54px;
  height: 54px;
  fill: var(--gold);
  filter: drop-shadow(0 0 16px var(--gold-glow));
}

.credits-kicker {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.credits-main-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vh, 26px);
  font-weight: 800;
  color: var(--gold);
  border-bottom: 1px solid rgba(240, 201, 97, 0.3);
  padding-bottom: 8px;
  width: 80%;
  text-align: center;
}

.authors-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.author-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: radial-gradient(circle, rgba(0, 132, 61, 0.35) 0%, rgba(3, 20, 12, 0.85) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 25px rgba(240, 201, 97, 0.25), 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.author-box:hover {
  transform: scale(1.05);
  border-color: #ffffff;
  box-shadow: 0 0 35px var(--gold-glow);
}

.author-name {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: clamp(17px, 2.4vh, 22px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0;
  line-height: 1.4;
}

.authors-ampersand {
  font-family: 'Amiri', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.credits-desc {
  margin: 4px 0 0 0;
  max-width: 65ch;
  font-family: var(--font-body);
  font-size: clamp(13.5px, 1.8vh, 16px);
  color: var(--muted);
  line-height: 1.7;
  letter-spacing: 0;
}

.credits-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-light);
  opacity: 0.85;
  letter-spacing: 0;
}
