/* =========================================================
   VIRASAT E KEHLOOR — THE ROYAL HERITAGE OF BILASPUR
   Style System & Visual Aesthetic
   Matches Reference: bilaspur/assets/bilaspur.jpeg
   ========================================================= */

:root {
  /* Royal Color Palette */
  --bg-deep: #120204;
  --bg-header: #280509;
  --bg-crimson-dark: #1e0306;
  --bg-crimson-mid: #2e080d;
  --bg-crimson-velvet: #3b0a11;
  --bg-crimson-light: #520f18;
  --bg-card: #200407;
  --bg-card-hover: #2d070b;
  --bg-footer: #180204;

  /* Ornate Gold Tones */
  --gold-primary: #d4af37;
  --gold-light: #f5e4ba;
  --gold-metallic: #e5c378;
  --gold-muted: #c5a059;
  --gold-antique: #aa853c;
  --gold-dark: #73541e;
  --gold-border: #8b682e;
  --gold-border-subtle: #4d2f16;
  --gold-glow: rgba(212, 175, 55, 0.45);
  --gold-glow-soft: rgba(212, 175, 55, 0.2);

  /* Typography Colors */
  --text-pure: #ffffff;
  --text-ivory: #fff6eb;
  --text-cream: #f4e8d8;
  --text-parchment: #e2d2bf;
  --text-muted: #af9881;
  --text-gold-light: #f9ecc8;

  /* Typography Fonts */
  --font-royal: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-classical: 'Marcellus', 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;

  /* Transitions */
  --trans-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* =========================================================
   GRAND ROYAL CURTAIN OPENING ANIMATION (PAGE LOAD REVEAL)
   ========================================================= */
.royal-curtain-stage {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  transition: visibility 0.4s ease 5.2s;
}

.royal-curtain-stage.opened {
  pointer-events: none;
  visibility: hidden;
}

/* Velvet Curtain Panels */
.stage-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  height: 100%;
  z-index: 10;
  background-color: #2b050a;
  background-image: 
    radial-gradient(ellipse at 50% 50%, rgba(85, 14, 23, 0.45) 0%, rgba(15, 2, 4, 0.8) 100%),
    repeating-linear-gradient(
      90deg, 
      #3f0810 0px, 
      #1a0306 30px, 
      #4d0d16 60px, 
      #220408 90px, 
      #570f1a 120px, 
      #28050a 150px,
      #3f0810 180px
    );
  background-size: 100% 100%, 180px 100%;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.95);
  transition: transform 4.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.stage-curtain.curtain-left {
  left: 0;
  box-shadow: 15px 0 40px rgba(0, 0, 0, 0.9);
  transform: translateX(0);
}

.stage-curtain.curtain-right {
  right: 0;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.9);
  transform: translateX(0);
}

/* Parting / Opening Animation Triggered via Class */
.royal-curtain-stage.opened .stage-curtain.curtain-left {
  transform: translateX(-100%);
}

.royal-curtain-stage.opened .stage-curtain.curtain-right {
  transform: translateX(100%);
}

/* Gold Trimming along the center seam */
.curtain-gold-trim {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(180deg, #ffd700 0%, #d4af37 30%, #8a6520 70%, #d4af37 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.65);
}

.curtain-gold-trim.right-trim {
  right: 0;
}

.curtain-gold-trim.left-trim {
  left: 0;
}

/* Gold Tassel Accents */
.curtain-tassel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 90px;
  z-index: 15;
}

.curtain-left .curtain-tassel {
  right: -12px;
}

.curtain-right .curtain-tassel {
  left: -12px;
}

.tassel-gold-knot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff0b8, #d4af37 60%, #754d14 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.5);
  position: relative;
}

.tassel-gold-knot::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 5px;
  width: 14px;
  height: 48px;
  background: linear-gradient(180deg, #d4af37, #855b18);
  border-radius: 0 0 7px 7px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

/* Center Royal Seal (Fades as curtains part) */
.curtain-center-crest {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(42, 6, 12, 0.98) 0%, rgba(16, 2, 4, 0.96) 80%);
  border: 2px solid var(--gold-border);
  border-radius: 14px;
  padding: 2.2rem 3.4rem;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95), 0 0 45px rgba(212, 175, 55, 0.5);
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, transform 3.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.royal-curtain-stage.opened .curtain-center-crest {
  opacity: 0;
  transform: scale(1.18);
  pointer-events: none;
}

/* Royal Coat of Arms Logo in Curtain Stage */
.curtain-crest-logo-wrap {
  width: 160px;
  height: 160px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.85)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.9));
  animation: logoGlowPulse 2.8s infinite ease-in-out;
  flex-shrink: 0;
}

.curtain-crest-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes logoGlowPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.75)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.95)) drop-shadow(0 0 15px rgba(212, 175, 55, 1)); }
}

.crest-seal-title {
  font-family: var(--font-royal);
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--gold-light);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.95), 0 0 24px rgba(212, 175, 55, 0.5);
  margin-bottom: 0.35rem;
}

.crest-seal-subtitle {
  font-family: var(--font-classical);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.crest-seal-divider {
  color: var(--gold-primary);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.crest-seal-prompt {
  font-family: var(--font-royal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold-metallic);
  opacity: 0.85;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-parchment);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at 50% 0%, #2f070d 0%, transparent 65%),
    radial-gradient(ellipse at 50% 100%, #200306 0%, transparent 75%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Outer Master Wrapper */
.royal-page-wrapper {
  position: relative;
  max-width: 1536px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-deep);
  border-left: 1px solid rgba(212, 175, 55, 0.15);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
}

/* =========================================================
   1. TOP NAVIGATION HEADER
   ========================================================= */
.royal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #2a0509 0%, #1c0305 92%, #120103 100%);
  border-bottom: 1px solid #4a191f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  padding: 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1.5rem;
}

/* Brand / Logo */
.brand-container {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  text-decoration: none;
  transition: var(--trans-smooth);
}

.brand-container:hover {
  transform: translateY(-1px);
}

.crest-icon-wrapper {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.65));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.brand-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
  transition: transform 0.35s ease, filter 0.35s ease;
}

.brand-container:hover .crest-icon-wrapper {
  transform: scale(1.12);
  filter: drop-shadow(0 0 22px rgba(255, 215, 0, 0.95));
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-family: var(--font-royal);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  line-height: 1.15;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
}

.brand-subtitle {
  font-family: var(--font-classical);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gold-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Navigation Links */
.royal-nav {
  display: flex;
  align-items: center;
}

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

.nav-link {
  position: relative;
  font-family: var(--font-royal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-parchment);
  text-transform: uppercase;
  padding: 0.5rem 0.2rem;
  transition: var(--trans-smooth);
}

.nav-link:hover {
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-link.active {
  color: var(--gold-light);
}

.active-indicator {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  box-shadow: 0 0 6px var(--gold-primary);
}

.active-indicator::after {
  content: "♦";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--gold-light);
}

/* Header Right: Explore Button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #480c13 0%, #290408 100%);
  border: 1.5px solid var(--gold-border);
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 215, 0, 0.2);
  transition: var(--trans-smooth);
}

.btn-explore:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.crown-icon {
  color: var(--gold-primary);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--gold-primary);
  transition: var(--trans-smooth);
}

/* =========================================================
   2. HERO SECTION
   ========================================================= */
/* =========================================================
   2. HERO SECTION
   ========================================================= */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 340px;
  max-height: 390px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #3c1218;
}

/* Left & Right Velvet Royal Curtains with Carved Pillars */
/* exact_hero_clean.jpg already contains the authentic matching curtains & pillars */
.hero-curtain {
  display: none;
}

/* Top Carved Palace Valance Frame */
.hero-top-arch {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: radial-gradient(circle at center, transparent 0%, transparent 80%),
              repeating-linear-gradient(90deg, #3d0e14, #3d0e14 15px, #260509 15px, #260509 30px);
  border-bottom: 1px solid var(--gold-border);
  z-index: 9;
  opacity: 0.6;
}

/* Hero Panoramic Sutlej Riverside Palace Backdrop */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.0) contrast(1.06);
}

/* Vignette overlay: dark on left for text legibility, transparent on right so the fort is 100% visible */
.hero-vignette-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg, 
    rgba(16, 2, 4, 0.75) 0%, 
    rgba(22, 3, 6, 0.45) 28%, 
    transparent 50%
  );
  pointer-events: none;
}

/* Hero Content - Placed cleanly inside the left framed area */
.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 2rem 2rem 2rem clamp(135px, 10.5vw, 165px);
}

.hero-text-block {
  max-width: 460px;
}

.hero-overline {
  font-family: var(--font-royal);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-metallic);
  display: block;
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-heading {
  font-family: var(--font-royal);
  font-size: clamp(2.4rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  display: flex;
  flex-direction: column;
}

.heading-line-1, .heading-line-2 {
  background: linear-gradient(180deg, #ffffff 0%, #f6e3ba 35%, #d4af37 70%, #9a732b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.9));
}

/* Ornate Flourish Divider */
.ornate-flourish-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.7rem 0 1rem;
  color: var(--gold-primary);
  font-size: 0.85rem;
  opacity: 0.9;
}

.flourish-line {
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary));
}

.ornate-flourish-divider .flourish-line:last-child {
  background: linear-gradient(90deg, var(--gold-primary), transparent);
}

.flourish-ornament {
  font-family: var(--font-royal);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-shadow: 0 0 6px var(--gold-glow);
}

.hero-subtext {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-parchment);
  line-height: 1.45;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* Royal Buttons */
.btn-royal {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.45rem;
  font-family: var(--font-royal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: linear-gradient(180deg, #571018 0%, #2f070c 100%);
  border: 1.5px solid var(--gold-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 230, 150, 0.25);
  border-radius: 4px;
  transition: var(--trans-smooth);
}

.btn-royal:hover {
  background: linear-gradient(180deg, #6c1620 0%, #3e0910 100%);
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-royal-symbol {
  font-size: 0.95rem;
  color: var(--gold-primary);
}

.btn-outline-gold {
  background: linear-gradient(180deg, #32080d 0%, #1a0306 100%);
  border: 1.2px solid var(--gold-border);
  border-radius: 4px;
  padding: 0.55rem 1.3rem;
  font-size: 0.76rem;
}

/* =========================================================
   3. RULERS OF KEHLOOR (HORIZONTAL TIMELINE)
   ========================================================= */
.rulers-section {
  position: relative;
  padding: 1.2rem 1.5rem 1.1rem;
  background: linear-gradient(180deg, #1b0306 0%, #220509 50%, #180204 100%);
  border-bottom: 2px solid #380e14;
}

/* Section Header */
.ornate-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-royal);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-light);
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.header-filigree-left, .header-filigree-right {
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.ornate-section-header.compact {
  margin-bottom: 0.8rem;
}

.ornate-section-header.compact .header-bracket-left,
.ornate-section-header.compact .header-bracket-right {
  color: var(--gold-primary);
  font-size: 0.85rem;
}

/* Carousel Outer */
.timeline-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
}

.carousel-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-muted);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 50%;
  background: rgba(28, 4, 8, 0.85);
  transition: var(--trans-smooth);
  flex-shrink: 0;
  z-index: 10;
}

.carousel-nav-btn:hover {
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
  transform: scale(1.08);
}

/* Track */
.timeline-track-container {
  position: relative;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1.1rem 0.5rem 0.3rem;
}

.timeline-track-container::-webkit-scrollbar {
  display: none;
}

/* Golden Horizon Line */
.timeline-golden-line {
  position: absolute;
  top: 48px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--gold-border) 10%, 
    var(--gold-primary) 50%, 
    var(--gold-border) 90%, 
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
  z-index: 1;
}

.rulers-track {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  gap: 1rem;
  min-width: 960px;
}

/* Individual Ruler Card */
.ruler-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  width: 128px;
  transition: var(--trans-smooth);
}

.ruler-card:hover {
  transform: translateY(-4px);
}

.ruler-card:hover .ruler-avatar-inner {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px var(--gold-glow);
}

.ruler-avatar-frame {
  position: relative;
  margin-bottom: 0.65rem;
}

.ruler-avatar-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 2.5px;
  border: 2px solid var(--gold-antique);
  background: linear-gradient(135deg, #440c12, #180205);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 3;
  overflow: hidden;
  transition: var(--trans-smooth);
}

.ruler-portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Connecting Node Pin */
.timeline-node-pin {
  width: 7px;
  height: 7px;
  background: var(--gold-light);
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--gold-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  display: none;
}

/* Active Featured Ruler (Raja Sansar Chand) */
.ruler-card.active-featured .ruler-avatar-frame {
  margin-bottom: 0.85rem;
}

.ruler-card.active-featured .ruler-avatar-inner {
  width: 88px;
  height: 88px;
  border: 2px solid #ffd866;
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.7);
}

/* Dual Concentric Ornate Mandala Ring for Active State */
.mandala-outer-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px dashed var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
  animation: rotateClockwise 25s linear infinite;
  pointer-events: none;
}

.mandala-inner-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  opacity: 0.85;
  pointer-events: none;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ruler-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ruler-name {
  font-family: var(--font-royal);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-ivory);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.ruler-card.active-featured .ruler-name {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.88rem;
}

.ruler-years {
  font-family: var(--font-classical);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Full Timeline Button CTA */
.timeline-cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}

/* =========================================================
   4. LOWER SPLIT SECTION (POPULAR EVENTS + AI STORYTELLER)
   ========================================================= */
.heritage-split-section {
  padding: 1.2rem 1.5rem 1.4rem;
  background: linear-gradient(180deg, #180204 0%, #200408 50%, #150204 100%);
  border-bottom: 2px solid #360c12;
}

.split-inner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* Left Panel: Popular Events */
.popular-events-panel {
  display: flex;
  flex-direction: column;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.event-card {
  background: linear-gradient(180deg, #240508 0%, #180305 100%);
  border: 1px solid #4a181e;
  border-radius: 6px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--trans-smooth);
}

.event-card:hover {
  border-color: var(--gold-muted);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7), 0 0 10px rgba(212, 175, 55, 0.2);
  transform: translateY(-3px);
}

.event-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 84px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.event-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.event-card:hover .event-thumb {
  transform: scale(1.06);
}

.event-thumb-border {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 175, 55, 0.25);
  pointer-events: none;
}

.event-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.event-title {
  font-family: var(--font-royal);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.event-desc {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.btn-event-explore {
  align-self: center;
  width: 100%;
  padding: 0.32rem 0;
  border: 1px solid var(--gold-border-subtle);
  border-radius: 3px;
  font-family: var(--font-royal);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  background: rgba(45, 8, 12, 0.4);
  transition: var(--trans-smooth);
}

.btn-event-explore:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: rgba(70, 12, 18, 0.8);
  box-shadow: 0 0 8px var(--gold-glow-soft);
}

.events-footer-cta {
  display: flex;
  justify-content: center;
}

/* Right Panel: AI Storyteller */
.storyteller-panel {
  display: flex;
  flex-direction: column;
}

.storyteller-tagline {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-parchment);
  margin-top: -0.35rem;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.storyteller-darbar-stage {
  position: relative;
  flex: 1;
  min-height: 215px;
  border-radius: 8px;
  border: 1px solid #4a181e;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
}

.darbar-stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.72) contrast(1.1);
  transition: filter 0.5s ease;
}

.storyteller-darbar-stage:hover .darbar-stage-bg {
  filter: brightness(0.8) contrast(1.12);
}

.darbar-lighting-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(22, 3, 6, 0.88) 0%, 
    rgba(26, 4, 8, 0.7) 45%, 
    rgba(18, 2, 4, 0.4) 100%
  );
}

/* Floating Card inside Darbar */
.storyteller-floating-card {
  position: relative;
  z-index: 5;
  background: rgba(30, 4, 8, 0.88);
  border: 1.5px solid var(--gold-border);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.15);
  max-width: 410px;
}

.storyteller-inner-flex {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.storyteller-avatar-circle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
  background: #36080d;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Speech Dialogue Bubble */
.storyteller-speech-bubble {
  position: relative;
  background: linear-gradient(135deg, #2b060a 0%, #1b0205 100%);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}

/* Corner Ornaments */
.speech-decor-corner {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-primary);
}

.speech-decor-corner.tl { top: 2px; left: 2px; border-right: none; border-bottom: none; }
.speech-decor-corner.tr { top: 2px; right: 2px; border-left: none; border-bottom: none; }
.speech-decor-corner.bl { bottom: 2px; left: 2px; border-right: none; border-top: none; }
.speech-decor-corner.br { bottom: 2px; right: 2px; border-left: none; border-top: none; }

.story-greeting {
  font-family: var(--font-royal);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.15rem;
}

.story-prompt-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-parchment);
  line-height: 1.3;
}

/* Action Button */
.storyteller-action-row {
  display: flex;
  justify-content: center;
}

.btn-ask-story {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.52rem 1.2rem;
  border-radius: 24px;
  background: linear-gradient(180deg, #4d0c13 0%, #290408 100%);
  border: 1.5px solid var(--gold-border);
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: var(--trans-smooth);
}

.btn-ask-story:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateY(-2px);
  color: #ffffff;
}

.mic-icon {
  color: var(--gold-primary);
}

/* =========================================================
   5. BOTTOM QUICK HERITAGE BAR
   ========================================================= */
.heritage-bottom-bar {
  background: linear-gradient(180deg, #220407 0%, #150204 100%);
  border-top: 1px solid var(--gold-border-subtle);
  padding: 0.65rem 1.2rem;
}

.bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.bottom-action-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-parchment);
  font-family: var(--font-royal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.6rem;
  border-radius: 4px;
  transition: var(--trans-smooth);
}

.bottom-action-item:hover {
  color: var(--gold-light);
  background: rgba(74, 15, 22, 0.4);
  transform: translateY(-2px);
}

.bottom-action-item:hover .action-icon svg {
  stroke: var(--gold-light);
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.action-icon {
  display: flex;
  align-items: center;
}

.action-divider {
  width: 1px;
  height: 18px;
  background: #3e1217;
}

/* =========================================================
   6. INTERACTIVE ROYAL MODALS
   ========================================================= */
.royal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 1, 2, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.royal-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.royal-modal-box {
  position: relative;
  background: linear-gradient(145deg, #260509 0%, #160204 100%);
  border: 2px solid var(--gold-border);
  border-radius: 8px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.2);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.2rem 2rem 1.8rem;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.royal-modal-backdrop.active .royal-modal-box {
  transform: scale(1);
}

/* Ornate Corner Accents */
.modal-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold-primary);
  pointer-events: none;
}

.modal-corner.c-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.modal-corner.c-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.modal-corner.c-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.modal-corner.c-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* Modal Close Button — Prominent, Luxurious & Sticky */
.modal-close-btn {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 99999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #581018 0%, #200408 100%);
  border: 2px solid var(--gold-primary);
  color: #ffd700;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(212, 175, 55, 0.45);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  margin-top: -6px;
  margin-right: -6px;
  margin-bottom: -38px;
}

.modal-close-btn:hover {
  background: linear-gradient(135deg, #821523 0%, #3e070e 100%);
  color: #fff;
  transform: rotate(90deg) scale(1.12);
  border-color: #ffe066;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.85);
}

/* Modal Header Common */
.modal-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

.modal-crest-small {
  color: var(--gold-primary);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

/* Big Royal Coat of Arms in Timeline Modal */
.timeline-modal-crest-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.7));
  transition: transform 0.3s ease;
}

.timeline-modal-crest-wrap:hover {
  transform: scale(1.08);
}

.timeline-modal-crest-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-title {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.modal-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* AI Storyteller Modal Internal Layout */
.storyteller-chat-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.narration-audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(42, 6, 11, 0.6);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 6px;
  padding: 0.5rem 1rem;
}

.audio-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gold-light);
}

.audio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.audio-dot.speaking {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  animation: pulseSpeaking 1s infinite;
}

@keyframes pulseSpeaking {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.audio-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-audio-toggle, .btn-audio-stop {
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--gold-border);
  font-family: var(--font-royal);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-light);
  background: #36070d;
  transition: var(--trans-smooth);
}

.btn-audio-toggle:hover, .btn-audio-stop:hover {
  border-color: var(--gold-primary);
  background: #4a0c13;
}

.chat-messages {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.5rem;
  background: rgba(18, 2, 4, 0.6);
  border: 1px solid #3d0e14;
  border-radius: 6px;
}

.msg {
  display: flex;
  gap: 0.8rem;
  line-height: 1.45;
}

.msg-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
}

.msg-content {
  background: rgba(45, 7, 12, 0.75);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 6px;
  padding: 0.65rem 0.95rem;
  font-size: 0.92rem;
  color: var(--text-parchment);
}

.user-msg {
  justify-content: flex-end;
}

.user-msg .msg-content {
  background: rgba(75, 16, 24, 0.85);
  border-color: var(--gold-border);
  color: var(--text-ivory);
}

.suggested-story-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.chip-label {
  font-size: 0.78rem;
  font-family: var(--font-royal);
  color: var(--gold-muted);
}

.story-chip {
  background: rgba(50, 8, 14, 0.6);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 14px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-parchment);
  transition: var(--trans-smooth);
}

.story-chip:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: rgba(75, 12, 20, 0.8);
  transform: translateY(-1px);
}

.story-input-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.story-input-form input {
  flex: 1;
  background: #180204;
  border: 1.5px solid var(--gold-border-subtle);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: var(--text-ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.story-input-form input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.btn-royal-send {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: linear-gradient(180deg, #530d15 0%, #2f070c 100%);
  border: 1.5px solid var(--gold-border);
  border-radius: 4px;
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: var(--trans-smooth);
}

.btn-royal-send:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
  color: #fff;
}

/* Ruler Detail Modal Layout */
.ruler-modal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: center;
}

.ruler-modal-portrait-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-portrait-frame {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 4px;
  border: 3px solid var(--gold-primary);
  background: linear-gradient(135deg, #440c12, #180205);
  box-shadow: 0 0 25px var(--gold-glow);
  margin-bottom: 1rem;
}

.modal-portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.modal-ruler-name {
  font-family: var(--font-royal);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
}

.modal-ruler-reign {
  font-family: var(--font-classical);
  font-size: 0.95rem;
  color: var(--gold-muted);
  margin: 0.2rem 0 0.4rem;
}

.ruler-dynasty-tag {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
}

.details-section-heading {
  font-family: var(--font-royal);
  font-size: 0.95rem;
  color: var(--gold-primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.ruler-biography {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-parchment);
  margin-bottom: 1.2rem;
}

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

.stat-card {
  background: rgba(36, 6, 10, 0.7);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 4px;
  padding: 0.6rem;
  text-align: center;
}

.stat-title {
  display: block;
  font-size: 0.68rem;
  font-family: var(--font-royal);
  color: var(--gold-muted);
  text-transform: uppercase;
}

.stat-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
}

/* Event Detail Modal */
.event-modal-banner {
  position: relative;
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  border: 1.5px solid var(--gold-border);
}

.event-modal-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 2, 4, 0.92) 100%);
}

.event-modal-title {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  font-family: var(--font-royal);
  font-size: 1.5rem;
  color: var(--gold-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.event-modal-badge {
  display: inline-block;
  background: rgba(75, 16, 24, 0.85);
  border: 1px solid var(--gold-border);
  border-radius: 3px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-royal);
  font-size: 0.72rem;
  color: var(--gold-light);
  margin-bottom: 0.85rem;
}

.event-modal-text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-parchment);
  margin-bottom: 1rem;
}

/* Full Alternating Center-Spine Timeline */
.timeline-large-box {
  max-width: 860px;
}

.full-timeline-scroll {
  position: relative;
  padding: 1.5rem 0.5rem 2rem;
  max-width: 780px;
  margin: 0 auto;
}

/* Bich me ek line (Center spine) */
.timeline-center-spine {
  position: absolute;
  top: 15px;
  bottom: 25px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1) 0%, #d4af37 10%, #d4af37 90%, rgba(212, 175, 55, 0.1) 100%);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  border-radius: 3px;
}

/* Alternating Row (Left & Right) */
.timeline-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.timeline-row.item-left {
  justify-content: flex-start;
  padding-right: calc(50% + 28px);
}

.timeline-row.item-right {
  justify-content: flex-end;
  padding-left: calc(50% + 28px);
}

/* Center Node on the line */
.timeline-center-node {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e0307;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  z-index: 2;
  transition: transform 0.25s ease, background 0.25s ease;
}

.timeline-center-node .node-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-glow);
  transition: background 0.25s ease;
}

/* Timeline Card */
.timeline-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(48, 8, 15, 0.95), rgba(22, 3, 7, 0.98));
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 1rem 1.35rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 215, 0, 0.12);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* Left item pointer / arrow toward center */
.timeline-row.item-left .timeline-card {
  text-align: right;
  flex-direction: row-reverse;
}

.timeline-row.item-left .timeline-card::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #2a070c;
  border-top: 1.5px solid var(--gold-primary);
  border-right: 1.5px solid var(--gold-primary);
}

/* Right item pointer / arrow toward center */
.timeline-row.item-right .timeline-card {
  text-align: left;
}

.timeline-row.item-right .timeline-card::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(-135deg);
  width: 14px;
  height: 14px;
  background: #2a070c;
  border-top: 1.5px solid var(--gold-primary);
  border-right: 1.5px solid var(--gold-primary);
}

.timeline-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #ffd700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 22px rgba(212, 175, 55, 0.45);
  background: linear-gradient(145deg, rgba(72, 12, 22, 0.98), rgba(36, 5, 12, 0.99));
}

.timeline-row:hover .timeline-center-node {
  transform: translate(-50%, -50%) scale(1.35);
  background: #ffd700;
  box-shadow: 0 0 16px #ffd700;
}

.timeline-row:hover .timeline-center-node .node-dot {
  background: #1e0307;
}

/* King Circular Portrait Thumbnail in Timeline Card */
.timeline-card-portrait {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-primary);
  background: linear-gradient(135deg, #440c12, #180205);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.timeline-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}

.timeline-card:hover .timeline-card-portrait img {
  transform: scale(1.14);
}

.timeline-king-content {
  flex: 1;
}

.timeline-ruler-tag {
  display: inline-block;
  font-family: var(--font-royal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.timeline-king-title {
  font-family: var(--font-royal);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff4dc;
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
  line-height: 1.25;
  transition: color 0.2s;
}

.timeline-card:hover .timeline-king-title {
  color: #ffd700;
}

.timeline-reign-badge {
  display: inline-block;
  font-family: var(--font-royal);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-metallic);
  background: rgba(14, 2, 4, 0.7);
  border: 1px solid rgba(139, 104, 46, 0.45);
  border-radius: 12px;
  padding: 0.15rem 0.6rem;
  letter-spacing: 0.05em;
}

/* Responsive for smaller screens */
@media (max-width: 680px) {
  .timeline-center-spine {
    left: 20px;
    transform: none;
  }
  .timeline-row.item-left,
  .timeline-row.item-right {
    padding-left: 45px;
    padding-right: 0;
    justify-content: flex-start;
  }
  .timeline-row.item-left .timeline-card {
    text-align: left;
    flex-direction: row;
  }
  .timeline-row.item-left .timeline-card::after {
    left: -7px;
    right: auto;
    transform: translateY(-50%) rotate(-135deg);
  }
  .timeline-center-node {
    left: 20px;
  }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  height: 180px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--gold-border-subtle);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(16, 2, 4, 0.95));
  font-family: var(--font-royal);
  font-size: 0.75rem;
  color: var(--gold-light);
}

/* Resources Grid & Docs List */
.resources-grid, .docs-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.resource-card, .doc-card {
  background: rgba(38, 6, 11, 0.75);
  border: 1px solid var(--gold-border-subtle);
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
}

.resource-type, .doc-badge {
  font-family: var(--font-royal);
  font-size: 0.72rem;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.resource-card h4, .doc-card h4 {
  font-family: var(--font-royal);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.resource-card p, .doc-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.btn-royal-download {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: linear-gradient(180deg, #4f0c13, #2a0508);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  font-family: var(--font-royal);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold-light);
  transition: var(--trans-smooth);
}

.btn-royal-download:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
  color: #fff;
}

/* 360 Tour Viewer */
.tour-viewer-frame {
  position: relative;
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid var(--gold-border);
}

.tour-pano-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.tour-controls-hud {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  background: rgba(20, 3, 5, 0.85);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--gold-border);
}

.tour-hud-btn {
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  transition: var(--trans-smooth);
}

.tour-hud-btn:hover {
  color: #fff;
  text-shadow: 0 0 6px var(--gold-primary);
}

.tour-caption-overlay {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-parchment);
}

/* =========================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 1200px) {
  .split-inner-grid {
    grid-template-columns: 1fr;
  }
  .events-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .storyteller-darbar-stage {
    min-height: 280px;
  }
}

@media (max-width: 992px) {
  .hero-curtain {
    width: 90px;
  }
  .hero-content {
    padding-left: 5rem;
  }
  .hero-heading {
    font-size: 2.5rem;
  }
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bottom-bar-inner {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .action-divider {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }
  .royal-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #1c0306;
    border-bottom: 2px solid var(--gold-border);
    padding: 1.5rem;
  }
  .royal-nav.open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .mobile-toggle {
    display: flex;
  }
  .hero-curtain {
    display: none;
  }
  .hero-content {
    padding: 2.5rem 1.5rem;
  }
  .hero-heading {
    font-size: 2.2rem;
  }
  .ruler-modal-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* =========================================================
   UNIVERSAL ROYAL SCROLLBAR (Eliminates ugly browser scrollbar)
   ========================================================= */
* {
  scrollbar-width: thin;
  scrollbar-color: #8b682e #150205;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #140205;
  border-left: 1px solid rgba(139, 104, 46, 0.25);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b682e 0%, #4d3312 100%);
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4af37 0%, #8b682e 100%);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* =========================================================
   RULER FULLSCREEN MODAL — IMMERSIVE CHRONICLE VIEW
   ========================================================= */

.ruler-fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: radial-gradient(circle at 20% 30%, #200408 0%, #120204 60%, #080102 100%);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.ruler-fullscreen-modal.active {
  display: flex;
  animation: rfmFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rfmFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to   { opacity: 1; transform: scale(1); }
}

/* Top Strip */
.rfm-top-strip {
  flex-shrink: 0;
  height: 32px;
  background: linear-gradient(90deg, transparent, #3a080e 20%, #581018 50%, #3a080e 80%, transparent);
  border-bottom: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rfm-strip-ornament {
  font-family: var(--font-royal);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* Top Action Bar (Navbar) */
.rfm-top-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 2.2rem;
  border-bottom: 1.5px solid rgba(139, 104, 46, 0.3);
  background: rgba(18, 2, 4, 0.85);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 20;
}

/* Center controls inside navbar */
.rfm-navbar-center-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.rfm-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  border: 1.5px solid var(--gold-border);
  border-radius: 20px;
  background: linear-gradient(135deg, #440a10, #220408);
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.rfm-back-btn:hover {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, #621019, #35060d);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateX(-3px);
}

.rfm-king-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(40, 6, 10, 0.8);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
}

.rfm-badge-label {
  font-family: var(--font-royal);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--gold-muted);
}

.rfm-badge-num {
  font-family: var(--font-royal);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-primary);
}

/* Bottom Strip */
.rfm-bottom-strip {
  flex-shrink: 0;
  height: 28px;
  background: linear-gradient(90deg, transparent, #240508 30%, #3a080e 50%, #240508 70%, transparent);
  border-top: 1px solid rgba(139, 104, 46, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Split Grid */
.rfm-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 0;
  overflow: hidden;
}

/* ═══ LEFT PANEL: Large Majestic King Portrait ═══ */
.rfm-left-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  border-right: 1.5px solid rgba(139, 104, 46, 0.3);
  background: linear-gradient(180deg, rgba(32, 5, 9, 0.7) 0%, rgba(14, 2, 4, 0.95) 100%);
  position: relative;
  overflow-y: auto;
}

/* Big Portrait Frame */
.rfm-portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.2rem;
}

.rfm-portrait-frame-outer {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--gold-primary);
  background: #180205;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.95),
    0 0 35px rgba(212, 175, 55, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.rfm-portrait-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--gold-primary) 30%,
    transparent 60%,
    var(--gold-light) 85%,
    transparent 100%
  );
  opacity: 0.3;
  animation: rfmGlowSpin 8s linear infinite;
  z-index: -1;
}

@keyframes rfmGlowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.rfm-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.rfm-portrait-img:hover {
  transform: scale(1.05);
}

/* Decorative Gold Corner Accents */
.rfm-frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid var(--gold-primary);
  z-index: 5;
  pointer-events: none;
}

.rfm-fc-tl { top: -4px; left: -4px; border-right: none; border-bottom: none; border-radius: 3px 0 0 0; }
.rfm-fc-tr { top: -4px; right: -4px; border-left: none; border-bottom: none; border-radius: 0 3px 0 0; }
.rfm-fc-bl { bottom: -4px; left: -4px; border-right: none; border-top: none; border-radius: 0 0 0 3px; }
.rfm-fc-br { bottom: -4px; right: -4px; border-left: none; border-top: none; border-radius: 0 0 3px 0; }

/* King Information Block */
.rfm-king-info {
  text-align: center;
  width: 100%;
}

.rfm-king-crest {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 0 10px var(--gold-primary));
  animation: rfmCrownFloat 3.5s ease-in-out infinite;
}

@keyframes rfmCrownFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.rfm-king-name {
  font-family: var(--font-royal);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  text-shadow: 0 0 25px var(--gold-glow);
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.rfm-king-timeline {
  font-family: var(--font-classical);
  font-size: 1.08rem;
  color: var(--gold-primary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.rfm-dynasty-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.2rem;
}

/* King Navigation (Prev / Next Buttons) */
.rfm-king-nav {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.rfm-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--gold-border);
  background: rgba(45, 8, 12, 0.75);
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.rfm-nav-btn:hover {
  border-color: var(--gold-primary);
  background: rgba(75, 14, 20, 0.95);
  box-shadow: 0 0 14px var(--gold-glow);
  transform: translateY(-1px);
}

/* ═══ RIGHT PANEL: Full Reading Chronicle ═══ */
.rfm-right-panel {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 2.8rem 1rem 3rem;
  overflow: hidden;
  background: rgba(14, 2, 4, 0.4);
}

/* Language Toggle */
.rfm-lang-toggle {
  display: inline-flex;
  gap: 0.35rem;
  background: rgba(22, 3, 7, 0.85);
  padding: 4px;
  border-radius: 22px;
  border: 1.5px solid var(--gold-border);
}

.rfm-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1.2rem;
  border-radius: 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-royal);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.rfm-lang-btn:hover {
  color: var(--gold-light);
}

.rfm-lang-btn.rfm-lang-active {
  background: linear-gradient(135deg, #66141e, #3a080f);
  color: #fff;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
  border: 1px solid var(--gold-primary);
}

.rfm-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.4rem;
  border-radius: 22px;
  border: 1.5px solid var(--gold-primary);
  background: linear-gradient(135deg, #66141e, #3a080f);
  color: var(--gold-light);
  font-family: var(--font-royal);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.rfm-play-btn:hover {
  background: linear-gradient(135deg, #881a27, #4e0c15);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateY(-1px);
}

.rfm-play-btn.playing {
  background: linear-gradient(135deg, #881a27, #4e0c15);
  border-color: #22ee88;
  color: #fff;
  box-shadow: 0 0 14px rgba(34, 238, 136, 0.4);
}

.rfm-audio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-border);
  flex-shrink: 0;
}

.rfm-audio-dot.speaking {
  background: #22ee88;
  box-shadow: 0 0 10px #22ee88;
  animation: pulseSpeaking 0.9s infinite;
}

.rfm-audio-label {
  font-family: var(--font-royal);
  font-size: 0.78rem;
  color: var(--gold-muted);
  letter-spacing: 0.04em;
}

/* Chronicle Header */
.rfm-chronicle-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
  flex-shrink: 0;
}

.rfm-chron-ornament {
  color: var(--gold-primary);
  font-size: 1rem;
}

.rfm-chron-title {
  font-family: var(--font-royal);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Scrollable Chronicle Area (Single sleek scrollbar) */
.rfm-doc-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 1.2rem;
  scroll-behavior: smooth;
}

/* Even, Clear, Readable Typography for both Hindi and English */
.rfm-doc-content {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
  font-size: 1.12rem;
  line-height: 1.85;
  color: #f2e4d4;
  letter-spacing: 0.015em;
}

/* Interactive Paragraph Cards */
.rfm-para {
  font-family: inherit;
  font-size: 1.12rem;
  line-height: 1.85;
  margin-bottom: 1.3rem;
  padding: 0.85rem 1.15rem;
  border-left: 3.5px solid transparent;
  border-radius: 0 8px 8px 0;
  background: rgba(28, 4, 8, 0.45);
  color: #f4e8db;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  position: relative;
}

.rfm-para:hover {
  border-left-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.05);
  transform: translateX(4px);
}

/* Active Highlighted Paragraph (Synced with audio) */
.rfm-para.para-active {
  border-left-color: var(--gold-primary);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16) 0%, rgba(65, 12, 18, 0.4) 100%);
  color: #fff9ee;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), -3px 0 16px rgba(212, 175, 55, 0.25);
  font-weight: 500;
  transform: translateX(6px);
}

.rfm-para.para-done {
  border-left-color: rgba(139, 104, 46, 0.3);
  color: rgba(226, 210, 191, 0.7);
}

/* Bottom Reading Progress Bar */
.rfm-progress-bar-wrap {
  flex-shrink: 0;
  height: 3px;
  background: rgba(139, 104, 46, 0.2);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.rfm-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-border), var(--gold-primary));
  transition: width 0.15s ease;
}

.rfm-scroll-hint {
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-royal);
  font-size: 0.68rem;
  color: var(--gold-muted);
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
  transition: opacity 0.3s;
}

/* ═══ RESPONSIVE BREAKPOINT ═══ */
@media (max-width: 960px) {
  .rfm-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .rfm-left-panel {
    flex-direction: row;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-right: none;
    border-bottom: 1.5px solid rgba(139, 104, 46, 0.3);
  }

  .rfm-portrait-wrap {
    max-width: 130px;
    margin-bottom: 0;
  }

  .rfm-king-info {
    text-align: left;
  }

  .rfm-king-crest { display: none; }
  .rfm-king-name  { font-size: 1.3rem; }

  .rfm-right-panel {
    padding: 1.2rem 1.5rem;
  }

  .rfm-king-nav {
    justify-content: flex-start;
  }
}

