/* ============================================================
   BADUNG NUSANTARA DIGITAL CITY — UNIFIED STYLESHEET
   Merged: index.html inline styles + existing style.css
   ============================================================ */

/* ============================================================
   PART 1: INDEX.HTML ORIGINAL STYLES (Moved from inline <style>)
   ============================================================ */

/* ============================================================
       DESIGN TOKENS
    ============================================================ */
:root {
  --terracotta: #C4693A;
  --terracotta-light: #D97B4A;
  --terracotta-dim: rgba(196, 105, 58, 0.10);
  --ocean: #1A3A5C;
  --ocean-light: #2A5480;
  --ocean-dim: rgba(26, 58, 92, 0.08);
  --gold: #D4AF37;
  --gold-dim: rgba(212, 175, 55, 0.12);
  --green: #2D5A27;
  --green-light: #3D7835;
  --cream: #F5EFE6;
  --cream-dark: #EDE4D4;
  --cream-darker: #E4D8C4;
  --charcoal: #1C1C1C;
  --charcoal-2: #242424;
  --charcoal-3: #2E2E2E;
  --white: #FFFFFF;
  --text-muted: rgba(28, 28, 28, 0.50);
  --text-soft: rgba(28, 28, 28, 0.72);
  --border: rgba(28, 28, 28, 0.07);
  --border-med: rgba(28, 28, 28, 0.12);
  --white-border: rgba(255, 255, 255, 0.10);

  /* Shadows - soft & layered */
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 36px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 64px rgba(0, 0, 0, 0.11), 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 28px 72px rgba(0, 0, 0, 0.14), 0 6px 20px rgba(0, 0, 0, 0.06);

  --radius-sm: 18px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;

  --transition-fast: all 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition: all 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: all 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* ── Aliases used across sejarah.html & budaya.html ── */
  /* These were referenced but never declared — causing broken colors, radii, shadows */
  --ocean-blue: #1A3A5C;
  /* = --ocean */
  --lush-green: #2D6A4F;
  /* deep tropical green, used in budaya gradients & accents */
  --border-radius: 16px;
  /* mid-range radius for cards & blocks */
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================================
       NAVBAR — Glassmorphism + Mega Menu
    ============================================================ */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5%, 4rem);
  height: 68px;
  background: rgba(28, 28, 28, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

#main-nav.scrolled .nav-topbar {
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.28);
  height: 58px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#langToggle {
  background: transparent;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  padding: 0.34rem 0.88rem;
  border-radius: 25px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

#langToggle:hover {
  background: var(--terracotta);
  color: var(--white);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-mobile-panel {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(18, 18, 18, 0.97);
  backdrop-filter: blur(28px);
  padding: 1.5rem clamp(1.5rem, 5%, 4rem);
  flex-direction: column;
  gap: 0.1rem;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-mobile-panel.open {
  display: flex;
}

.nav-mobile-link {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.88rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
}

/* ============================================================
       HERO — Cinematic / Immersive
    ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(5rem, 10vh, 9rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 28, 28, 0.90) 0%, rgba(28, 28, 28, 0.28) 52%, rgba(28, 28, 28, 0.05) 100%),
    linear-gradient(135deg, rgba(196, 105, 58, 0.35) 0%, rgba(26, 58, 92, 0.45) 100%),
    url('img/lempuyang.avif') center/cover no-repeat;
  transform: scale(1.06);
  animation: heroZoom 16s ease-out forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.06);
  }

  to {
    transform: scale(1.0);
  }
}

/* Subtle noise grain overlay */
.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5%, 4rem);
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.30);
  color: var(--gold);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.38rem 1.1rem;
  border-radius: 25px;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeUp 0.9s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-desc {
  font-size: clamp(0.92rem, 1.7vw, 1.05rem);
  color: rgba(255, 255, 255, 0.70);
  max-width: 500px;
  line-height: 1.70;
  margin-bottom: 2.2rem;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.9s 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Floating stats pills in hero */
.hero-pills {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  right: clamp(1.5rem, 5%, 4rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 3;
  opacity: 0;
  animation: fadeLeft 0.9s 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  color: var(--white);
}

.hero-pill-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}

.hero-pill-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.7;
  text-transform: uppercase;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1.5rem, 5%, 4rem);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.9s 1.3s forwards;
  z-index: 2;
}

.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.4);
  }
}

/* ============================================================
       BUTTONS
    ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.88rem 2.1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  transition: var(--transition);
  box-shadow: 0 8px 28px rgba(196, 105, 58, 0.38);
  font-family: var(--font-body);
}

.btn-primary:hover {
  background: var(--terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(196, 105, 58, 0.48);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  padding: 0.85rem 1.9rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.86rem;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--charcoal);
  padding: 0.92rem 2.3rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

.btn-gold:hover {
  background: #e3c03e;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(212, 175, 55, 0.45);
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.75);
  padding: 0.85rem 2.1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.86rem;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

/* ============================================================
       LAYOUT
    ============================================================ */
.wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}

section {
  padding: clamp(4.5rem, 9vh, 8rem) 0;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.8rem;
}

.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--terracotta);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.section-title em {
  font-style: italic;
  color: var(--terracotta);
}

.section-title-light {
  color: var(--white);
}

.section-sub {
  font-size: 0.90rem;
  color: var(--text-muted);
  margin-top: 0.7rem;
  max-width: 460px;
  line-height: 1.6;
  font-weight: 400;
}

.section-sub-light {
  color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
       BENTO GRID — ABOUT + STATS
    ============================================================ */
.about-bento {
  display: grid;
  grid-template-columns: 7fr 5fr;
  grid-template-rows: auto auto;
  gap: 1.1rem;
}

/* Main text card */
.about-main-card {
  background: var(--ocean);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-main-card::before {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.10) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.about-main-card::after {
  content: '';
  position: absolute;
  left: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(196, 105, 58, 0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about-tags {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  position: relative;
  z-index: 1;
}

.about-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.88rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.about-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.about-main-title em {
  color: var(--gold);
  font-style: italic;
}

.about-main-body {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.8rem;
  position: relative;
  z-index: 1;
}

.about-links {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.about-link-pill {
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0.32rem 1rem;
  border-radius: 50px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.22);
  transition: var(--transition-fast);
  cursor: pointer;
}

.about-link-pill:hover {
  background: rgba(212, 175, 55, 0.22);
  color: var(--white);
}

/* Image card */
.about-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 360px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.about-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.7s ease;
}

.about-img-card:hover img {
  transform: scale(1.05);
}

.about-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(28, 28, 28, 0.78), transparent);
  padding: 1.8rem;
  color: var(--white);
}

.about-img-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.35rem;
}

.about-img-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}

/* ── Stat row ── */
.stats-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.stat-card {
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 175px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s ease;
  overflow: hidden;
  position: relative;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-card-terra {
  background: var(--terracotta);
  color: var(--white);
  border-color: transparent;
}

.stat-card-ocean {
  background: var(--ocean);
  color: var(--white);
  border-color: transparent;
}

.stat-card-gold {
  background: var(--gold);
  color: var(--charcoal);
  border-color: transparent;
}

.stat-card-green {
  background: var(--green);
  color: var(--white);
  border-color: transparent;
}

.stat-icon-bg {
  position: absolute;
  right: -14px;
  bottom: -14px;
  font-size: 5rem;
  opacity: 0.07;
  line-height: 1;
  pointer-events: none;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.stat-num sup {
  font-size: 0.42em;
  font-family: var(--font-body);
  font-weight: 800;
  vertical-align: super;
  letter-spacing: 0;
}

.stat-label {
  font-size: 0.80rem;
  font-weight: 600;
  opacity: 0.72;
  line-height: 1.3;
  margin-top: 0.4rem;
}

/* ============================================================
       VIDEO TRILOGY — Youth Spotlight
    ============================================================ */
.spotlight-section {
  background: var(--cream-dark);
}

.video-trilogy {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.1rem;
}

.video-side-col {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.vid-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s ease;
  background: var(--charcoal);
}

.vid-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.vid-main-card {
  min-height: 420px;
}

.vid-side-card {
  flex: 1;
  min-height: 195px;
}

.vid-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.55s ease;
}

.vid-card:hover .vid-thumb {
  transform: scale(1.05);
}

.vid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.12) 58%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.vid-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.28rem 0.8rem;
  border-radius: 50px;
  align-self: flex-start;
}

.vid-badge-alt {
  background: var(--green);
}

.vid-badge-dest {
  background: var(--ocean);
}

.vid-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition-fast);
}

.vid-play-btn i {
  color: var(--white);
  font-size: 1.2rem;
  margin-left: 3px;
}

.vid-card:hover .vid-play-btn {
  background: rgba(196, 105, 58, 0.80);
  border-color: var(--terracotta);
  transform: translate(-50%, -50%) scale(1.1);
}

.vid-play-sm {
  width: 46px;
  height: 46px;
}

.vid-play-sm i {
  font-size: 0.95rem;
}

.vid-info {
  color: var(--white);
}

.vid-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.vid-title-sm {
  font-size: 1rem;
}

.vid-meta {
  font-size: 0.72rem;
  opacity: 0.58;
  font-weight: 500;
}

/* Video embed container */
.vid-embed {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
}

.vid-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.vid-embed.active {
  display: block;
}

/* ============================================================
       DESTINATION GRID
    ============================================================ */
.dest-section {
  background: linear-gradient(160deg, var(--ocean) 0%, #0c1e30 100%);
}

.dest-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.dest-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s ease;
  aspect-ratio: 3/4;
}

.dest-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
}

.dest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.dest-card:hover img {
  transform: scale(1.06);
}

.dest-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 28, 28, 0.82) 0%, rgba(28, 28, 28, 0.08) 55%, transparent 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
}

.dest-cat {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.4rem;
}

.dest-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.dest-desc {
  font-size: 0.78rem;
  opacity: 0.68;
  line-height: 1.5;
}

.dest-arrow {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(5px);
  transition: var(--transition-fast);
}

.dest-card:hover .dest-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
       NEWS BENTO
    ============================================================ */
.news-bento {
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  gap: 1.1rem;
}

.news-featured {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 430px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.news-featured:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.news-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease;
}

.news-featured:hover img {
  transform: scale(1.04);
}

.news-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 58, 92, 0.95) 0%, rgba(26, 58, 92, 0.18) 65%, transparent 100%);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
}

.news-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.news-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  flex: 1;
}

.news-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.news-item-img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-item-body {
  flex: 1;
  min-width: 0;
}

.news-item-cat {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.3rem;
}

.news-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--charcoal);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.news-item-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.news-promo {
  background: var(--terracotta);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.news-promo::before {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.news-promo::after {
  content: '';
  position: absolute;
  left: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.news-promo-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 300;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.news-promo-sub {
  font-size: 0.82rem;
  opacity: 0.78;
  line-height: 1.55;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.btn-promo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  color: var(--terracotta);
  padding: 0.72rem 1.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.80rem;
  transition: var(--transition-fast);
  align-self: flex-start;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.01em;
}

.btn-promo:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

/* ============================================================
       CULINARY GRID
    ============================================================ */
.culinary-section {
  background: var(--cream-dark);
}

.culinary-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.food-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s ease;
}

.food-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.food-img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
}

.food-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.food-card:hover .food-img-wrap img {
  transform: scale(1.07);
}

.food-body {
  padding: 1.2rem 1.4rem 1.5rem;
}

.food-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
}

.food-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  color: var(--charcoal);
}

.food-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================================
       HISTORY BENTO
    ============================================================ */
.history-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.history-hero-card {
  grid-column: span 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 330px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.history-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease;
}

.history-hero-card:hover img {
  transform: scale(1.04);
}

.history-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26, 58, 92, 0.92) 0%, rgba(26, 58, 92, 0.28) 65%, transparent 100%);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  max-width: 580px;
}

.history-small-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  min-height: 220px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.history-small-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.history-small-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease;
}

.history-small-card:hover img {
  transform: scale(1.06);
}

.history-small-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 28, 28, 0.82) 0%, transparent 60%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
}

/* ============================================================
       DIGITAL METRICS
    ============================================================ */
.metrics-section {
  background: var(--charcoal);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: transform 0.28s ease, background 0.28s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
}

.metric-card:nth-child(1) {
  border-top: 2.5px solid var(--terracotta);
}

.metric-card:nth-child(2) {
  border-top: 2.5px solid var(--gold);
}

.metric-card:nth-child(3) {
  border-top: 2.5px solid var(--green-light);
}

.metric-card:nth-child(4) {
  border-top: 2.5px solid var(--ocean-light);
}

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.metric-num .sfx {
  font-size: 0.42em;
  font-family: var(--font-body);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.6rem;
  letter-spacing: -0.01em;
}

.metric-sub {
  font-size: 0.70rem;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 0.3rem;
}

.metrics-cta {
  grid-column: span 4;
  text-align: center;
  padding-top: 0.5rem;
}

/* ============================================================
       MAP CTA
    ============================================================ */
.map-cta {
  background: var(--ocean);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map-cta::before {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.map-cta::after {
  content: '🗺️';
  position: absolute;
  right: 3rem;
  bottom: -1rem;
  font-size: 8rem;
  opacity: 0.06;
  pointer-events: none;
  line-height: 1;
}

.map-cta-content {
  position: relative;
  z-index: 1;
}

.map-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white);
  font-weight: 300;
  line-height: 1.1;
}

.map-cta-title em {
  color: var(--gold);
  font-style: italic;
}

.map-cta-sub {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.58);
  margin-top: 0.6rem;
  max-width: 420px;
  line-height: 1.6;
}

.map-cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ============================================================
       FOOTER
    ============================================================ */
footer {
  background: var(--charcoal-2);
  color: rgba(255, 255, 255, 0.58);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
}

.footer-brand-desc {
  font-size: 0.84rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.42);
}

.footer-social {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.50);
  font-size: 0.85rem;
  transition: var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-social a:hover {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.footer-col-title {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.84rem;
  transition: color 0.2s;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer-bottom-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.70rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
       BACK TO TOP
    ============================================================ */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--terracotta);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(196, 105, 58, 0.45);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: all;
}

#backToTop:hover {
  background: var(--terracotta-light);
  transform: translateY(-3px);
}

/* ============================================================
       REVEAL ANIMATIONS
    ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-1 {
  transition-delay: 0.08s;
}

.stagger-2 {
  transition-delay: 0.16s;
}

.stagger-3 {
  transition-delay: 0.24s;
}

.stagger-4 {
  transition-delay: 0.32s;
}

/* News badge helper */
.news-cat-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.26rem 0.82rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.history-event-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.26rem 0.82rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
       RESPONSIVE
    ============================================================ */
@media (max-width: 1100px) {
  .about-bento {
    grid-template-columns: 1fr;
  }

  .about-img-card {
    min-height: 280px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-bento {
    grid-template-columns: 1fr;
  }

  .news-featured {
    min-height: 300px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-cta {
    grid-column: span 2;
  }

  .food-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 820px) {
  .nav-center {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .video-trilogy {
    grid-template-columns: 1fr;
  }

  .vid-main-card {
    min-height: 340px;
  }

  .vid-side-card {
    min-height: 170px;
  }

  .video-side-col {
    flex-direction: row;
  }

  .dest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-bento {
    grid-template-columns: 1fr;
  }

  .history-hero-card {
    grid-column: span 1;
  }

  .map-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dest-grid {
    grid-template-columns: 1fr;
  }

  .food-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metrics-cta {
    grid-column: span 1;
  }

  .video-side-col {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-pills {
    display: none;
  }
}


/* ============================================================
   PART 2: EXISTING STYLE.CSS (Page-specific & component styles)
   ============================================================ */
/* ============================================================
   STYLE.CSS — Badung Digital City | Unified Stylesheet
   Merged: Global styles + Sejarah page-specific styles
   ============================================================ */

/* style.css - Badung Digital City Optimized | Lighthouse 100 */
h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.2;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
/* =============================================
   EDITORIAL NAVBAR — Badung Digital City
   ============================================= */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}

/* ── Slim topbar ─────────────────────────────── */
.nav-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 64px;
  background: rgba(28, 28, 28, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10004;
  flex-shrink: 0;
}

/* ── Waveform decoration ─────────────────────── */
/* ── MENU / CLOSE button ─────────────────────── */
.nav-close-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.25s;
  padding: 0;
}

.nav-close-btn:hover {
  opacity: 0.55;
}

/* 2-line hamburger icon */
.nav-close-icon {
  width: 24px;
  height: 14px;
  position: relative;
  flex-shrink: 0;
}

.nav-close-icon::before,
.nav-close-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

/* Default: 2 garis datar */
.nav-close-icon::before {
  top: 2px;
}

.nav-close-icon::after {
  top: 10px;
}

/* Open state: jadi X */
.nav-panel.open~.nav-topbar .nav-close-icon::before,
.nav-close-btn.is-open .nav-close-icon::before {
  top: 6px;
  transform: rotate(45deg);
}

.nav-panel.open~.nav-topbar .nav-close-icon::after,
.nav-close-btn.is-open .nav-close-icon::after {
  top: 6px;
  transform: rotate(-45deg);
}

/* ── Lang toggle ─────────────────────────────── */
.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  padding: 0.38rem 0.85rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 1001;
}

.lang-toggle:hover {
  background: var(--terracotta);
  color: var(--white);
  transform: scale(1.05);
}

/* ── Fullscreen menu panel ───────────────────── */
.nav-panel {
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background: rgba(22, 22, 22, 0.98);
  backdrop-filter: blur(24px);
  z-index: 999;
  padding: 2.5rem 8%;
  display: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nav-panel.open {
  display: block;
}

/* ── Nav menu grid 3×2 ───────────────────────── */
.nav-menu {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 3rem;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  padding-bottom: 0.8rem;
}

.nav-menu li::before {
  content: attr(data-num);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 0.4rem;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold);
  /* letter-spacing dihapus — ini penyebab kejang saat hover */
}

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  .nav-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.5rem;
  }

  .nav-menu a {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }

  .nav-panel {
    padding: 2rem 6%;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    grid-template-columns: 1fr;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(196, 105, 58, 0.7), rgba(26, 58, 92, 0.8)), url('img/lempuyang.avif') center/cover no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  padding-top: 80px;
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 400;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terracotta);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  min-height: 56px;
  cursor: pointer;
  border: none;
}

.cta-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: #a94f2e;
}

.cta-btn:active {
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: clamp(60px, 10vw, 120px) 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  position: relative;
  font-weight: 400;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--terracotta);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 500;
}

/* Cards */
.preview-grid,
.stats-grid,
.features-grid,
.landmark-grid,
.howto-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 3rem;
}

@media (max-width: 480px) {

  .preview-grid,
  .stats-grid,
  .landmark-grid,
  .howto-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-img {
  width: 100%;
  height: clamp(200px, 30vw, 250px);
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-img {
  transform: scale(1.1);
}

.card-content {
  padding: clamp(1.5rem, 4vw, 2rem);
}

.card h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.8rem;
  color: var(--charcoal);
  font-weight: 500;
}

.card p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Buttons */
.maps-btn,
.learn-more-btn,
.directions-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  min-height: 44px;
}

.maps-btn {
  background: linear-gradient(135deg, #4285f4 0%, #1A73E8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.maps-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.learn-more-btn {
  background: var(--ocean-blue);
  color: white;
}

.learn-more-btn:hover {
  background: #0f2a45;
  transform: translateY(-2px);
}

.directions-btn {
  background: linear-gradient(135deg, #4285f4 0%, #1A73E8 100%);
  color: white;
}

.directions-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 480px) {

  .maps-btn,
  .learn-more-btn,
  .directions-btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.9rem;
    flex: 1;
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.6rem;
  }
}

/* Landmark Cards */
.landmark-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
}

.emoji {
  font-size: 3rem;
  flex-shrink: 0;
  line-height: 1;
}

.area-badge {
  background: var(--ocean-blue);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.best-for {
  background: var(--terracotta);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: inline-block;
}

/* How To Icons */
.howto-icon {
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

/* Map Container */
.map-container {
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border-radius: 14px;
  box-shadow: var(--shadow-light);
  border: none;
}

@media (max-width: 480px) {
  .map-container iframe {
    height: 300px;
  }

  .landmark-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Tech Section Styles */
.tech-gradient-bg {
  background: linear-gradient(135deg, #1A3A5C 0%, #0d2137 50%, #1a3d18 100%);
  position: relative;
  overflow: hidden;
}

.tech-gradient-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Glassmorphism Cards */
.tech-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--terracotta), var(--lush-green));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(212, 175, 55, 0.1);
}

.tech-card:hover::before {
  opacity: 1;
}

/* Feature Icon Styling */
.feature-icon-tech {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(196, 105, 58, 0.2) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  overflow: hidden;
}

.feature-icon-tech::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.tech-card:hover .feature-icon-tech::after {
  left: 100%;
}

.feature-icon-tech i {
  font-size: 1.8rem;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.tech-card:hover .feature-icon-tech i {
  transform: scale(1.1);
}

/* Metrics Grid Styling */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.metric-card-tech {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.metric-card-tech::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--terracotta));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.metric-card-tech:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
}

.metric-card-tech:hover::before {
  transform: scaleX(1);
}

.metric-number-tech {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold) 0%, #fff 50%, var(--terracotta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.metric-number-tech::after {
  content: '%';
  font-size: 2rem;
  position: absolute;
  top: 0.5rem;
  right: -1.5rem;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-card-tech p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.metric-card-tech small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.3rem;
}

/* Section Title Tech Styling */
.section-title-tech h2 {
  color: var(--white) !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.section-title-tech .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* Infrastructure Section Icons */
.infra-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 2px solid rgba(212, 175, 55, 0.3);
  transition: all 0.4s ease;
}

.infra-icon:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.infra-icon i {
  font-size: 2rem;
  color: var(--gold);
}

/* Youth Programs Card */
.youth-card {
  background: linear-gradient(135deg, rgba(26, 58, 92, 0.9) 0%, rgba(45, 90, 39, 0.9) 100%);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.youth-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.youth-card>* {
  position: relative;
  z-index: 1;
}

.youth-card i {
  font-size: 4rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metric-number-tech {
    font-size: 3rem;
  }

  .tech-card {
    padding: 1.5rem;
  }

  .feature-icon-tech {
    width: 60px;
    height: 60px;
  }
}

#backToTop.show {
  display: flex;
}

#backToTop:hover {
  background: #a94f2e;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .metric-number-tech {
    font-size: 3rem;
  }

  .tech-card {
    padding: 1.5rem;
  }

  .feature-icon-tech {
    width: 60px;
    height: 60px;
  }

  .youth-card {
    padding: 2rem;
  }

  #backToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 3%;
  }

  .hero {
    padding-top: 70px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Fix metric card percent sign overflow on small phones */
  .metric-number-tech::after {
    font-size: 1.4rem;
    right: -1.2rem;
  }

  .metric-number-tech {
    font-size: 2.8rem;
  }

  /* Fix landmark card layout on small phones */
  .landmark-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
  }

  /* Fix tips-box grid on small phones */
  .tips-box ul {
    grid-template-columns: 1fr;
  }

  /* Fix youth card padding */
  .youth-card {
    padding: 1.5rem 1rem;
  }

  /* Fix visual box */
  .visual-box {
    padding: 1rem;
    gap: 0.75rem;
  }

  /* Fix modal on very small screens */
  .modal-header-content h2 {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 1rem;
  }

  /* Fix backToTop position - doesn't overlap chat widget */
  #backToTop {
    bottom: 5.5rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* ============================================
   UNIVERSAL CULTURE MODAL SYSTEM
   Works for: Ngaben, Galungan, Nyepi, Melasti, etc.
   ============================================ */

/* ===== BASE MODAL ===== */
.culture-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  /* Di atas Navbar */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.culture-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== CLOSE BUTTON ===== */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
  background: var(--terracotta);
  color: white;
  transform: rotate(90deg);
}

/* ===== MODAL HEADER ===== */
.modal-header {
  position: relative;
  height: 250px;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
}

.modal-header-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  color: white;
  z-index: 2;
}

.modal-header-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ===== MODAL BODY ===== */
.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.modal-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-section p {
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.modal-section em {
  color: var(--terracotta);
  font-style: italic;
}

.modal-section strong {
  color: var(--ocean-blue);
}

/* ===== FACT BADGE ROW ===== */
.fact-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ===== MODAL FOOTER ===== */
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  background: white;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: var(--charcoal);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
}

/* ===== CARD CLICK INDICATOR ===== */
.ceremony-card {
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.ceremony-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.selengkapnya-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.selengkapnya-btn:hover {
  background: #a94f2e;
  transform: translateX(5px);
}

.selengkapnya-btn i {
  transition: transform 0.3s ease;
}

.ceremony-card:hover .selengkapnya-btn i {
  transform: translateX(3px);
}

/* ===== BODY LOCK ===== */
body.modal-open {
  overflow: hidden;
}

/* ============================================
   VISUAL COMPONENTS (Reusable across modals)
   ============================================ */

/* --- Timeline --- */
.timeline-galungan,
.timeline-universal {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.timeline-day {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  border-left: 4px solid var(--terracotta);
}

.timeline-day:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-hover);
}

.timeline-day.highlight-day {
  border-left-color: var(--gold);
  background: #fff8e1;
}

.timeline-day.special-day {
  border-left-color: var(--lush-green);
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.timeline-day.end-day {
  border-left-color: var(--ocean-blue);
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.day-marker {
  width: 50px;
  height: 50px;
  background: var(--terracotta);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.special-day .day-marker {
  background: var(--lush-green);
  font-size: 1.2rem;
}

.end-day .day-marker {
  background: var(--ocean-blue);
}

.day-content h4 {
  font-size: 1.1rem;
  color: var(--ocean-blue);
  margin-bottom: 0.3rem;
}

.day-content p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* --- Comparison Table --- */
.comparison-table {
  margin: 1.5rem 0;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.compare-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(90deg, #fff8e1 0%, #e3f2fd 100%);
  align-items: center;
}

.compare-left,
.compare-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.compare-left i,
.compare-right i {
  font-size: 2rem;
}

.compare-left i {
  color: var(--gold);
}

.compare-right i {
  color: var(--ocean-blue);
}

.compare-left span,
.compare-right span {
  font-weight: 700;
  font-size: 1.1rem;
}

.compare-divider {
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid #eee;
  align-items: center;
}

.compare-cell {
  text-align: center;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.compare-cell.middle {
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
}

/* --- Icon Grid (Participants, Locations, etc.) --- */
.icon-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 15px;
  flex-wrap: wrap;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.icon-item i {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.icon-item span {
  font-size: 0.85rem;
  font-weight: 600;
}

.icon-item small {
  font-size: 0.75rem;
  font-weight: 400;
}

/* --- Visual Box (Dharma/Adharma, etc.) --- */
.visual-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 15px;
  flex-wrap: wrap;
}

.visual-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  flex: 1;
  min-width: 200px;
}

.visual-side i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.visual-side h4 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.visual-side span {
  font-size: 0.85rem;
  color: #666;
}

.visual-divider {
  width: 50px;
  height: 50px;
  background: var(--ocean-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* --- Location Cards --- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.location-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.location-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.location-card i {
  font-size: 2rem;
  color: var(--terracotta);
  margin-bottom: 0.8rem;
}

.location-card h4 {
  font-size: 1rem;
  color: var(--ocean-blue);
  margin-bottom: 0.3rem;
}

.location-card p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.location-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.6rem;
  background: var(--gold);
  color: var(--ocean-blue);
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* --- Tips Box --- */
.tips-box {
  background: linear-gradient(135deg, var(--ocean-blue) 0%, var(--lush-green) 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.tips-box h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.tips-box ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.tips-box li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.tips-box i {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* --- Did You Know --- */
.did-you-know {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 2px solid var(--gold);
  border-radius: 15px;
  padding: 1.5rem;
}

.dyk-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.dyk-header i {
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: var(--ocean-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.dyk-header h3 {
  margin: 0;
  color: var(--ocean-blue);
}

/* --- Video Section --- */
.video-section {
  background: #ffebee;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.video-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.video-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  text-decoration: none;
  color: var(--charcoal);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-link:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.video-link .fa-youtube {
  color: #ff0000;
  font-size: 2rem;
}

.video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-weight: 600;
  color: var(--ocean-blue);
}

.video-desc {
  font-size: 0.85rem;
  color: #666;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* FIX: background-attachment:fixed tidak didukung iOS Safari & Chrome Android
   Solusi permanen: disable di semua mobile via media query
   *** JANGAN HAPUS - ini fix untuk halobadung.id mobile *** */
@media (max-width: 992px) {

  .hero,
  section[style*="background"] {
    background-attachment: scroll !important;
  }
}

/* Tambahan: iOS detection via webkit */
@supports (-webkit-touch-callout: none) {

  .hero,
  section[style*="background"] {
    background-attachment: scroll !important;
  }
}

/* Fix: background-attachment: fixed tidak didukung di iOS & beberapa Android */
@supports (-webkit-touch-callout: none) {
  .hero {
    background-attachment: scroll !important;
  }
}

@media (max-width: 992px) {
  .hero {
    background-attachment: scroll !important;
  }
}

@media (max-width: 768px) {
  .culture-modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    max-height: 92vh;
    height: 92vh;
    border-radius: 20px 20px 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    height: 180px;
    flex-shrink: 0;
  }

  .modal-header-content h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    flex-shrink: 0;
  }

  .visual-box {
    flex-direction: column;
    gap: 1rem;
  }

  .visual-divider {
    transform: rotate(90deg);
  }

  .compare-header,
  .compare-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .compare-divider {
    transform: rotate(90deg);
    padding: 0.5rem 0;
  }

  .icon-grid {
    gap: 1rem;
  }

  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips-box ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .location-grid {
    grid-template-columns: 1fr;
  }

  .fact-row {
    justify-content: center;
  }
}

/* ===== STEP 4: MODAL LOADING SPINNER ===== */
.modal-loading {
  position: relative;
}

.modal-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-top: 4px solid var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10001;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ===== MICRO-INTERACTIONS: FACT BADGES ===== */
.fact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terracotta);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.3rem 0.3rem 0.3rem 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  box-shadow: 0 2px 8px rgba(196, 105, 58, 0.3);
}

.fact-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(196, 105, 58, 0.4);
  background: #a94f2e;
}

.fact-badge i {
  transition: transform 0.3s ease;
}

.fact-badge:hover i {
  transform: scale(1.2) rotate(10deg);
}

/* ===== MICRO-INTERACTIONS: TIMELINE PULSES ===== */
.timeline-day {
  position: relative;
  overflow: hidden;
}

.timeline-day::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.6s ease;
}

.timeline-day:hover::before {
  left: 100%;
}

.day-marker {
  animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(212, 175, 55, 0);
  }
}

.timeline-day.highlight-day .day-marker {
  animation-duration: 1.5s;
}

.timeline-day:hover .day-marker {
  transform: scale(1.1);
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modal-loading::after,
  .fact-badge,
  .timeline-day::before,
  .day-marker {
    animation: none !important;
    transition: none !important;
  }

  .culture-modal .modal-container {
    animation: none !important;
  }
}

/* ============================================
   MOBILE RESPONSIVE FIXES - COMPREHENSIVE
   Fix deployed vs localhost discrepancies
   ============================================ */

/* Prevent horizontal overflow on ALL screen sizes */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix for tables/grids that may overflow on mobile */
img,
video,
iframe {
  max-width: 100%;
}

/* Fix: section padding terlalu besar di HP kecil */
@media (max-width: 600px) {
  section {
    padding: clamp(40px, 8vw, 80px) 0;
  }

  .section-title {
    margin-bottom: 2.5rem;
  }

  /* Nav fix: pastikan logo tidak terpotong */
  .logo {
    font-size: clamp(0.95rem, 3.5vw, 1.3rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45vw;
  }

  /* Fix: card terlalu sempit di layar kecil */
  .card-content {
    padding: 1.25rem;
  }

  /* Fix: landmark card badge wrap */
  .area-badge,
  .best-for {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }

  /* Fix: howto icon too large */
  .howto-icon {
    font-size: 2.5rem;
  }

  /* Fix: emoji too large in landmark cards */
  .emoji {
    font-size: 2.2rem;
  }

  /* Fix: comparison table overflow */
  .comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Fix: tips box */
  .tips-box {
    padding: 1rem;
  }

  /* Fix footer social icons */
  footer a[style*="font-size: 1.5rem"] {
    font-size: 1.2rem !important;
  }

  /* Fix: cta-btn full width on very small screens */
  .hero .cta-btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
  }
}

/* Global Utilities */
.hidden {
  display: none !important;
}

/* Fix: backToTop tidak overlap chat widget (biasanya bottom-right) */
@media (max-width: 992px) {
  #backToTop {
    bottom: 5rem;
    right: 1rem;
  }
}

/* Fix: metrics grid percent sign tidak overflow */
@media (max-width: 380px) {
  .metric-number-tech {
    font-size: 2.4rem;
  }

  .metric-number-tech::after {
    font-size: 1.2rem;
    right: -1rem;
  }

  .metric-card-tech {
    padding: 1.5rem 1rem;
  }

  .nav-container {
    padding: 0 2.5%;
  }
}

/* Fix: modal tidak ter-clip di layar sempit */
@media (max-width: 360px) {
  .modal-container {
    width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Fix: font yang ter-render berbeda di Safari iOS vs Chrome desktop */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* iOS Safari fix: buttons tidak responsive touch */
  button,
  .cta-btn,
  .lang-toggle,
  .hamburger {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */
.feedback-section {
  margin-top: 4rem;
  padding-bottom: 4rem;
}

.feedback-card {
  background: var(--white);
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.rating-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 10px;
  margin: 1.5rem 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.rating-stars input {
  display: none;
}

.rating-stars label {
  cursor: pointer;
  color: #ddd;
  transition: color 0.2s;
}

.rating-stars input:checked~label,
.rating-stars label:hover,
.rating-stars label:hover~label {
  color: var(--gold);
}

.feedback-card textarea {
  width: 100%;
  height: 120px;
  padding: 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-family: inherit;
  resize: none;
  outline: none;
}

.feedback-card textarea:focus {
  border-color: var(--terracotta);
}

.feedback-meta-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-badge {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--ocean-blue);
  color: white;
}

.location-btn {
  background: none;
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.location-btn.active {
  background: var(--terracotta);
  color: white;
}

/* Feedback System Enhancement */
.feedback-section {
  padding: 4rem 0;
  background: var(--cream);
}

.feedback-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   FEEDBACK LIST: Scrollable Container dengan Expand
   ============================================================ */
.feedback-list-wrapper {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.feedback-scroll-area {
  max-height: 480px;
  /* Tampilkan ~3 komentar, sisanya scroll */
  overflow-y: auto;
  padding: 1.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Gradient fade di bawah untuk hint ada konten lagi */
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feedback-scroll-area.expanded {
  max-height: 1200px;
  /* Buka penuh saat expand */
  -webkit-mask-image: none;
  mask-image: none;
}

.feedback-scroll-area::-webkit-scrollbar {
  width: 5px;
}

.feedback-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
}

.feedback-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(196, 105, 58, 0.4);
  border-radius: 10px;
}

.expand-feedback-btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(196, 105, 58, 0.06), rgba(26, 58, 92, 0.06));
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ocean-blue);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
  letter-spacing: 0.02em;
}

.expand-feedback-btn:hover {
  background: linear-gradient(135deg, rgba(196, 105, 58, 0.12), rgba(26, 58, 92, 0.12));
  color: var(--terracotta);
}

/* Pisahkan comment-item agar tidak mepet */
.feedback-scroll-area .comment-item:last-child {
  margin-bottom: 0;
}

.feedback-form-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-light);
  margin-bottom: 3rem;
  text-align: left;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
  margin: 1rem 0;
}

.rating-input input {
  display: none;
}

.rating-input label {
  font-size: 2.2rem;
  color: #ddd;
  cursor: pointer;
  transition: 0.2s;
}

.rating-input input:checked~label,
.rating-input label:hover,
.rating-input label:hover~label {
  color: var(--gold);
}

.feedback-tag-select {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.tag-opt {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--terracotta);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  color: var(--terracotta);
  transition: 0.3s;
}

.tag-opt.selected {
  background: var(--terracotta);
  color: white;
}

.comment-item {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ocean-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.comment-meta h4 {
  font-size: 0.95rem;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

.comment-date {
  font-size: 0.75rem;
  color: #888;
}

.comment-tag {
  display: inline-block;
  background: rgba(196, 105, 58, 0.1);
  color: var(--terracotta);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.reply-list {
  margin-left: 3rem;
  border-left: 2px solid #eee;
  padding-left: 1rem;
  margin-top: 1rem;
}

.reply-item {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.reply-toggle {
  background: none;
  border: none;
  color: var(--ocean-blue);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
}

.reply-input-wrap {
  display: none;
  margin-top: 0.5rem;
}

.reply-input-wrap.active {
  display: flex;
  gap: 0.5rem;
}

/* Responsive Feedback Adjustments */
@media (max-width: 600px) {
  .feedback-form-card {
    padding: 1.5rem;
  }

  .reply-list {
    margin-left: 1rem;
  }

  .rating-input label {
    font-size: 1.8rem;
    /* Sedikit lebih kecil di HP agar tidak meluap */
  }

  .tag-opt {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .comment-item {
    padding: 1.25rem;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .reply-input-wrap.active {
    flex-direction: column;
    gap: 0.5rem;
  }

  .reply-input-wrap .chat-send {
    width: 100%;
    border-radius: 8px;
  }
}

/* ============================================================
   Navbar Submenu — Sejarah & Budaya
   FIX: has-submenu harus display:block agar submenu
   tidak "meluber" ke sel grid lain.
   ============================================================ */

/* Override: item dengan submenu pakai display:block bukan flex */
.nav-menu li.has-submenu {
  display: block;
  padding-bottom: 1rem;
}

/* Parent label — mirip nav-menu a tapi span */
.nav-parent-label {
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.25s ease;
  user-select: none;
  text-decoration: none;
}

.nav-parent-label:hover,
.nav-parent-label.active {
  color: var(--gold);
  /* letter-spacing dihapus — ini penyebab kejang saat hover */
}

.nav-chevron {
  font-size: 0.42em;
  opacity: 0.55;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* Submenu — collapse by default, expand on .submenu-open */
.nav-submenu {
  list-style: none;
  margin: 0.6rem 0 0 0;
  padding: 0 0 0 0.2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
  opacity: 0;
  border-left: 2px solid rgba(212, 175, 55, 0.25);
}

.has-submenu.submenu-open .nav-submenu {
  max-height: 200px;
  opacity: 1;
}

/* Submenu items */
.nav-subitem {
  display: block !important;
  border-top: none !important;
  padding: 0.3rem 0 0.3rem 0.8rem !important;
  margin: 0 !important;
}

/* Remove ::before number counter for subitems */
.nav-subitem::before {
  content: '' !important;
  display: none !important;
}

.nav-subitem a {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  letter-spacing: 0.01em !important;
  font-weight: 300 !important;
  transition: color 0.2s ease, letter-spacing 0.2s ease !important;
}

.nav-subitem a:hover,
.nav-subitem a.active {
  color: var(--gold) !important;
  letter-spacing: 0.04em !important;
}

/* ── Mobile — sudah OK, pertahankan ukuran lebih kecil ── */
@media (max-width: 768px) {
  .nav-parent-label {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }

  .nav-subitem a {
    font-size: clamp(1rem, 3.5vw, 1.3rem) !important;
  }

  .nav-submenu {
    margin-top: 0.4rem;
  }
}

/* ============================================================
   PAGE-SPECIFIC STYLES — Sejarah Badung
   Extracted from inline <style> and inline style="" attributes
   ============================================================ */


/* ============================================================
   BADUNG DIGITAL CITY — SEJARAH PAGE
   All-in-one CSS (style.css merged + page-specific styles)
   ============================================================ */

/* ── CSS Variables ── */
/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.2;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.nav-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 64px;
  background: rgba(28, 28, 28, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10004;
  flex-shrink: 0;
}

.nav-close-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.25s;
  padding: 0;
}

.nav-close-btn:hover {
  opacity: 0.55;
}

.nav-close-icon {
  width: 24px;
  height: 14px;
  position: relative;
  flex-shrink: 0;
}

.nav-close-icon::before,
.nav-close-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

.nav-close-icon::before {
  top: 2px;
}

.nav-close-icon::after {
  top: 10px;
}

.nav-close-btn.is-open .nav-close-icon::before {
  top: 6px;
  transform: rotate(45deg);
}

.nav-close-btn.is-open .nav-close-icon::after {
  top: 6px;
  transform: rotate(-45deg);
}

.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  padding: 0.38rem 0.85rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 1001;
}

.lang-toggle:hover {
  background: var(--terracotta);
  color: var(--white);
  transform: scale(1.05);
}

.nav-panel {
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background: rgba(22, 22, 22, 0.98);
  backdrop-filter: blur(24px);
  z-index: 999;
  padding: 2.5rem 8%;
  display: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nav-panel.open {
  display: block;
}

.nav-menu {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 3rem;
}

.nav-menu li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  padding-bottom: 0.8rem;
}

.nav-menu li::before {
  content: attr(data-num);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 0.4rem;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold);
}

.has-submenu {
  flex-direction: column;
  align-items: flex-start !important;
}

.nav-parent-label {
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  cursor: pointer;
  transition: color 0.25s;
}

.nav-parent-label:hover,
.nav-parent-label.active {
  color: var(--gold);
}

.nav-chevron {
  font-size: 0.9rem;
  transition: transform 0.3s;
}

.nav-submenu {
  list-style: none;
  padding-left: 1rem;
  display: none;
}

.has-submenu.submenu-open .nav-submenu {
  display: block;
}

.nav-subitem a {
  font-size: 1.3rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.nav-subitem a:hover,
.nav-subitem a.active {
  color: var(--gold) !important;
}

/* ── HERO (defined above at line ~243, lempuyang.avif) ── */

/* ── SECTIONS ── */
section {
  padding: clamp(60px, 10vw, 120px) 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--terracotta);
  max-width: 600px;
  margin: 1.2rem auto 0;
  font-weight: 500;
}

/* ── STORY BLOCKS ── */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.story-block.reverse {
  direction: rtl;
}

.story-block.reverse>* {
  direction: ltr;
}

.story-img {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.story-img img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.story-img figcaption {
  font-size: 0.78rem;
  color: var(--charcoal);
  opacity: 0.6;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

.story-text h3 {
  font-size: 2rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
}

.story-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--charcoal);
}

.story-text-1 p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--charcoal) !important;
}

.highlight {
  background: linear-gradient(135deg, var(--cream), rgba(212, 175, 55, 0.1));
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ocean-blue);
}

.highlight-1 {
  background: linear-gradient(135deg, var(--cream), rgba(212, 175, 55, 0.1));
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ocean-blue) !important;
}

.fact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terracotta);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.3rem 0.3rem 0.3rem 0;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), var(--terracotta));
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 0;
  margin-bottom: 4rem;
  align-items: start;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 1;
  text-align: right;
  padding-right: 2.5rem;
}

.timeline-item:nth-child(odd) .timeline-empty {
  grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 3;
  text-align: left;
  padding-left: 2.5rem;
}

.timeline-item:nth-child(even) .timeline-empty {
  grid-column: 1;
}

.timeline-dot {
  grid-column: 2;
  width: 48px;
  height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.2);
  z-index: 1;
  margin: 0 auto;
  flex-shrink: 0;
}

.timeline-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content h3 {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline-tag {
  display: inline-block;
  background: var(--terracotta);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ── FOOTER ── */
footer {
  background: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
}

/* ── BACK TO TOP ── */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 900;
  box-shadow: var(--shadow-hover);
  transition: var(--transition);
}

#backToTop:hover {
  background: #a94f2e;
  transform: translateY(-4px);
}

/* ── CULTURE MODAL ── */
.culture-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.culture-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
  background: var(--terracotta);
  color: white;
  transform: rotate(90deg);
}

.modal-header {
  position: relative;
  height: auto;
  min-height: 260px;
  overflow: hidden;
  flex-shrink: 0;
  padding-bottom: 1.5rem;
}

.modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
}

.modal-header-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem 0;
  color: white;
}

.modal-header-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-section:last-of-type {
  border-bottom: none;
}

.modal-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
}

.modal-section p {
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.ceremony-tag {
  background: var(--cream);
  color: var(--terracotta);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--terracotta);
}

/* ── WAYANG MODAL HEADER FIX ── */
.wayang-modal-header {
  height: auto !important;
  min-height: 260px;
  padding-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.wayang-modal-header .modal-header-content {
  position: relative;
  z-index: 2;
  padding-top: 3rem;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 0;
}

/* ── 5W1H CARD ── */
.wh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Default wh-card for dark backgrounds */
.wh-card {
  background: rgba(13, 30, 48, 0.85);
  /* Lebih gelap agar teks putih terbaca jelas */
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.wh-card:hover {
  background: rgba(13, 30, 48, 0.95);
  border-color: var(--gold);
}

.wh-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wh-card p {
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   📚 BUKU SEJARAH — ANIMASI BUKU 3D
   Digunakan di section "Pilih Topik Sejarah"
   ============================================================ */

.buku-section {
  background: linear-gradient(160deg, #0d1b2e 0%, #1A3A5C 60%, #0f2a40 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.buku-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.buku-section .section-title h2 {
  color: var(--gold) !important;
}

.buku-section .section-title h2::after {
  background: var(--terracotta);
}

.buku-section .section-subtitle {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* SHELF — rak buku */
.buku-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2rem 1.5rem;
  margin-top: 3rem;
  justify-items: center;
}

/* BOOK ITEM */
.buku-item {
  perspective: 1000px;
  cursor: pointer;
  width: 160px;
}

.buku-cover-wrap {
  width: 160px;
  height: 220px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: left center;
}

.buku-item:hover .buku-cover-wrap,
.buku-item.open .buku-cover-wrap {
  transform: rotateY(-35deg);
}

/* Front cover */
.buku-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 3px 8px 8px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 0.8rem;
  overflow: hidden;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5), inset -4px 0 8px rgba(0, 0, 0, 0.2);
}

.buku-front::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  background: rgba(0, 0, 0, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.buku-front-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(1.2);
}

.buku-front-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 30%, transparent 80%);
}

.buku-front-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.buku-front-content .buku-bab {
  font-size: 0.62rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.buku-front-content .buku-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: white;
  font-weight: 400;
  line-height: 1.25;
}

.buku-front-icon {
  position: absolute;
  top: 1.2rem;
  right: 0.8rem;
  z-index: 2;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Spine */
.buku-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotateY(-90deg) translateX(-7px);
  transform-origin: left center;
  backface-visibility: hidden;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 3px 0 0 3px;
}

/* Book open page shadow effect */
.buku-page {
  position: absolute;
  inset: 0;
  border-radius: 3px 8px 8px 3px;
  transform: translateX(4px) rotateY(0deg);
  z-index: -1;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Info panel below book */
.buku-info {
  margin-top: 1rem;
  text-align: center;
}

.buku-info .buku-info-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.buku-info .buku-info-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 1px;
}

/* ── MODAL BUKU (full book reading experience) ── */
.buku-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 6000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.buku-modal-overlay.active {
  display: flex;
}

/* Book open animation */
@keyframes bookOpen {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateY(-30deg) scale(0.85);
  }

  100% {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) scale(1);
  }
}

.buku-modal-book {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #fdf6e9;
  border-radius: 4px 16px 16px 4px;
  box-shadow:
    -8px 0 0 #c8a97e,
    -16px 0 0 #b8996e,
    0 25px 60px rgba(0, 0, 0, 0.6);
  animation: bookOpen 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Book binding */
.buku-modal-book::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20px;
  background: linear-gradient(90deg, #8B6914 0%, #c8a97e 40%, #a07830 60%, #8B6914 100%);
  border-radius: 4px 0 0 4px;
  z-index: 10;
}

/* Book header */
.buku-modal-header {
  padding: 1.5rem 2rem 1.5rem 3rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(to right, rgba(212, 175, 55, 0.08), transparent);
  flex-shrink: 0;
}

.buku-modal-header-text {}

.buku-modal-chapter {
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--terracotta);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.buku-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--ocean-blue);
  line-height: 1.2;
}

.buku-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--terracotta);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.buku-modal-close:hover {
  background: rgba(196, 105, 58, 0.1);
}

/* Book body — the page */
.buku-modal-body {
  padding: 2rem 3rem 2rem 4rem;
  overflow-y: auto;
  flex: 1;
  background: repeating-linear-gradient(transparent,
      transparent 27px,
      rgba(212, 175, 55, 0.12) 27px,
      rgba(212, 175, 55, 0.12) 28px);
  background-attachment: local;
}

/* Decorative page number */
.buku-modal-page-num {
  position: absolute;
  bottom: 1rem;
  right: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: rgba(139, 105, 20, 0.5);
  font-style: italic;
}

/* Photo layout in book */
.buku-foto-full {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-hover);
  display: block;
}

.buku-foto-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.buku-foto-pair img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.buku-foto-side {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.buku-foto-side img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.buku-foto-caption {
  font-size: 0.78rem;
  color: rgba(26, 58, 92, 0.6);
  text-align: center;
  margin-top: 0.4rem;
  font-style: italic;
}

/* Book text styles */
.buku-modal-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--ocean-blue);
  margin: 1.8rem 0 0.8rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.8rem;
}

.buku-modal-body p {
  color: #3a2a1a;
  font-size: 0.97rem;
  line-height: 1.9;
  margin-bottom: 1rem;
  text-indent: 1.5rem;
}

.buku-modal-body .highlight {
  text-indent: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.15));
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1.5rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--ocean-blue);
  font-style: italic;
}

.buku-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

/* Photo placeholder (untuk gambar yang belum tersedia) */
.foto-placeholder {
  width: 100%;
  background: linear-gradient(135deg, #e8e0d0, #f0e8d8);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(26, 58, 92, 0.4);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed rgba(212, 175, 55, 0.3);
}

.foto-placeholder i {
  font-size: 2rem;
  opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.5rem;
  }

  .nav-menu a {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }

  .nav-panel {
    padding: 2rem 6%;
  }

  .story-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .story-block.reverse {
    direction: ltr;
  }

  .buku-modal-body {
    padding: 1.5rem 2rem 1.5rem 3rem;
  }

  .buku-foto-pair,
  .buku-foto-side {
    grid-template-columns: 1fr;
  }

  .buku-foto-pair img,
  .buku-foto-side img {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .timeline::before {
    left: 24px;
  }

  .timeline-item {
    grid-template-columns: 48px 1fr;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
    text-align: left;
    padding-left: 1.5rem;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-empty,
  .timeline-item:nth-child(even) .timeline-empty {
    display: none;
  }

  .timeline-dot {
    grid-column: 1;
  }

  .buku-shelf {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem 1rem;
  }

  .buku-item {
    width: 130px;
  }

  .buku-cover-wrap {
    width: 130px;
    height: 185px;
  }

  .buku-modal-body h3 {
    font-size: 1.3rem;
  }

  .buku-modal-header {
    padding: 1.2rem 1.5rem 1.2rem 2.5rem;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    grid-template-columns: 1fr;
  }

  .buku-shelf {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 0.5rem;
  }

  .buku-item {
    width: 100%;
  }

  .buku-cover-wrap {
    width: 100%;
    max-width: 120px;
    height: 165px;
    margin: 0 auto;
  }
}



/* ════════════════════════════════════════════════════════
   SEJARAH PAGE — HERO OVERRIDE
   ════════════════════════════════════════════════════════ */
.hero-sejarah {
  background: linear-gradient(rgba(196, 105, 58, 0.72), rgba(26, 58, 92, 0.82)), url('img/puputan.webp') center/cover no-repeat !important;
}

/* Hero quick-nav button container */
.hero-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Primary quick-nav button (Baca Sejarah) */
.hero-btn-primary {
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: #fff;
  padding: 0.5rem 1.3rem;
  border-radius: 30px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s;
}

.hero-btn-primary:hover {
  background: rgba(212, 175, 55, 0.45);
}

/* Secondary quick-nav buttons */
.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 0.5rem 1.3rem;
  border-radius: 30px;
  font-size: 0.85rem;
  text-decoration: none;
}

/* Section title label (BAB I, BAB II, etc.) */
.section-label {
  font-size: 0.8rem;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.section-label--gold {
  color: var(--gold);
}

.section-label--terracotta {
  color: var(--terracotta);
}

.section-label--red {
  color: rgba(255, 100, 100, 0.8);
}

/* Section title label for buku section */
.buku-section .section-label {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* ════════════════════════════════════════════════════════
   SECTION BACKGROUNDS
   ════════════════════════════════════════════════════════ */
#bab-prasejarah {
  background: var(--cream);
  padding: 80px 0;
}

#bab-kerajaan {
  background: linear-gradient(135deg, var(--ocean-blue), #0d2b45);
  padding: 80px 0;
}

#bab-kerajaan .section-title h2 {
  color: var(--gold) !important;
}

#bab-kerajaan .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

#bab-tokoh {
  background: linear-gradient(135deg, var(--ocean-blue) 0%, #0d2b45 100%);
  padding: 80px 0;
}

/* Pastikan heading section terlihat di dark bg */
#bab-tokoh .section-title h2 {
  color: var(--gold) !important;
}

#bab-tokoh .section-subtitle {
  color: rgba(255, 255, 255, 0.75) !important;
}

#bab-tokoh .bab-label--gold {
  color: var(--gold);
}

#bab-puputan {
  background: linear-gradient(135deg, #1a0000 0%, #3d0000 50%, #1a0a00 100%);
  padding: 80px 0;
}

#bab-puputan .section-title h2 {
  color: #ff9999 !important;
}

#bab-puputan .section-subtitle {
  color: rgba(255, 200, 200, 0.8);
}

#bab-timeline {
  background: linear-gradient(135deg, #0d1b2e, #1A3A5C);
  padding: 80px 0;
}

#bab-timeline .section-title h2 {
  color: var(--gold) !important;
}

#bab-timeline .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

/* Majapahit info box in bab-kerajaan */
.majapahit-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin-bottom: 4rem;
}

.majapahit-box .majapahit-year {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.majapahit-box h3 {
  color: white;
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
}

.majapahit-box p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.majapahit-box .majapahit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .majapahit-box .majapahit-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ════════════════════════════════════════════════════════
   TOKOH CARDS (Bab II)
   ════════════════════════════════════════════════════════ */
.tokoh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.tokoh-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.tokoh-card-img {
  height: 200px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tokoh-card-img i {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.7;
}

.tokoh-card-img p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin: 0;
  text-align: center;
}

.tokoh-card-body {
  padding: 1.5rem;
}

.tokoh-card-body .tokoh-role {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
}

.tokoh-card-body h3 {
  color: white;
  margin: 0.4rem 0 0.8rem;
  font-size: 1.3rem;
}

.tokoh-card-body p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════
   PILAR KEJAYAAN CARDS (Bab III)
   ════════════════════════════════════════════════════════ */
.pilar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.pilar-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-light);
}

.pilar-card h4 {
  color: var(--ocean-blue);
  margin-bottom: 0.5rem;
}

.pilar-card p {
  color: var(--charcoal);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════
   FEEDBACK SECTION
   ════════════════════════════════════════════════════════ */
.feedback-section {
  background: var(--cream);
  padding: 80px 0;
}

#feedback-list {
  margin-top: 3rem;
}

/* Footer social icons */
.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  font-size: 1.5rem;
}

/* ════════════════════════════════════════════════════════
   BOOK COVER COLORS
   ════════════════════════════════════════════════════════ */
.buku-item:nth-child(1) .buku-front {
  background: linear-gradient(135deg, #2d5a27, #1a3a1a);
}

.buku-item:nth-child(1) .buku-front-img {
  background-image: url('img/terasering.avif');
}

.buku-item:nth-child(1) .buku-spine {
  background: #1a3a1a;
}

.buku-item:nth-child(2) .buku-front {
  background: linear-gradient(135deg, #1A3A5C, #0d2040);
}

.buku-item:nth-child(2) .buku-front-img {
  background-image: url('img/kerajaanbadung.avif');
}

.buku-item:nth-child(2) .buku-spine {
  background: #0d2040;
}

.buku-item:nth-child(3) .buku-front {
  background: linear-gradient(135deg, #7a3000, #4a1a00);
}

.buku-item:nth-child(3) .buku-front-img {
  background-image: url('img/petabadung.avif');
}

.buku-item:nth-child(3) .buku-spine {
  background: #4a1a00;
}

.buku-item:nth-child(4) .buku-front {
  background: linear-gradient(135deg, #6b4c11, #3d2a00);
}

.buku-item:nth-child(4) .buku-front-img {
  background-image: url('img/raja.avif');
}

.buku-item:nth-child(4) .buku-spine {
  background: #3d2a00;
}

.buku-item:nth-child(5) .buku-front {
  background: linear-gradient(135deg, #1a5c4a, #0d3a2e);
}

.buku-item:nth-child(5) .buku-front-img {
  background-image: url('img/pelabuhan.avif');
}

.buku-item:nth-child(5) .buku-spine {
  background: #0d3a2e;
}

.buku-item:nth-child(6) .buku-front {
  background: linear-gradient(135deg, #8b0000, #4a0000);
}

.buku-item:nth-child(6) .buku-front-img {
  background-image: url('img/puputan.webp');
}

.buku-item:nth-child(6) .buku-spine {
  background: #4a0000;
}

.buku-item:nth-child(7) .buku-front {
  background: linear-gradient(135deg, #3d3d1a, #1a1a00);
}

.buku-item:nth-child(7) .buku-front-img {
  background-image: url('img/kolonial.avif');
}

.buku-item:nth-child(7) .buku-spine {
  background: #1a1a00;
}

.buku-item:nth-child(8) .buku-front {
  background: linear-gradient(135deg, #cc0000, #880000);
}

.buku-item:nth-child(8) .buku-front-img {
  background-image: url('img/merdeka.avif');
}

.buku-item:nth-child(8) .buku-spine {
  background: #880000;
}

.buku-item:nth-child(9) .buku-front {
  background: linear-gradient(135deg, #004080, #001a40);
}

.buku-item:nth-child(9) .buku-front-img {
  background-image: url('img/kuta.avif');
}

.buku-item:nth-child(9) .buku-spine {
  background: #001a40;
}

.buku-page {
  background: #f0e8d8;
}

/* ════════════════════════════════════════════════════════
   FOTO PLACEHOLDER VARIANTS
   ════════════════════════════════════════════════════════ */
.foto-placeholder {
  width: 100%;
  background: linear-gradient(135deg, #e8e0d0, #f0e8d8);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(26, 58, 92, 0.4);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed rgba(212, 175, 55, 0.3);
}

.foto-placeholder i {
  font-size: 2rem;
  opacity: 0.4;
}

/* Height variants */
.fp-h150 {
  height: 150px;
}

.fp-h180 {
  height: 180px;
}

.fp-h200 {
  height: 200px;
}

.fp-h220 {
  height: 220px;
}

.fp-h250 {
  height: 250px;
}

.fp-h280 {
  height: 280px;
}

.fp-h300 {
  height: 300px;
}

/* Background variants */
.fp-bg-cream {
  background: linear-gradient(135deg, #fef9e7, #f9f0e0);
}

.fp-bg-warm {
  background: linear-gradient(135deg, #fef0e8, #f8e8e0);
}

/* Margin variant */
.fp-mb {
  margin-bottom: 1rem;
}

/* Modal header placeholder backgrounds */
.modal-ph-prasejarah {
  height: 280px;
  background: linear-gradient(135deg, #2d5a27, #4a8a3a);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-kerajaan {
  height: 280px;
  background: linear-gradient(135deg, #1A3A5C, #0d2040);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-majapahit {
  height: 280px;
  background: linear-gradient(135deg, #7a3000, #4a1a00);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-perdagangan {
  height: 280px;
  background: linear-gradient(135deg, #1a5c4a, #0d3a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-puputan {
  height: 280px;
  background: linear-gradient(135deg, #1a0000, #3d0000);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-kolonial {
  height: 280px;
  background: linear-gradient(135deg, #3d3d1a, #1a1a00);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-kemerdekaan {
  height: 280px;
  background: linear-gradient(135deg, #cc0000, #880000);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-digital {
  height: 280px;
  background: linear-gradient(135deg, #004080, #001a40);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.modal-ph-inner {
  text-align: center;
}

.modal-ph-inner i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.modal-ph-inner span {
  font-size: 0.85rem;
}

/* Modal specific photo layouts */
.buku-foto-full {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-hover);
  display: block;
}

.buku-foto-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.buku-foto-pair img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.buku-foto-side {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.buku-foto-side img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

@media (max-width: 768px) {

  .buku-foto-pair,
  .buku-foto-side {
    grid-template-columns: 1fr;
  }

  .buku-foto-pair img,
  .buku-foto-side img {
    height: 180px;
  }
}

/* Timeline content on dark backgrounds */
#bab-timeline .timeline-content h3 {
  color: var(--white) !important;
}

#bab-timeline .timeline-content p {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 5W1H cards on dark background */
#bab-puputan .wh-card p {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Fact badge variants */
.fact-badge--gold {
  background: rgba(212, 175, 55, 0.2) !important;
  color: var(--gold) !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

.fact-badge--red {
  background: #8b0000 !important;
}

/* ════════════════════════════════════════════════════════
   MODAL BOOK TEXT STYLES
   ════════════════════════════════════════════════════════ */
.buku-modal-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--ocean-blue);
  margin: 1.8rem 0 0.8rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.8rem;
}

.buku-modal-body p {
  color: #3a2a1a;
  font-size: 0.97rem;
  line-height: 1.9;
  margin-bottom: 1rem;
  text-indent: 1.5rem;
}

.buku-modal-body .highlight {
  text-indent: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.15));
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1.5rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--ocean-blue);
  font-style: italic;
}

.buku-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.buku-foto-caption {
  font-size: 0.78rem;
  color: rgba(26, 58, 92, 0.6);
  text-align: center;
  margin-top: 0.4rem;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════
   SEJARAH PAGE — Consolidated styles (moved from inline)
   ════════════════════════════════════════════════════════ */

/* ── Bab label above section titles ─────────────────── */
.bab-label {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--terracotta);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.bab-label--gold {
  color: var(--gold);
}

/* ── Section backgrounds ─────────────────────────────── */
.section-cream {
  background: var(--cream);
  padding: 80px 0;
}

.section-white {
  background: white;
  padding: 80px 0;
}

.section-dark-blue {
  background: linear-gradient(135deg, var(--ocean-blue) 0%, #0d2b45 100%);
  color: white;
  padding: 80px 0;
}

.section-charcoal {
  background: var(--charcoal);
  color: white;
  padding: 80px 0;
}

/* ── Section title overrides for dark backgrounds ────── */
.section-dark-blue .section-title h2,
.section-charcoal .section-title h2 {
  color: white !important;
}

.section-dark-blue .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Wayang Modal header fix ─────────────────────────── */
.wayang-modal-header {
  height: auto !important;
  min-height: 260px;
  padding-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.wayang-modal-header .modal-header-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem 0;
}

@media (max-width: 768px) {
  .wayang-modal-header {
    min-height: 200px;
  }

  .wayang-modal-header .modal-header-content {
    padding: 2.5rem 1.25rem 0;
  }
}

/* ── Story image caption ─────────────────────────────── */
.story-caption {
  font-size: 0.78rem;
  color: var(--charcoal);
  opacity: 0.6;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Hero nav pills ──────────────────────────────────── */
.hero-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 2rem;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 0.4rem 1.1rem;
  border-radius: 30px;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.hero-pill:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-pill--gold {
  background: rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.6);
}

.hero-pill--gold:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* ── Timeline ────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), var(--terracotta));
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 0;
  margin-bottom: 4rem;
  align-items: start;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 1;
  text-align: right;
  padding-right: 2.5rem;
}

.timeline-item:nth-child(odd) .timeline-empty {
  grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 3;
  text-align: left;
  padding-left: 2.5rem;
}

.timeline-item:nth-child(even) .timeline-empty {
  grid-column: 1;
}

.timeline-dot {
  grid-column: 2;
  width: 48px;
  height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.2);
  z-index: 1;
  margin: 0 auto;
  flex-shrink: 0;
}

.timeline-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content h3 {
  color: var(--white) !important;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline-tag {
  display: inline-block;
  background: var(--terracotta);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 24px;
  }

  .timeline-item {
    grid-template-columns: 48px 1fr;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
    text-align: left;
    padding-left: 1.5rem;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-empty,
  .timeline-item:nth-child(even) .timeline-empty {
    display: none;
  }

  .timeline-dot {
    grid-column: 1;
  }
}

/* ── 5W1H Card grid ──────────────────────────────────── */
.wh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.wh-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.wh-card:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.5);
}

.wh-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fix: wh-card p was rgba(80,45,5,0.788) — invisible on dark bg */
.wh-card p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Light-bg variant (inside cream sections) */
.wh-card--light {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(212, 175, 55, 0.4);
}

.wh-card--light .wh-card p {
  color: var(--charcoal);
}

/* ── Deep story block ────────────────────────────────── */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.story-block.reverse {
  direction: rtl;
}

.story-block.reverse>* {
  direction: ltr;
}

.story-img {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.story-img img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.story-text h3 {
  font-size: 2rem;
  color: var(--ocean-blue);
  margin-bottom: 1rem;
}

.story-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--charcoal);
}

.story-text .highlight {
  background: linear-gradient(135deg, var(--cream), rgba(212, 175, 55, 0.1));
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ocean-blue);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .story-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .story-block.reverse {
    direction: ltr;
  }
}

/* ── Fact badge ──────────────────────────────────────── */
.fact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terracotta);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.3rem 0.3rem 0.3rem 0;
}

.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* ── Ceremony & Art cards ────────────────────────────── */
.ceremony-card,
.art-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

.ceremony-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.art-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.ceremony-card img,
.art-card img {
  width: 100%;
  object-fit: cover;
}

.ceremony-card img {
  height: 220px;
}

.art-card img {
  height: 240px;
}

.ceremony-body,
.art-body {
  padding: 1.8rem;
}

.ceremony-body h3,
.art-body h3 {
  color: var(--ocean-blue);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.ceremony-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ceremony-tag {
  background: var(--cream);
  color: var(--terracotta);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--terracotta);
}

.ceremony-body p,
.art-body p {
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.ceremony-detail {
  background: var(--cream);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.ceremony-detail-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.ceremony-detail-item:last-child {
  margin-bottom: 0;
}

.ceremony-detail-item i {
  color: var(--gold);
  margin-top: 3px;
  flex-shrink: 0;
}

.art-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* ── Tokoh card (BAB III figures) ────────────────────── */
.tokoh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tokoh-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.tokoh-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.11);
}

.tokoh-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: flex-end;
  padding: 0.5rem 0.75rem;
}

.tokoh-img-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 12px;
  border-radius: 4px;
  margin: 0;
}

.tokoh-body {
  padding: 1.5rem;
}

.tokoh-role {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.tokoh-name {
  color: white;
  margin: 0.4rem 0 0.8rem;
  font-size: 1.3rem;
}

.tokoh-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.tokoh-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tokoh-tag {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold);
  padding: 2px 9px;
  border-radius: 15px;
  font-size: 0.72rem;
}

.tokoh-tag--white {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ── Tokoh saksi mata (Schwartz) ─────────────────────── */
.tokoh-role--witness {
  color: rgba(255, 255, 255, 0.5);
}

/* ── Silsilah raja-raja ───────────────────────────────── */
.silsilah-title {
  text-align: center;
  color: var(--ocean-blue);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.silsilah-subtitle {
  text-align: center;
  color: var(--charcoal);
  opacity: 0.7;
  margin-bottom: 2.5rem;
}

.silsilah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 4rem 0;
}

.silsilah-card {
  background: linear-gradient(135deg, var(--cream), white);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-top: 4px solid var(--gold);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.silsilah-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-light);
}

.silsilah-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.silsilah-era {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--terracotta);
  font-weight: 700;
  margin: 0;
}

.silsilah-card h4 {
  color: var(--ocean-blue);
  margin: 0.3rem 0;
}

.silsilah-card p {
  font-size: 0.82rem;
  color: var(--charcoal);
  opacity: 0.75;
  margin: 0;
  line-height: 1.6;
}

/* ── Gajah Mada box ──────────────────────────────────── */
.gajah-mada-box {
  background: linear-gradient(135deg, var(--ocean-blue), #0d2b45);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin: 3rem 0;
  color: white;
}

.gajah-mada-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.gajah-mada-era {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.gajah-mada-title {
  color: white;
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
}

.gajah-mada-text p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.gajah-mada-image {
  text-align: center;
}

.gajah-mada-image img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.gajah-mada-caption {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .gajah-mada-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gajah-mada-image img {
    max-width: 250px;
  }
}

/* ── Selengkapnya button ─────────────────────────────── */
/* Outline variant — hanya untuk story-text di sejarah.html */
.story-text .selengkapnya-btn {
  background: transparent;
  border: 1.5px solid var(--ocean-blue);
  border-radius: 30px;
  color: var(--ocean-blue);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  margin-top: 1.2rem;
  padding: 0.65rem 1.4rem;
}

.story-text .selengkapnya-btn:hover {
  background: var(--ocean-blue);
  color: white;
  transform: none;
}

.selengkapnya-btn--gold {
  background: transparent !important;
  border: 1.5px solid var(--gold) !important;
  color: var(--gold) !important;
}

.selengkapnya-btn--gold:hover {
  background: var(--gold) !important;
  color: var(--charcoal) !important;
}

/* ── Majapahit-era box inside prasejarah ─────────────── */
.majapahit-box {
  background: linear-gradient(135deg, var(--ocean-blue), #0d2b45);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin: 3rem 0;
  color: white;
}


/* ── Puputan section ─────────────────────────────────── */
.section-puputan {
  background: linear-gradient(135deg, #1a0000 0%, #3d0000 100%);
  color: white;
  padding: 80px 0;
}

.section-puputan .section-title h2 {
  color: white !important;
}

.section-puputan .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

/* ════════════════════════════════════════════════════════
   FIX: #bab-kerajaan — dark blue background tapi teks masih gelap
   ════════════════════════════════════════════════════════ */

/* The FIX block for #bab-kerajaan is now removed as the HTML will use section-dark-blue */
/* The specific overrides for #bab-kerajaan are no longer needed if it consistently uses section-dark-blue */
/* The general .section-dark-blue rules will apply */

/* ════════════════════════════════════════════════════════
   FIX: Modal close button duplicate "Tutup × Tutup"
   The modal-footer button already has × icon + "Tutup" text.
   Make it clean: show only the text label, no duplicate icon confusion.
   ════════════════════════════════════════════════════════ */
.modal-footer {
  padding: 1rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  background: var(--cream);
  flex-shrink: 0;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 2rem;
  background: var(--charcoal);
  color: white;
  border: none;
  border-radius: 30px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
}

.modal-close-btn:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
}

/* Hide the duplicate fa-times icon in modal-footer button
   so it reads cleanly as just "Tutup" without "× Tutup" */
.modal-close-btn .fa-times {
  display: none;
}

/* ── Gajah mada image (fix missing styles after cleanup) */
.gajah-mada-image img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

/* ── Silsilah card inner text fix ────────────────────── */
.silsilah-card h4 {
  color: var(--ocean-blue);
  margin: 0.3rem 0;
}

.silsilah-card p {
  font-size: 0.82rem;
  color: var(--charcoal);
  opacity: 0.75;
  margin: 0;
  line-height: 1.6;
}


/* ── Generic card heading ────────────────────────────── */
.card-heading {
  color: var(--ocean-blue);
  margin: 0 0 0.5rem;
}

/* ════════════════════════════════════════════════════════
   CONTRAST & COLOR FIXES — sejarah.html audit
   ════════════════════════════════════════════════════════ */

/* ── Puputan ocean-blue section (replaces inline style) ── */
.section-ocean-puputan {
  background: var(--ocean-blue);
  color: var(--white);
  padding: 100px 0;
}

.section-ocean-puputan .section-title h2 {
  color: var(--white) !important;
}

/* wh-card p on ocean-blue: ensure white text */
.section-ocean-puputan .wh-card p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* wh-card bg on ocean-blue — lift contrast slightly */
.section-ocean-puputan .wh-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.section-ocean-puputan .wh-card:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(212, 175, 55, 0.5);
}

/* Puputan section subtitle */
.section-ocean-puputan .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

/* Puputan prose text */
.section-ocean-puputan p {
  color: rgba(255, 255, 255, 0.88);
}

/* ── BAB I & II: highlight blockquote on cream bg ──────── */
/* cream bg + gold border is fine, but cream-on-cream gradient 
   can blend in. Give it a stronger backdrop */
.section-cream .story-text .highlight,
.section-white .story-text .highlight {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.06));
  border-left: 4px solid var(--gold);
  color: var(--ocean-blue);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.15);
}

/* ── BAB IV perdagangan 3-pillar cards on cream bg ─────── */
/* white cards on cream are hard to see - add visible border */
.section-cream .pilar-card {
  background: #fdfaf3;
  border: 1px solid rgba(160, 130, 10, 0.2);
  box-shadow: 0 4px 20px rgba(44, 24, 16, 0.06);
}

/* Inline pilar cards (still use style attrs) - enhance via global selector */
#bab-perdagangan>.container>div[data-aos]>div[style*="background:white"] {
  border: 1px solid rgba(26, 58, 92, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09) !important;
}

/* ── BAB I (cream): story-text p color boost ───────────── */
/* charcoal on cream is fine but can look washed out */
.section-cream .story-text p {
  color: #2a2218;
  /* slightly richer than --charcoal for cream bg */
}

.section-white .story-text p {
  color: #1C1C1C;
}

/* ── BAB II & III (dark-blue): story-text h3 fix ───────── */
/* --ocean-blue on dark-blue bg = invisible; override with white/gold */
.section-dark-blue .story-text h3 {
  color: var(--gold);
}

.section-dark-blue .story-text p {
  color: rgba(255, 255, 255, 0.85);
}

.section-dark-blue .story-text .highlight {
  background: rgba(255, 255, 255, 0.07);
  border-left-color: var(--gold);
  color: rgba(255, 255, 255, 0.9);
}

/* ── BAB III (dark-blue): section-subtitle fix ─────────── */
.section-dark-blue .section-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

/* Perbaikan kontras Silsilah di background gelap */
.section-dark-blue .silsilah-title {
  color: var(--gold);
}

.section-dark-blue .silsilah-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* bab-label--gold on dark blue: gold is fine */

/* ── Section charcoal (timeline): subtitle ─────────────── */
.section-charcoal .section-title h2 {
  color: white !important;
}

.section-charcoal .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

.section-charcoal .bab-label--gold {
  color: var(--gold);
}

/* ── fact-badge inside light bg (cream/white) ──────────── */
/* terracotta badges on cream/white = good contrast, leave as is */

/* ── Gajah Mada box text on dark blue ──────────────────── */
/* Already handled but enforce */
.gajah-mada-box p,
.gajah-mada-box strong {
  color: rgba(255, 255, 255, 0.88);
}

/* ── Timeline section: wh-card p fix (inside #bab-puputan) */
.section-charcoal p,
.section-charcoal .timeline-content p {
  color: rgba(255, 255, 255, 0.85);
}

/* Note: #bab-puputan uses section-charcoal class */
.section-charcoal .wh-card {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 175, 55, 0.25);
}

.section-charcoal .wh-card p {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Fix Story Caption di background gelap */
.section-dark-blue .story-caption {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Selengkapnya btn on white/cream bg ────────────────── */
/* .selengkapnya-btn already has ocean-blue border/text — ok on light bg */
/* But on ocean-blue section it was invisible — fixed by HTML adding --gold class */

/* ── Story caption on cream/white ──────────────────────── */
/* .story-caption: charcoal at 0.6 opacity = #737373 on cream = ok */

/* ── Silsilah on white section ──────────────────────────── */
/* cream gradient cards on white section = barely visible */
.section-white .silsilah-card {
  background: #fcf8f0;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ── Tokoh card on dark-blue: ensure text clear ─────────── */
.section-dark-blue .tokoh-desc {
  color: rgba(255, 255, 255, 0.85);
}

.section-dark-blue .tokoh-name {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ── Modal section headings inside modals ──────────────── */
/* Modal bg is typically white - ocean-blue is fine */
.modal-section h3 {
  color: #112d46;
  /* Lebih gelap untuk readability di modal cream */
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.8rem;
}

/* puputanModal uses cream background — text must be dark */
#puputanModal .modal-section h3 {
  color: #112d46 !important;
}

#puputanModal .modal-section p,
#puputanModal .modal-body p {
  color: #2c1810 !important;
}

#puputanModal .modal-section em {
  color: #9e4b25 !important;
}

#puputanModal .modal-section strong {
  color: #112d46 !important;
}

/* ── wh-card on cream section (BAB IV perdagangan) ─────── */
/* Jika wh-card digunakan di area terang, teks harus gelap */
.section-cream .wh-card,
.section-white .wh-card {
  background: #fdfaf3;
  border-color: rgba(160, 130, 10, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.section-cream .wh-card p,
.section-white .wh-card p {
  color: #2c1810 !important;
}

.section-cream .wh-label,
.section-white .wh-label {
  color: var(--terracotta);
}

/* ════════════════════════════════════════════════════════
   MOBILE FIXES — sejarah.html (max-width: 480px)
   Masalah: layout overflow, foto tokoh gepeng, teks terpotong
   ════════════════════════════════════════════════════════ */

@media (max-width: 480px) {

  /* ── Tokoh grid: 1 kolom di hp ────────────────────── */
  .tokoh-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* ── Foto tokoh: tinggi lebih proporsional ─────────── */
  .tokoh-img {
    height: 220px;
    background-size: cover;
    background-position: center top;
  }

  /* ── Label foto: text tidak overflow ──────────────── */
  .tokoh-img-label {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }

  /* ── Tokoh body padding ────────────────────────────── */
  .tokoh-body {
    padding: 1rem;
  }

  /* ── Tokoh name font size ──────────────────────────── */
  .tokoh-name {
    font-size: 1.15rem;
  }

  /* ── Tokoh desc font size ──────────────────────────── */
  .tokoh-desc {
    font-size: 0.85rem;
    line-height: 1.65;
  }

  /* ── Tokoh role letter spacing diperkecil ──────────── */
  .tokoh-role {
    font-size: 0.65rem;
    letter-spacing: 1.5px;
  }

  /* ── Story grid: single column ────────────────────── */
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* ── Story image di mobile: jangan terlalu tinggi ──── */
  .story-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--border-radius);
  }

  /* ── Story image label tidak overflow ──────────────── */
  .story-caption {
    font-size: 0.75rem;
    white-space: normal;
    word-break: break-word;
  }

  /* ── Timeline cards: full width ───────────────────── */
  .timeline-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* ── WH grid: 1 kolom ─────────────────────────────── */
  .wh-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* ── Silsilah grid: 1 kolom ───────────────────────── */
  .silsilah-grid {
    grid-template-columns: 1fr;
  }

  /* ── Overflow prevention global ───────────────────── */
  .container {
    padding: 0 1rem;
    overflow-x: hidden;
  }

  /* ── Section padding dikurangi ─────────────────────── */
  section {
    padding: clamp(40px, 8vw, 80px) 0;
  }

  /* ── Bab label text ──────────────────────────────────── */
  .bab-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }

  /* ── Section title h2 ──────────────────────────────── */
  .section-title h2 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  /* ── Section subtitle ──────────────────────────────── */
  .section-subtitle {
    font-size: 0.92rem;
    padding: 0 0.5rem;
  }

  /* ── Highlight blockquote ──────────────────────────── */
  .highlight {
    padding: 1rem 1.2rem;
    font-size: 0.92rem;
  }

  /* ── Majapahit box padding ─────────────────────────── */
  .majapahit-box {
    padding: 1.5rem;
  }

  /* ── Modal fix: full screen di hp ─────────────────── */
  .modal-content {
    width: 95vw;
    max-height: 90vh;
    margin: 5vh auto 0;
    border-radius: 12px 12px 0 0;
  }

  /* ── Selengkapnya button full width di hp ──────────── */
  .selengkapnya-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* ── Gajah Mada section ────────────────────────────── */
  .gajah-mada-grid {
    grid-template-columns: 1fr;
  }

  /* ── Inline video wrapper ──────────────────────────── */
  [style*="padding-bottom:56.25%"] {
    margin-bottom: 1rem !important;
  }

  /* ── Fact badge readable at small size ─────────────── */
  .fact-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
  }
}

/* ── 768px tablet fixes juga ─────────────────────────── */
@media (max-width: 768px) {

  /* Tokoh grid: max 2 col di tablet, 1 col di hp */
  .tokoh-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  }

  /* Story grid */
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Story image */
  .story-img img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
  }
}


/* ============================================================
   BOOK PANDUAN COMPONENT - Integrated
   ============================================================ */

/* Book Section */
#buku-panduan {
  background: linear-gradient(160deg, #f5efe6 0%, #e8dfd1 50%, #f0e8d8 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

#buku-panduan::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

#buku-panduan .section-title h2 {
  color: var(--ocean-blue);
}

#buku-panduan .section-title h2::after {
  background: var(--gold);
}

#buku-panduan .section-subtitle {
  color: var(--terracotta);
}

/* Book Container */
.book-container {
  max-width: 1100px;
  margin: 0 auto;
  perspective: 2000px;
  position: relative;
  z-index: 2;
}

/* The Book */
.book {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 600px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Book Cover (Front) */
.book-cover-front {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #1A3A5C 0%, #0d2040 50%, #1A3A5C 100%);
  border-radius: 4px 12px 12px 4px;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  cursor: pointer;
  box-shadow:
    inset -3px 0 10px rgba(0, 0, 0, 0.3),
    5px 5px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.book-cover-front::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12px;
  background: linear-gradient(90deg, #8B6914 0%, #c8a97e 40%, #a07830 60%, #8B6914 100%);
  border-radius: 4px 0 0 4px;
}

.cover-design {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.cover-border {
  position: absolute;
  inset: 15px;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  pointer-events: none;
}

.cover-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.cover-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.cover-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.cover-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 1rem;
}

.cover-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.8;
}

.cover-hint {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  animation: pulse-hint 2s ease-in-out infinite;
}

.cover-hint i {
  font-size: 1rem;
}

@keyframes pulse-hint {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Book Cover (Back) */
.book-cover-back {
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #1A3A5C 0%, #0d2040 50%, #1A3A5C 100%);
  border-radius: 12px 4px 4px 12px;
  transform-origin: right center;
  transform: rotateY(180deg);
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-back::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 12px;
  background: linear-gradient(90deg, #8B6914 0%, #c8a97e 40%, #a07830 60%, #8B6914 100%);
  border-radius: 0 4px 4px 0;
}

.cover-back-design {
  text-align: center;
  padding: 2rem;
}

.back-pattern {
  width: 80px;
  height: 80px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-pattern::after {
  content: '☸';
  font-size: 2rem;
  color: var(--gold);
}

.back-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* Book Pages */
.book-page {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: #fdf6e9;
  overflow: hidden;
}

.book-page-left {
  left: 0;
  border-radius: 4px 0 0 4px;
  box-shadow: inset -8px 0 20px rgba(0, 0, 0, 0.08);
  background: linear-gradient(to right, #fdf6e9 95%, #f0e8d8 100%);
}

.book-page-right {
  right: 0;
  border-radius: 0 4px 4px 0;
  box-shadow: inset 8px 0 20px rgba(0, 0, 0, 0.08);
  background: linear-gradient(to left, #fdf6e9 95%, #f0e8d8 100%);
}

.page-inner {
  padding: 1.5rem;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.page-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 600;
  min-width: 30px;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ocean-blue);
  font-weight: 500;
}

.page-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  margin: 0.8rem 0;
}

/* Photo Grids */
.photo-grid-left,
.photo-grid-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.photo-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.photo-item:hover img {
  transform: scale(1.1);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 0.4rem 0.6rem;
  text-align: center;
}

.photo-caption span {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Book Spine */
.book-spine {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, #8B6914 0%, #c8a97e 30%, #a07830 50%, #c8a97e 70%, #8B6914 100%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
}

.book-spine:hover {
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

.spine-line {
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
}

.spine-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.3em;
  font-weight: 600;
}

/* Book Opening States */
.book-opening .book-cover-front {
  animation: openCover 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.book-opening .book-cover-back {
  animation: openBackCover 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.book-opened .book-cover-front {
  transform: rotateY(-180deg);
}

.book-opened .book-cover-back {
  transform: rotateY(0deg);
}

.book-closing .book-cover-front {
  animation: closeCover 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.book-closing .book-cover-back {
  animation: closeBackCover 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes openCover {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(-180deg);
  }
}

@keyframes openBackCover {
  0% {
    transform: rotateY(180deg);
  }

  100% {
    transform: rotateY(0deg);
  }
}

@keyframes closeCover {
  0% {
    transform: rotateY(-180deg);
  }

  100% {
    transform: rotateY(0deg);
  }
}

@keyframes closeBackCover {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(180deg);
  }
}

/* Book opened shadow effect */
.book-opened {
  transform: translateX(-5%);
}

.book-opened .book-page-left {
  box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.15);
}

.book-opened .book-page-right {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.15);
}

/* Navigation Buttons */
.book-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.book-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
}

.book-nav-btn i {
  font-size: 1.1rem;
}

.book-nav-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.btn-pariwisata {
  background: linear-gradient(135deg, #1A3A5C, #0d2040);
  color: white;
}

.btn-pariwisata:hover {
  background: linear-gradient(135deg, #0d2040, #1A3A5C);
  border-color: var(--gold);
}

.btn-kuliner {
  background: linear-gradient(135deg, #C4693A, #a94f2e);
  color: white;
}

.btn-kuliner:hover {
  background: linear-gradient(135deg, #a94f2e, #C4693A);
  border-color: var(--gold);
}

.btn-sejarah {
  background: linear-gradient(135deg, #2D5A27, #1a3a1a);
  color: white;
}

.btn-sejarah:hover {
  background: linear-gradient(135deg, #1a3a1a, #2D5A27);
  border-color: var(--gold);
}

.btn-budaya {
  background: linear-gradient(135deg, #8B6914, #6b4c11);
  color: white;
}

.btn-budaya:hover {
  background: linear-gradient(135deg, #6b4c11, #8B6914);
  border-color: var(--gold);
}

/* Paper texture effect */
.book-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

/* Page corner fold effect */
.book-page-left::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(225deg, #e8dfd1 50%, transparent 50%);
  border-radius: 0 0 0 8px;
  z-index: 3;
}

.book-page-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #e8dfd1 50%, transparent 50%);
  border-radius: 0 0 8px 0;
  z-index: 3;
}

/* Line pattern on pages (notebook lines) */
.page-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent,
      transparent 28px,
      rgba(212, 175, 55, 0.08) 28px,
      rgba(212, 175, 55, 0.08) 29px);
  pointer-events: none;
  z-index: 0;
}

.page-inner>* {
  position: relative;
  z-index: 1;
}


/* Mobile hint - shown only on small screens */
.cover-hint-mobile {
  display: none;
  margin-top: 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  animation: bounce-down 2s ease-in-out infinite;
}

.cover-hint-mobile i {
  font-size: 0.9rem;
}

@keyframes bounce-down {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

@media (max-width: 768px) {
  .cover-hint {
    display: none !important;
  }

  .cover-hint-mobile {
    display: flex !important;
  }
}


/* Page description text */
.page-desc {
  font-size: 0.85rem;
  color: var(--charcoal);
  line-height: 1.6;
  margin: 0.5rem 0;
  padding: 0.5rem 0.8rem;
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Ensure book starts CLOSED */
.book {
  /* Default state: closed */
}

.book-opened .book-cover-front {
  transform: rotateY(-180deg);
}

.book-opened .book-cover-back {
  transform: rotateY(0deg);
}

/* Mobile: book pages hidden by default, shown when opened */
@media (max-width: 992px) {

  .book-page-left,
  .book-page-right {
    display: none;
  }

  .book-opened .book-page-left,
  .book-opened .book-page-right {
    display: block;
  }

  .book-opened .book-cover-front {
    display: none !important;
    opacity: 0;
    visibility: hidden;
  }

  .page-desc {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .page-desc {
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0.4rem 0;
  }
}

@media (max-width: 480px) {
  .page-desc {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    border-left-width: 2px;
  }
}

/* ============================================================
   RESPONSIVE - Book Component (MOBILE FIRST REWRITE)
   ============================================================ */

/* ── TABLET (max-width: 992px) ── */
@media (max-width: 992px) {
  #buku-panduan {
    padding: 60px 0;
  }

  .book {
    height: auto;
    min-height: unset;
  }

  .book-cover-front {
    position: relative;
    width: 100%;
    left: 0;
    min-height: 280px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transform: none !important;
    backface-visibility: visible;
  }

  .book-cover-front::before {
    display: none;
  }

  .cover-design {
    padding: 1.5rem;
  }

  .cover-icon {
    font-size: 3rem;
  }

  .cover-title {
    font-size: 1.4rem;
  }

  .cover-subtitle {
    font-size: 0.85rem;
  }

  .book-cover-back {
    display: none;
  }

  .book-page-left,
  .book-page-right {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .book-page-left {
    background: linear-gradient(to bottom, #fdf6e9 95%, #f0e8d8 100%);
  }

  .book-page-right {
    background: linear-gradient(to bottom, #fdf6e9 95%, #f0e8d8 100%);
  }

  .book-spine {
    display: none;
  }

  .book-opened,
  .book-opening,
  .book-closing {
    transform: none !important;
  }

  .book-opened .book-cover-front,
  .book-opening .book-cover-front,
  .book-closing .book-cover-front {
    display: none;
  }

  .page-inner {
    padding: 1.2rem;
  }

  .page-header {
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
  }

  .page-num {
    font-size: 1.3rem;
  }

  .page-title {
    font-size: 1rem;
  }

  .photo-grid-left,
  .photo-grid-right {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .photo-item {
    aspect-ratio: 4/3;
    border-radius: 10px;
  }

  .photo-caption span {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .page-divider {
    margin: 0.6rem 0;
  }

  .book-nav-buttons {
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding: 0 0.5rem;
  }

  .book-nav-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 25px;
  }

  .book-nav-btn i {
    font-size: 1rem;
  }
}

/* ── MOBILE (max-width: 768px) ── */
@media (max-width: 768px) {
  #buku-panduan {
    padding: 40px 0;
  }

  #buku-panduan .section-title {
    margin-bottom: 2rem;
  }

  #buku-panduan .section-title h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .book-container {
    padding: 0 0.5rem;
  }

  .book {
    height: auto;
  }

  .book-cover-front {
    min-height: 240px;
    border-radius: 14px;
    margin-bottom: 1rem;
  }

  .cover-design {
    padding: 1.2rem;
  }

  .cover-border {
    inset: 10px;
  }

  .cover-icon {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
  }

  .cover-title {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  .cover-subtitle {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .cover-line {
    width: 40px;
    margin-bottom: 0.6rem;
  }

  .cover-year {
    font-size: 1rem;
  }

  .cover-hint {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  .book-page-left,
  .book-page-right {
    border-radius: 14px;
    margin-bottom: 0.8rem;
  }

  .page-inner {
    padding: 1rem;
  }

  .page-header {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
  }

  .page-num {
    font-size: 1.1rem;
    min-width: 24px;
  }

  .page-title {
    font-size: 0.9rem;
  }

  .photo-grid-left,
  .photo-grid-right {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
  }

  .photo-caption {
    padding: 0.3rem;
  }

  .photo-caption span {
    font-size: 0.7rem;
  }

  .page-divider {
    margin: 0.5rem 0;
  }

  .book-nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding: 0;
  }

  .book-nav-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    justify-content: center;
  }

  .book-nav-btn i {
    font-size: 0.9rem;
  }
}

/* ── SMALL MOBILE (max-width: 480px) ── */
@media (max-width: 480px) {
  #buku-panduan {
    padding: 30px 0;
  }

  #buku-panduan .container {
    padding: 0 0.8rem;
  }

  .book-cover-front {
    min-height: 200px;
    border-radius: 12px;
  }

  .cover-icon {
    font-size: 2rem;
  }

  .cover-title {
    font-size: 1.1rem;
  }

  .cover-subtitle {
    font-size: 0.75rem;
  }

  .cover-hint {
    font-size: 0.7rem;
  }

  .book-page-left,
  .book-page-right {
    border-radius: 12px;
  }

  .page-inner {
    padding: 0.8rem;
  }

  .page-num {
    font-size: 1rem;
  }

  .page-title {
    font-size: 0.85rem;
  }

  .photo-grid-left,
  .photo-grid-right {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .photo-item {
    border-radius: 6px;
  }

  .photo-caption span {
    font-size: 0.65rem;
  }

  .book-nav-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .book-nav-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 18px;
  }
}

/* ── EXTRA SMALL (max-width: 360px) ── */
@media (max-width: 360px) {
  .book-cover-front {
    min-height: 180px;
  }

  .cover-title {
    font-size: 1rem;
  }

  .photo-grid-left,
  .photo-grid-right {
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
  }

  .photo-caption span {
    font-size: 0.6rem;
  }
}


/* Badung Keris v3.0 Styles will be injected dynamically */