/* ==========================================================================
   BUDDHISM SHOWCASE WEB EXPERIENCE (DHARMA)
   Design System, 3D Page Flip Engine & Responsive Zero-Scroll Layout
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Sacred Color Palette */
  --color-primary: #8C2D19;        /* Tibetan Maroon / Deep Crimson */
  --color-primary-dark: #661f10;
  --color-primary-light: #ab3a22;
  --color-gold: #C59B27;           /* Ochre Gold */
  --color-gold-light: #D4A373;     /* Muted Saffron */
  --color-gold-glow: rgba(197, 155, 39, 0.25);
  --color-bg-parchment: #FAF7F2;   /* Warm Lotus Parchment */
  --color-bg-parchment-alt: #F3ECE1;
  --color-text-charcoal: #2C2A29;  /* Charcoal Slate */
  --color-text-muted: #6B6560;     /* Incense Gray */
  --color-border-subtle: rgba(140, 45, 25, 0.15);
  --color-card-surface: rgba(255, 255, 255, 0.88);
  --color-card-border: rgba(197, 155, 39, 0.35);

  /* Typography */
  --font-serif: 'Cinzel', 'Cormorant Garamond', serif;
  --font-narrative: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Glassmorphism & Depth */
  --glass-surface: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(197, 155, 39, 0.28);
  --glass-blur: blur(10px);
  --shadow-subtle: 0 4px 20px rgba(44, 42, 41, 0.06);
  --shadow-elevated: 0 12px 36px rgba(44, 42, 41, 0.1);
  --shadow-gold: 0 4px 24px rgba(197, 155, 39, 0.2);

  /* Layout Constants */
  --header-height: 54px;
  --footer-nav-height: 48px;

  /* Motion & 3D Page Flip Transitions (Smoother Majestic Page Flip) */
  --ease-page-flip: cubic-bezier(0.35, 0.05, 0.15, 1);
  --duration-flip: 1100ms;
}

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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden; /* Absolute Zero-Scroll Architecture */
  background-color: var(--color-bg-parchment);
  color: var(--color-text-charcoal);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* Background Atmospheric Noise Texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--color-gold-glow) 0.75px, transparent 0.75px);
  background-size: 28px 28px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

/* --- Top Sacred Header Bar --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--header-height);
  padding: 0 clamp(12px, 3.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.brand-symbol {
  width: clamp(24px, 2.8vw, 30px);
  height: clamp(24px, 2.8vw, 30px);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s var(--ease-page-flip);
}

.brand-wrapper:hover .brand-symbol {
  transform: rotate(45deg);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: clamp(0.92rem, 1.35vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-primary);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: clamp(0.62rem, 0.72vw, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
}

/* Header Category Pills (Desktop) */
.header-nav-pills {
  display: none;
  list-style: none;
  gap: 5px;
}

@media (min-width: 900px) {
  .header-nav-pills {
    display: flex;
  }
}

.nav-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-pill-btn:hover {
  color: var(--color-primary);
  border-color: var(--glass-border);
  background: rgba(140, 45, 25, 0.04);
}

.nav-pill-btn.active {
  color: #FAF7F2;
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(140, 45, 25, 0.3);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-counter-badge {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  background: rgba(140, 45, 25, 0.08);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(140, 45, 25, 0.18);
}

.header-icon-btn {
  width: clamp(30px, 3vw, 36px);
  height: clamp(30px, 3vw, 36px);
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-page-flip);
  outline: none;
}

.header-icon-btn:hover {
  background: #ffffff;
  border-color: var(--color-gold);
  color: var(--color-gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.header-icon-btn.active-sound {
  background: var(--color-primary);
  color: #FAF7F2;
  border-color: var(--color-primary);
}

/* ==========================================================================
   3D PAGE FLIP CAROUSEL STAGE (Zero Scroll SPA)
   ========================================================================== */
.carousel-viewport {
  position: relative;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  perspective: 2200px; /* Enhanced 3D perspective depth */
  perspective-origin: 50% 50%;
  background: var(--color-bg-parchment);
  z-index: 10;
}

/* Base Slide in 3D Stack */
.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  padding-top: calc(var(--header-height) + clamp(4px, 1.2vh, 14px));
  padding-bottom: calc(var(--footer-nav-height) + clamp(6px, 1.5vh, 18px));
  padding-left: clamp(12px, 4vw, 56px);
  padding-right: clamp(12px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform var(--duration-flip) var(--ease-page-flip),
              opacity var(--duration-flip) var(--ease-page-flip),
              filter var(--duration-flip) ease;
  will-change: transform, opacity, filter;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Slide Resting in Center */
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: rotateY(0deg) translateZ(0);
  filter: brightness(1);
  z-index: 10;
}

/* --------------------------------------------------------------------------
   4.1 NEXT NAVIGATION: PAGE FLIP RIGHT TO LEFT
   -------------------------------------------------------------------------- */
/* Outgoing page flips away to the left */
.carousel-slide.flip-out-left {
  transform-origin: left center !important;
  transform: rotateY(-90deg) scale(0.96) !important;
  opacity: 0 !important;
  filter: brightness(0.55) drop-shadow(-24px 0 30px rgba(44, 42, 41, 0.5)) !important;
  z-index: 15 !important;
  visibility: visible !important;
}

/* Incoming page starts from the right and flips into center */
.carousel-slide.flip-in-right {
  transform-origin: right center !important;
  transform: rotateY(90deg) scale(0.96) !important;
  opacity: 0 !important;
  filter: brightness(0.65) drop-shadow(24px 0 30px rgba(44, 42, 41, 0.4)) !important;
  z-index: 20 !important;
  visibility: visible !important;
}

/* --------------------------------------------------------------------------
   4.2 PREVIOUS NAVIGATION: PAGE FLIP LEFT TO RIGHT
   -------------------------------------------------------------------------- */
/* Outgoing page flips away to the right */
.carousel-slide.flip-out-right {
  transform-origin: right center !important;
  transform: rotateY(90deg) scale(0.96) !important;
  opacity: 0 !important;
  filter: brightness(0.55) drop-shadow(24px 0 30px rgba(44, 42, 41, 0.5)) !important;
  z-index: 15 !important;
  visibility: visible !important;
}

/* Incoming page starts from the left and flips into center */
.carousel-slide.flip-in-left {
  transform-origin: left center !important;
  transform: rotateY(-90deg) scale(0.96) !important;
  opacity: 0 !important;
  filter: brightness(0.65) drop-shadow(-24px 0 30px rgba(44, 42, 41, 0.4)) !important;
  z-index: 20 !important;
  visibility: visible !important;
}

/* Slide Backdrop Layer */
.slide-bg-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.slide-bg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) brightness(0.92);
}

.slide-bg-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(250, 247, 242, 0.94) 0%,
    rgba(250, 247, 242, 0.86) 50%,
    rgba(250, 247, 242, 0.95) 100%
  );
}

.slide-bg-media.subtle-overlay::after {
  background: linear-gradient(
    to bottom,
    rgba(250, 247, 242, 0.88) 0%,
    rgba(250, 247, 242, 0.74) 40%,
    rgba(250, 247, 242, 0.95) 100%
  );
}

/* --- Slide Content Architecture --- */
.slide-content-container {
  width: 100%;
  max-width: 1240px;
  max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* Slide Headers */
.slide-header-block {
  text-align: center;
  margin-bottom: clamp(6px, 1.4vh, 16px);
  flex-shrink: 0;
}

.slide-category-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(0.65rem, 0.8vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 2px;
}

.slide-category-label::before,
.slide-category-label::after {
  content: '';
  width: 14px;
  height: 1px;
  background-color: var(--color-gold);
}

.slide-main-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.3vw, 2.1rem);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  line-height: 1.15;
}

.slide-subtitle {
  font-family: var(--font-narrative);
  font-style: italic;
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  color: var(--color-text-muted);
  max-width: 720px;
  margin: 2px auto 0;
  line-height: 1.25;
}

/* ==========================================================================
   SLIDE 1: INTRODUCTION & THE MIDDLE WAY (BUDDHA ON TOP & CENTERED NARRATIVE)
   ========================================================================== */
#slide-1 .slide-content-container {
  max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 16px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) transparent;
  padding-bottom: 12px;
}

.intro-layout-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vh, 16px);
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

/* Authentic Buddha Hero Card - Placed on Top with Bigger Showcase Area (Request 4) */
.intro-buddha-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 2px solid var(--color-gold);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(44, 42, 41, 0.14), 0 0 24px var(--color-gold-glow);
  width: 100%;
  max-width: 980px;
  height: clamp(230px, 34vh, 360px);
  max-height: clamp(230px, 34vh, 360px);
  position: relative;
}

.intro-buddha-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.6s ease;
}

.intro-buddha-card:hover img {
  transform: scale(1.02);
}

.intro-buddha-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(20, 16, 14, 0.92) 0%, rgba(20, 16, 14, 0.65) 70%, transparent 100%);
  padding: 10px 18px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}

.caption-tag {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  color: #FFE5A3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.caption-quote {
  font-family: var(--font-narrative);
  font-style: italic;
  font-size: clamp(0.78rem, 0.98vw, 0.92rem);
  color: #FAF7F2;
  line-height: 1.25;
}

.intro-text-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: clamp(10px, 1.5vw, 16px) clamp(14px, 2vw, 24px);
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
}

.intro-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.intro-badge {
  display: inline-block;
  background: rgba(197, 155, 39, 0.14);
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(197, 155, 39, 0.3);
}

.intro-narrative {
  font-family: var(--font-narrative);
  font-size: clamp(0.92rem, 1.15vw, 1.02rem);
  line-height: 1.45;
  color: var(--color-text-charcoal);
  margin-bottom: 8px;
  text-align: center;
}

.intro-narrative p + p {
  margin-top: 6px;
}

.intro-sutta-quote {
  background: rgba(140, 45, 25, 0.05);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 8px 8px 0;
  padding: 6px 12px;
  font-family: var(--font-narrative);
  font-style: italic;
  font-size: clamp(0.8rem, 0.95vw, 0.88rem);
  color: var(--color-primary);
  line-height: 1.35;
  margin: 6px 0 8px;
  text-align: left;
}

.intro-sutta-quote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-top: 2px;
}

.middle-way-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 10px;
  width: 100%;
}

.triptych-item {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(197, 155, 39, 0.28);
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
}

.triptych-term {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.triptych-desc {
  font-size: 0.66rem;
  color: var(--color-text-muted);
  line-height: 1.25;
}

.intro-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* ==========================================================================
   SLIDE 2: THE FOUR NOBLE TRUTHS (THEME-ALIGNED SACRED SYMBOLS)
   ========================================================================== */
.noble-truths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(8px, 1.4vw, 16px);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 680px) {
  .noble-truths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .noble-truths-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.truth-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: clamp(10px, 1.4vw, 18px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-page-flip);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-subtle);
}

.truth-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
  background: #ffffff;
}

.truth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.truth-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.truth-number {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.95;
}

.truth-pali {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  font-weight: 700;
  color: var(--color-text-charcoal);
}

.truth-divider {
  color: var(--color-gold);
  font-weight: 600;
  opacity: 0.6;
  font-size: 0.8rem;
}

.truth-english {
  font-size: clamp(0.66rem, 0.78vw, 0.75rem);
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Correct Theme-Aligned Symbols (Request 2) */
.truth-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(197, 155, 39, 0.12);
  border: 1.5px solid var(--color-gold);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(197, 155, 39, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.truth-card:hover .truth-icon-box {
  background: var(--color-primary);
  color: #FAF7F2;
  border-color: var(--color-primary);
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 4px 14px rgba(140, 45, 25, 0.35);
}

.truth-icon-box svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.truth-body {
  font-size: clamp(0.72rem, 0.85vw, 0.8rem);
  color: var(--color-text-muted);
  line-height: 1.38;
  margin-bottom: 8px;
}

.truth-action-pill {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(140, 45, 25, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(140, 45, 25, 0.2);
  text-align: center;
  margin-top: auto;
}

/* ==========================================================================
   SLIDE 3: THE NOBLE EIGHTFOLD PATH (CONTINUOUS ROTATING DHARMACHAKRA)
   ========================================================================== */
.eightfold-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(10px, 1.8vw, 24px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 860px) {
  .eightfold-layout {
    grid-template-columns: 1fr 1.25fr;
  }
}

.dharmachakra-interactive-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Continuous Turning of the Wheel of Dharma (Request 3) */
@keyframes dharmaWheelSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.dharmachakra-interactive {
  width: clamp(140px, 22vw, 210px);
  height: clamp(140px, 22vw, 210px);
  color: var(--color-primary);
  cursor: pointer;
  filter: drop-shadow(0 8px 16px rgba(140, 45, 25, 0.15));
  animation: dharmaWheelSpin 26s linear infinite;
  transform-origin: 50% 50%;
  transition: filter 0.3s ease;
}

.dharmachakra-interactive:hover {
  filter: drop-shadow(0 10px 24px rgba(197, 155, 39, 0.5));
}

.wheel-hint {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* 3 Pillars & Dynamic Spotlight Container */
.eightfold-pillars-container {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.1vh, 10px);
  width: 100%;
}

/* Categorical Pillar Cards: Prajñā (Wisdom), Śīla (Ethical Conduct), Samādhi (Mental Discipline) */
/* Unified Site Color Theme: Tibetan Maroon (#8C2D19), Ochre Gold (#C59B27), Warm Parchment (#FAF7F2) */
.pillar-group-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-left: 3.5px solid var(--color-primary);
  border-radius: 12px;
  padding: clamp(8px, 1.2vw, 12px) clamp(10px, 1.4vw, 16px);
  box-shadow: var(--shadow-subtle);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.pillar-group-card:hover {
  border-left-color: var(--color-gold);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(140, 45, 25, 0.08);
}

.pillar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pillar-title {
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.04em;
}

.pillar-title svg {
  color: var(--color-gold);
  stroke: var(--color-gold);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.pillar-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(140, 45, 25, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(140, 45, 25, 0.2);
  padding: 2px 7px;
  border-radius: 8px;
}

.pillar-paths-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.path-tag-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.path-tag-btn .path-idx {
  color: var(--color-gold);
  font-weight: 700;
  margin-right: 4px;
}

.path-tag-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(140, 45, 25, 0.05);
}

.path-tag-btn.active {
  background: var(--color-primary) !important;
  color: #FAF7F2 !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 3px 10px rgba(140, 45, 25, 0.35);
  transform: translateY(-1px);
}

.path-tag-btn.active .path-idx {
  color: #FFE5A3 !important;
}

/* ==========================================================================
   DYNAMIC SPOTLIGHT: HIGH-VISIBILITY HIGHLIGHTED TEACHING CONTENT (Request 3)
   ========================================================================== */
.active-path-spotlight,
.path-spotlight-display {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 247, 242, 0.98) 100%);
  border: 1.5px solid var(--color-gold);
  border-left: 5px solid var(--color-primary);
  border-radius: 12px;
  padding: clamp(10px, 1.4vw, 15px) clamp(12px, 1.6vw, 18px);
  margin-top: 6px;
  box-shadow: 0 6px 20px rgba(197, 155, 39, 0.22), 0 2px 8px rgba(140, 45, 25, 0.08);
  position: relative;
  transition: all 0.3s ease;
}

.active-path-spotlight::before {
  content: 'Currently Selected';
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(140, 45, 25, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(140, 45, 25, 0.18);
}

#spotlightTitle,
.path-spotlight-title {
  font-family: var(--font-serif);
  font-size: clamp(0.96rem, 1.25vw, 1.15rem);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
  padding-right: 90px;
}

#spotlightPali,
.path-spotlight-pali {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-gold);
  font-style: italic;
  margin-bottom: 6px;
  display: block;
}

#spotlightDesc,
.path-spotlight-desc {
  font-size: clamp(0.76rem, 0.92vw, 0.85rem);
  line-height: 1.42;
  color: var(--color-text-charcoal);
  font-weight: 500;
}

@keyframes spotlightPulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 155, 39, 0.7);
    border-color: var(--color-primary);
  }
  50% {
    box-shadow: 0 0 18px 4px rgba(197, 155, 39, 0.45);
    border-color: var(--color-gold);
  }
  100% {
    box-shadow: 0 6px 20px rgba(197, 155, 39, 0.22);
    border-color: var(--color-gold);
  }
}

.active-path-spotlight.highlight-pulse {
  animation: spotlightPulseAnim 0.6s ease-out;
}

/* ==========================================================================
   SLIDE 4: MINDFULNESS & MEDITATION (MULTI-PRACTICE BREATH PACER)
   ========================================================================== */
.meditation-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(10px, 1.8vw, 24px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 860px) {
  .meditation-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.breathwork-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: clamp(12px, 2vw, 22px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-subtle);
}

.breathwork-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(140, 45, 25, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* Multi-Practice Selection Tabs (Request 4) */
.breath-practice-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
  width: 100%;
}

.practice-pill-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-border);
  color: var(--color-text-charcoal);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.practice-pill-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-primary);
  background: #ffffff;
}

.practice-pill-btn.active {
  background: var(--color-primary);
  color: #FAF7F2;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(140, 45, 25, 0.25);
}

.breathing-orb-container {
  position: relative;
  width: clamp(110px, 16vw, 150px);
  height: clamp(110px, 16vw, 150px);
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-orb {
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--color-gold-light), var(--color-primary));
  box-shadow: 0 0 30px rgba(197, 155, 39, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF7F2;
  font-family: var(--font-serif);
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
}

.breathing-ring-outer {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--color-gold);
  border-radius: 50%;
  opacity: 0.5;
  transition: transform 4s ease-in-out;
}

/* Breathing Orb Animation Cycles */
.breathing-orb.inhale {
  transform: scale(1.35);
  box-shadow: 0 0 45px rgba(197, 155, 39, 0.7);
}

.breathing-ring-outer.inhale {
  transform: scale(1.15) rotate(90deg);
}

.breathing-orb.hold {
  transform: scale(1.35);
  box-shadow: 0 0 40px rgba(140, 45, 25, 0.6);
}

.breathing-orb.exhale {
  transform: scale(0.85);
  box-shadow: 0 0 15px rgba(197, 155, 39, 0.2);
}

.breathing-ring-outer.exhale {
  transform: scale(0.9) rotate(-90deg);
}

.breathing-orb.rest {
  transform: scale(0.85);
  box-shadow: 0 0 15px rgba(140, 45, 25, 0.2);
}

.breath-phase-text {
  font-family: var(--font-serif);
  font-size: clamp(0.92rem, 1.2vw, 1.1rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 4px;
}

.breath-timer-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.breath-control-btn {
  background: var(--color-primary);
  color: #FAF7F2;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(140, 45, 25, 0.3);
  transition: all 0.25s ease;
}

.breath-control-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.breath-control-btn.active {
  background: var(--color-gold);
  color: #2C2A29;
}

/* Practices Container */
.practices-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.practice-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow-subtle);
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.practice-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
}

.practice-type {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gold);
  letter-spacing: 0.06em;
}

.practice-text {
  font-size: 0.72rem;
  color: var(--color-text-charcoal);
  line-height: 1.35;
}

.zen-quote-banner {
  background: rgba(140, 45, 25, 0.05);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 8px 8px 0;
  padding: 6px 10px;
  font-family: var(--font-narrative);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.zen-quote-banner cite {
  display: block;
  font-style: normal;
  font-family: var(--font-serif);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-top: 2px;
}

/* ==========================================================================
   SLIDE 5: TEACHINGS & DOCUMENTARY (MAXIMUM SPACE THEATER VIDEO PLAYER - REQUEST 5)
   ========================================================================== */
.video-showcase-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  gap: 8px;
}

.video-theater-wrapper {
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: clamp(240px, 54vh, 520px);
  border: 2px solid rgba(197, 155, 39, 0.4);
  box-shadow: 0 16px 44px rgba(44, 42, 41, 0.28), 0 0 24px var(--color-gold-glow);
}

.video-theater-wrapper video,
.video-theater-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-theater-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 14px;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
}

.video-title-zone {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-title-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(140, 45, 25, 0.1);
  color: var(--color-primary);
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid rgba(140, 45, 25, 0.2);
}

.video-theater-heading {
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  font-weight: 700;
  color: var(--color-primary);
}

.video-source-toggle {
  display: flex;
  gap: 6px;
}

.source-toggle-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-charcoal);
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.source-toggle-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-primary);
}

.source-toggle-btn.active {
  background: var(--color-primary);
  color: #FAF7F2;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(140, 45, 25, 0.25);
}

/* ==========================================================================
   SLIDE 7: ACADEMIC PROJECT ATTRIBUTION (GARDEN CITY UNIVERSITY - REQUEST 6)
   ========================================================================== */
.project-credits-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  gap: clamp(8px, 1.4vh, 14px);
}

.project-context-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: clamp(10px, 1.5vw, 16px);
  text-align: center;
  width: 100%;
  box-shadow: var(--shadow-subtle);
}

.project-badge {
  display: inline-block;
  background: rgba(140, 45, 25, 0.1);
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(140, 45, 25, 0.25);
  margin-bottom: 6px;
}

.project-context-desc {
  font-family: var(--font-narrative);
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  color: var(--color-text-charcoal);
  line-height: 1.45;
  max-width: 780px;
  margin: 0 auto;
}

.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(8px, 1.2vw, 12px);
  width: 100%;
}

.student-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(197, 155, 39, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
}

.student-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-gold);
}

.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #FAF7F2;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(140, 45, 25, 0.3);
}

.student-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.student-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.75rem, 0.9vw, 0.85rem);
  color: var(--color-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.student-roll {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}

.student-branch {
  font-size: 0.62rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-actions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

/* ==========================================================================
   SLIDE 6: CORE VALUES & LIVING PHILOSOPHY (BRAHMAVIHARAS)
   ========================================================================== */
.brahmaviharas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(8px, 1.2vw, 14px);
  max-width: 1100px;
  margin: 0 auto 10px;
  width: 100%;
}

@media (min-width: 680px) {
  .brahmaviharas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .brahmaviharas-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.brahma-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: clamp(10px, 1.4vw, 16px);
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
}

.brahma-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-gold);
  background: #ffffff;
  box-shadow: var(--shadow-gold);
}

.brahma-card-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.brahma-number {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

.brahma-divider {
  color: var(--color-gold);
  font-weight: 600;
  opacity: 0.6;
}

.brahma-term {
  font-family: var(--font-serif);
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  font-weight: 700;
  color: var(--color-primary);
}

.brahma-translation {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  font-style: italic;
}

.brahma-desc {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* Concluding Call-to-Action & Sources Footer Area */
.closing-reflection-card {
  background: rgba(140, 45, 25, 0.05);
  border: 1px dashed var(--color-primary);
  border-radius: 12px;
  padding: clamp(8px, 1.2vw, 14px) clamp(12px, 2vw, 20px);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.closing-quote-text {
  font-family: var(--font-narrative);
  font-style: italic;
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  color: var(--color-primary);
  line-height: 1.3;
}

.closing-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.zen-btn-primary {
  background: var(--color-primary);
  color: #FAF7F2;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.zen-btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.zen-btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.zen-btn-secondary:hover {
  background: rgba(140, 45, 25, 0.08);
  border-color: var(--color-primary-dark);
}

/* --- Fixed Floating Navigation Arrows --- */
.nav-arrow-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(32px, 3.2vw, 42px);
  height: clamp(32px, 3.2vw, 42px);
  border-radius: 50%;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
  outline: none;
}

.nav-arrow-btn:hover {
  background: #ffffff;
  color: var(--color-gold);
  border-color: var(--color-gold);
  transform: translateY(-50%) scale(1.08);
  box-shadow: var(--shadow-gold);
}

.nav-arrow-prev {
  left: clamp(6px, 1.5vw, 20px);
}

.nav-arrow-next {
  right: clamp(6px, 1.5vw, 20px);
}

.nav-arrow-btn.disabled,
.nav-arrow-btn:disabled {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-50%) scale(0.8);
}

/* --- Bottom Centered Pagination Indicators --- */
.carousel-pagination-bar {
  position: fixed;
  bottom: clamp(8px, 1.5vh, 16px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 11px);
  padding: 4px 10px;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  z-index: 90;
  box-shadow: var(--shadow-subtle);
}

.pagination-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(140, 45, 25, 0.22);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.4s ease;
  outline: none;
}

.pagination-dot:hover {
  background: var(--color-gold);
  transform: scale(1.25);
}

.pagination-dot.active {
  width: 24px;
  border-radius: 8px;
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(140, 45, 25, 0.4);
}

.pagination-dot::after {
  content: attr(data-title);
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #2C2A29;
  color: #FAF7F2;
  font-size: 0.65rem;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.pagination-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal for Scholarly References & Canon */
.zen-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44, 42, 41, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.zen-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.zen-modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 80vh;
  overflow-y: auto;
  background: #FAF7F2;
  border: 1px solid var(--color-gold);
  border-radius: 14px;
  padding: clamp(14px, 2.2vw, 24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.zen-modal-backdrop.open .zen-modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--color-primary);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.modal-content-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-charcoal);
}

.modal-content-list li strong {
  color: var(--color-primary);
  display: block;
}

/* --------------------------------------------------------------------------
   Mobile & Small Screen Zero-Cutoff Layout Rules (Max-Width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 46px;
    --footer-nav-height: 42px;
  }

  .carousel-slide {
    padding-top: calc(var(--header-height) + 4px);
    padding-bottom: calc(var(--footer-nav-height) + 16px);
    padding-left: 10px;
    padding-right: 10px;
    justify-content: center;
  }

  .slide-header-block {
    margin-bottom: 4px;
  }

  .slide-category-label {
    font-size: 0.64rem;
    margin-bottom: 1px;
  }

  .slide-main-title {
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
    line-height: 1.15;
  }

  .slide-subtitle {
    display: none; /* Hide verbose subtitle on mobile to give space for content */
  }

  /* Slide 1 Mobile Layout (Preserves Buddha Image & Centered Narrative) */
  .intro-layout-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 440px;
    width: 100%;
  }

  .intro-buddha-card {
    width: 100%;
    max-height: 120px;
    border-radius: 12px;
  }

  .intro-buddha-card img {
    height: 120px;
    object-position: center 25%;
  }

  .intro-buddha-caption {
    display: none;
  }

  .intro-text-card {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .intro-badge-row {
    margin-bottom: 4px;
    justify-content: center;
  }

  .intro-badge {
    font-size: 0.6rem;
    padding: 2px 7px;
  }

  .intro-narrative {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 6px;
    text-align: center;
  }

  .intro-narrative p + p {
    margin-top: 4px;
  }

  .middle-way-triptych {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 4px 0 6px;
  }

  .triptych-item {
    padding: 3px 4px;
  }

  .triptych-term {
    font-size: 0.68rem;
    margin-bottom: 1px;
  }

  .triptych-desc {
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .intro-cta-row {
    margin-top: 6px;
    justify-content: center;
  }

  .zen-btn-primary,
  .zen-btn-secondary {
    padding: 5px 14px;
    font-size: 0.72rem;
  }

  /* Slide 2: Four Noble Truths Mobile (Full Untrimmed Content - Request 1) */
  #slide-2 .slide-content-container {
    max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    padding-bottom: 24px;
  }

  .noble-truths-grid {
    grid-template-columns: 1fr !important;
    gap: 5px;
    max-width: 460px;
    width: 100%;
  }

  .truth-card {
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
    border-left: 3.5px solid var(--color-primary);
    box-shadow: var(--shadow-subtle);
  }

  /* Single-line numbering, Pali heading, and English subtitle in heading line (Request 1) */
  .truth-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
  }

  .truth-title-row {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
  }

  .truth-number {
    font-size: 0.84rem;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-primary);
  }

  .truth-pali {
    font-size: 0.82rem;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-text-charcoal);
  }

  .truth-divider {
    color: var(--color-gold);
    font-weight: 600;
    opacity: 0.6;
    font-size: 0.7rem;
  }

  .truth-english {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
  }

  .truth-icon-box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .truth-icon-box svg {
    width: 13px;
    height: 13px;
  }

  /* Full untrimmed text (Request 1) */
  .truth-body {
    font-size: 0.67rem;
    line-height: 1.3;
    color: var(--color-text-charcoal);
    margin-bottom: 3px;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
  }

  .truth-action-pill {
    font-size: 0.56rem;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
  }

  /* Slide 3: Eightfold Path Mobile Sizing */
  .eightfold-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 440px;
    width: 100%;
  }

  .dharmachakra-interactive {
    width: 85px;
    height: 85px;
  }

  .wheel-hint {
    font-size: 0.58rem;
    margin-top: 2px;
  }

  #slide-3 .slide-content-container {
    max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    padding-bottom: 24px;
  }

  .eightfold-pillars-container {
    gap: 6px;
    width: 100%;
  }

  .pillar-group-card {
    padding: 6px 10px;
    border-radius: 10px;
    border-left: 3px solid var(--color-primary);
  }

  .pillar-title {
    font-size: 0.76rem;
  }

  .pillar-badge {
    font-size: 0.58rem;
    padding: 1px 6px;
  }

  .pillar-paths-list {
    gap: 4px;
  }

  .path-tag-btn {
    font-size: 0.62rem;
    padding: 3px 7px;
    border-radius: 8px;
  }

  .active-path-spotlight,
  .path-spotlight-display {
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 10px;
    border-left: 4px solid var(--color-primary);
  }

  .active-path-spotlight::before {
    top: 6px;
    right: 8px;
    font-size: 0.52rem;
    padding: 1px 5px;
  }

  #spotlightTitle,
  .path-spotlight-title {
    font-size: 0.82rem;
    padding-right: 70px;
  }

  #spotlightPali,
  .path-spotlight-pali {
    font-size: 0.66rem;
    margin-bottom: 3px;
  }

  #spotlightDesc,
  .path-spotlight-desc {
    font-size: 0.7rem;
    line-height: 1.32;
    margin-top: 2px;
  }

  /* Slide 4: Meditation & Guided Breathwork (Full Content & Dhammapada Quote - Request 2) */
  #slide-4 .slide-content-container {
    max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    padding-bottom: 24px;
  }

  .meditation-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 440px;
    width: 100%;
  }

  /* Put Breathwork Card FIRST at order: 1 so practice button is prominently clickable */
  .breathwork-card {
    order: 1;
    width: 100%;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .breathwork-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    margin-bottom: 4px;
  }

  .breath-practice-tabs {
    gap: 3px;
    margin-bottom: 4px;
  }

  .practice-pill-btn {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .breathing-orb-container {
    width: 75px;
    height: 75px;
    margin: 3px auto;
  }

  .breathing-orb {
    font-size: 0.68rem;
  }

  .breath-phase-text {
    font-size: 0.82rem;
    margin-top: 2px;
  }

  .breath-timer-hint {
    font-size: 0.64rem;
    margin-bottom: 6px;
  }

  /* Clear click target for Begin Practice button well above bottom navigation */
  .breath-control-btn {
    font-size: 0.72rem;
    padding: 5px 14px;
    position: relative;
    z-index: 20;
    box-shadow: 0 4px 14px rgba(140, 45, 25, 0.4);
  }

  /* Practices container: Full contents for Calm Abiding & Clear Insight (Request 2) */
  .practices-container {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .practice-card {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
    border-left: 3.5px solid var(--color-primary);
  }

  .practice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
  }

  .practice-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
  }

  .practice-type {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Full untrimmed text (Request 2) */
  .practice-text {
    font-size: 0.72rem;
    line-height: 1.38;
    color: var(--color-text-charcoal);
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
  }

  /* Canonical Dhammapada Quote Banner (Request 2) */
  .zen-quote-banner {
    display: block !important;
    background: rgba(140, 45, 25, 0.06);
    border-left: 3px solid var(--color-gold);
    border-radius: 0 10px 10px 0;
    padding: 8px 12px;
    margin-top: 2px;
    font-family: var(--font-narrative);
    font-style: italic;
    font-size: 0.75rem;
    color: var(--color-primary);
    line-height: 1.32;
  }

  .zen-quote-banner cite {
    display: block;
    font-style: normal;
    font-family: var(--font-serif);
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-top: 2px;
  }

  /* Slide 5: Video Theater Mobile Sizing */
  .video-showcase-layout {
    gap: 6px;
    max-width: 440px;
  }

  .video-theater-wrapper {
    max-height: clamp(170px, 28vh, 220px);
    border-radius: 12px;
  }

  .video-theater-bar {
    padding: 5px 10px;
    border-radius: 10px;
  }

  .video-theater-heading {
    font-size: 0.72rem;
  }

  .video-title-badge {
    font-size: 0.58rem;
  }

  .source-toggle-btn {
    font-size: 0.62rem;
    padding: 3px 8px;
  }

  /* Slide 6: Brahmaviharas Mobile (Full Content & Removed Bottom Buttons - Request 2) */
  #slide-6 .slide-content-container {
    max-height: calc(100dvh - var(--header-height) - var(--footer-nav-height) - 10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    padding-bottom: 24px;
  }

  .values-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 460px;
    width: 100%;
  }

  .brahmaviharas-grid {
    grid-template-columns: 1fr !important;
    gap: 6px;
    max-width: 460px;
    width: 100%;
    margin-bottom: 6px;
  }

  .brahma-card {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--glass-border);
    border-left: 3.5px solid var(--color-primary);
    box-shadow: var(--shadow-subtle);
  }

  /* Single-line number and term on mobile (1. Metta Loving-Kindness...) */
  .brahma-card-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 2px;
  }

  .brahma-number {
    font-size: 0.72rem;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.04em;
  }

  .brahma-divider {
    color: var(--color-gold);
    font-weight: 600;
    opacity: 0.6;
    font-size: 0.72rem;
  }

  .brahma-term {
    font-size: 0.82rem;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-primary);
  }

  .brahma-translation {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--color-text-muted);
    font-style: italic;
  }

  /* Full untrimmed text (Request 2) */
  .brahma-desc {
    font-size: 0.68rem;
    line-height: 1.32;
    color: var(--color-text-charcoal);
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
  }

  .closing-reflection-card {
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(140, 45, 25, 0.05);
    border-left: 3.5px solid var(--color-gold);
    max-width: 460px;
    width: 100%;
  }

  .closing-quote-text {
    font-size: 0.72rem;
    line-height: 1.3;
    font-style: italic;
    color: var(--color-primary);
  }

  .closing-quote-source {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-top: 2px;
    display: block;
  }

  /* Remove bottom buttons in mobile view (Request 2) */
  .closing-actions {
    display: none !important;
  }

  /* Slide 7: Academic Project Attribution Mobile */
  .project-credits-container {
    gap: 6px;
    max-width: 440px;
  }

  .project-context-card {
    padding: 6px 10px;
    border-radius: 10px;
  }

  .project-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    margin-bottom: 3px;
  }

  .project-context-desc {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .students-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .student-card {
    padding: 5px 8px;
    border-radius: 10px;
    gap: 6px;
  }

  .student-card:nth-child(5) {
    grid-column: span 2;
    max-width: 220px;
    margin: 0 auto;
    width: 100%;
  }

  .student-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }

  .student-name {
    font-size: 0.72rem;
  }

  .student-roll {
    font-size: 0.64rem;
  }

  .student-branch {
    font-size: 0.56rem;
  }

  .project-actions-row {
    margin-top: 4px;
    gap: 8px;
  }

  /* Navigation UI Mobile Enhancements */
  .nav-arrow-prev {
    left: 2px;
  }

  .nav-arrow-next {
    right: 2px;
  }

  .nav-arrow-btn {
    width: 28px;
    height: 28px;
  }

  .carousel-pagination-bar {
    bottom: 4px;
    padding: 3px 8px;
    gap: 5px;
    height: 28px;
  }

  .pagination-dot {
    width: 6px;
    height: 6px;
  }

  .pagination-dot.active {
    width: 16px;
  }
}

@media (max-height: 640px) {
  :root {
    --header-height: 42px;
    --footer-nav-height: 38px;
  }
  .slide-header-block {
    margin-bottom: 2px;
  }
  .slide-main-title {
    font-size: 1.1rem;
  }
  .intro-buddha-card {
    max-height: 95px;
  }
  .intro-buddha-card img {
    height: 95px;
  }
  .breathing-orb-container {
    width: 65px;
    height: 65px;
  }
}
