/* =====================================================================
   Dakshinamurti Shiv Sadhna Parishad — Stylesheet
   Structure:
     1. Fonts & Design Tokens
     2. Reset & Base
     3. Utilities
     4. Header (Bar 1 + Bar 2)
     5. Side Drawer
     6. Hero / Carousel
     7. Notice (Hindi)
     8. Katha Section
     9. Guruji Video Section
     10. More Information Section
     11. Donation Section
     12. Contact Section
     13. Chatbot CTA
     14. Footer
     15. Chatbot Page
     16. Responsive
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Fonts & Design Tokens
   --------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Mukta:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --white: #ffffff;
  --light-blue: #eaf8ff;
  --sky-blue: #87ceeb;
  --sky-blue-soft: #bfe6f7;
  --medium-blue: #4fa3d1;
  --dark-blue: #174a68;
  --dark-blue-deep: #0e3349;
  --red: #c62828;
  --red-soft: #fdecea;
  --gold: #c9a227;
  --gold-soft: #f4e9c9;
  --ink: #23394a;
  --ink-soft: #4f6b7d;

  /* Burnt-orange / brown palette (page background below the blue strip,
     and the dark-brown/light-brown/orange spiritual content cards) */
  --accent-orange: #b85c00;
  --accent-orange-deep: #8f4600;
  --high-intensity-orange: #ff7a00;
  --dark-brown: #4a2c20;
  --light-brown: #f3e3d3;
  --orange-bg-top: #fdf1e4;    /* warm cream — top of page background wash */
  --orange-bg-mid: #f5dcbb;    /* soft sandy burnt-orange */
  --orange-bg-deep: #e9c39a;   /* deeper sandy tone for alternating sections */

  /* New blunt-orange tokens for consistent strip/box accents */
  --box-orange: #ff7a00;           /* blunt high-intensity orange */
  --box-orange-deep: #b85c00;      /* deeper burnt-orange */
  --box-orange-soft: #fde6cc;      /* pale soft orange for fills */

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Tiro Devanagari Hindi', serif;
  --font-body: 'Mukta', 'Noto Sans Devanagari', sans-serif;

  /* Layout */
  --max-width: 1240px;
  --header-bar1-height: 108px;
  --header-bar2-height: 56px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s var(--ease);
  --transition-med: 0.4s var(--ease);
  --transition-slow: 0.6s var(--ease);

  /* Shadow */
  --shadow-soft: 0 8px 30px rgba(23, 74, 104, 0.08);
  --shadow-card: 0 4px 18px rgba(23, 74, 104, 0.10);
  --shadow-lift: 0 14px 40px rgba(23, 74, 104, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   2. Reset & Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-bar1-height) + var(--header-bar2-height) + 12px);
  /* Root-level overflow guard: on iOS Safari, hiding overflow on body alone
     is not always enough — the layout viewport itself can still be wider
     than the visual viewport (visible as blank space on zoom-out). Setting
     it on html too keeps the true document width pinned to 100%. */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  /* Burnt-orange background wash, used for the entire page below the blue
     navigation strip. The header bars themselves keep their own solid
     backgrounds (white / dark blue) set further down. */
  background: linear-gradient(180deg, var(--orange-bg-top) 0%, var(--orange-bg-mid) 55%, var(--orange-bg-deep) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  text-align: center;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--dark-blue);
  margin: 0 0 0.4em;
  line-height: 1.2;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
  text-align: center;
  text-indent: 0;
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* Visible focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: 0;
  top: -60px;
  background: var(--dark-blue);
  color: var(--white);
  padding: 10px 18px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------------------------------
   3. Utilities
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.15) 100%);
}

.section-tight {
  padding-top: 0;
  padding-bottom: 24px;
}

/* Reusable auto-fit grid — shared by info cards, brown spiritual cards and
   the gallery grid so the same layout rule isn't redefined per section. */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

/* ---------------------------------------------------------------------
   Brown / burnt-orange spiritual content card
   Dark-brown border, light-brown fill, high-intensity-orange accent ring —
   used for the Katha, Gallery, Sadhana, Jyotish, Vastu and "Walk the Path"
   cards. Kept as a single reusable component rather than one-off styles.
   --------------------------------------------------------------------- */
.brown-card {
  background: var(--light-brown);
  border: 2.5px solid var(--dark-brown);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-card);
  padding: 28px 26px;
  color: var(--dark-brown);
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.brown-card h3, .brown-card h2 { color: var(--dark-brown); }
.brown-card p { color: #6b4a38; text-align: center; }

.brown-card.is-clickable {
  cursor: pointer;
}
.brown-card.is-clickable:hover,
.brown-card.is-clickable:focus-visible {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-lift);
}

.brown-card .card-icon {
  display: block;
  width: 34px;
  height: 34px;
  color: var(--accent-orange);
  margin-bottom: 12px;
  object-fit: contain;
}

.puja-book-card .card-icon {
  margin: 0 auto 16px;
}

.puja-book-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.puja-book-instruction {
  margin: -4px 0 0;
  font-size: 0.94rem;
  font-style: italic;
}

.puja-book-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.puja-book-link {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  line-height: 1.35;
  white-space: normal;
}

.brown-card .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent-orange-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brown-card .card-cta svg { width: 16px; height: 16px; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--box-orange-deep);
  font-weight: 600;
  margin-bottom: 10px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold);
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-head p {
  font-size: 1.05rem;
}

.teachings-feature {
  width: min(100%, 380px);
  margin: 0 auto 44px;
  padding: 10px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.teachings-feature img {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--box-orange-deep), var(--box-orange));
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.stotram-cta {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.btn-outline {
  background: var(--white);
  color: var(--dark-brown);
  border: 1.5px solid var(--box-orange-soft);
}
.btn-outline:hover { background: var(--box-orange-soft); border-color: var(--box-orange-deep); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b3891f);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); }

/* Fade-in-on-scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Divider motif (signature element: chakra ring) */
.om-divider {
  display: flex;
  justify-content: center;
  margin: 0 0 40px;
  opacity: 0.75;
}
.om-divider svg { width: 46px; height: 46px; }

/* ---------------------------------------------------------------------
   4. Header
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
}

/* Bar 1 - thicker */
.header-bar-1 {
  min-height: var(--header-bar1-height);
  background: var(--white);
  border-bottom: 1px solid var(--box-orange-soft);
  box-shadow: 0 2px 14px rgba(23, 74, 104, 0.05);
}

.header-bar-1 .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-bar1-height);
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo-placeholder {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--box-orange-soft), var(--box-orange));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  border: 2px solid var(--gold);
  overflow: hidden;
}
.logo-placeholder img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.brand-text {
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  color: var(--dark-blue);
  line-height: 1.15;
  margin: 0;
}

.header-address {
  text-align: right;
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 280px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.header-contact-item {
  display: flex;
  flex-direction: column;
  align-items: inherit;
}

.header-address .address-label,
.header-address .phone-label {
  display: block;
  font-weight: 600;
  color: var(--dark-blue);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.header-address #header-phone-text a,
.header-address #header-phone-text {
  color: var(--ink-soft);
  text-decoration: none;
}

/* Bar 2 - thinner nav bar */
.header-bar-2 {
  min-height: var(--header-bar2-height);
  background: linear-gradient(90deg, var(--box-orange-deep), var(--box-orange));
}

.header-bar-2 .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-bar2-height);
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  border-radius: var(--radius-sm);
}
.hamburger-btn:hover { background: rgba(255,255,255,0.08); }

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
  display: none;
}

.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.lang-btn:hover { background: rgba(255,255,255,0.1); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  min-width: 140px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 10;
}
.lang-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--ink);
}
.lang-menu li button:hover { background: var(--light-blue); }
.lang-menu li button[aria-checked="true"] {
  color: var(--dark-blue);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   5. Side Drawer
   --------------------------------------------------------------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 51, 73, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-med), visibility var(--transition-med);
  z-index: 900;
}
.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 33.333%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--orange-bg-top) 0%, var(--orange-bg-mid) 100%);
  z-index: 950;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 40px rgba(14, 51, 73, 0.25);
}
.side-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(23, 74, 104, 0.15);
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--dark-blue);
  font-size: 1.2rem;
  margin: 0;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-blue);
  font-size: 1.3rem;
  background: rgba(255,255,255,0.5);
}
.drawer-close:hover { background: rgba(255,255,255,0.85); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 24px;
}

.drawer-nav .drawer-group {
  border-bottom: 1px solid rgba(23, 74, 104, 0.12);
}

.drawer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  font-weight: 700;
  color: var(--dark-blue);
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.drawer-group-heading {
  padding: 14px 12px;
  margin: 0;
  font-weight: 700;
  color: var(--dark-blue);
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.drawer-group-toggle .chev {
  transition: transform var(--transition-fast);
  font-size: 0.8rem;
}
.drawer-group-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.drawer-sublist {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-med);
}
.drawer-sublist.is-open {
  max-height: 400px;
}

.drawer-sublist--always-open {
  max-height: none;
  overflow: visible;
  list-style: disc;
  padding-left: 32px;
}

.drawer-sublist li a,
.drawer-single-link {
  display: block;
  padding: 10px 14px 10px 26px;
  font-size: 0.92rem;
  color: var(--dark-blue-deep);
  border-radius: var(--radius-sm);
}
.drawer-sublist--always-open li a {
  padding: 4px 10px;
  text-align: left;
}
.drawer-single-link {
  padding-left: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.08rem;
}
.drawer-sublist li a:hover,
.drawer-single-link:hover {
  background: rgba(255,255,255,0.55);
}

.drawer-footer-note {
  padding: 16px 22px;
  font-size: 0.8rem;
  color: var(--dark-blue-deep);
  border-top: 1px solid rgba(23, 74, 104, 0.15);
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------
   6. Hero / Carousel
   --------------------------------------------------------------------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero-intro {
  max-width: 700px;
  margin: 0 auto 36px;
}

.hero-intro h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.hero-intro p {
  font-size: 1.1rem;
}

.carousel {
  position: relative;
  width: 66%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--white);
}

.carousel-hint {
  display: none;
  margin: 0 auto 8px;
  color: var(--dark-blue);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}
.carousel-hint.is-visible { display: block; }

.carousel-track-wrap {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s var(--ease);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--box-orange-deep) 0%, var(--box-orange) 55%, var(--dark-brown) 100%);
  overflow: hidden;
}

.carousel-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(14,51,73,0.72) 0%, rgba(14,51,73,0.15) 55%, rgba(14,51,73,0.05) 100%);
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 30px 34px;
  text-align: left;
  color: var(--white);
}

.slide-content h2 {
  color: var(--white);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  margin-bottom: 6px;
}

.slide-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  max-width: 520px;
  margin: 0;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 3;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.carousel-arrow:hover { background: var(--white); transform: translateY(-50%) scale(1.06); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 16px 0;
  background: var(--white);
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--box-orange-soft);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.carousel-dot.is-active {
  background: var(--box-orange-deep);
  transform: scale(1.25);
}
.carousel-dot:hover { background: var(--box-orange-deep); }

.hero-feature-link {
  display: flex;
  justify-content: center;
  margin: 24px auto 0;
}
.hero-feature-link .btn {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

/* ---------------------------------------------------------------------
   7. Notice (Hindi)
   --------------------------------------------------------------------- */
.notice-wrap {
  padding: 30px 0 10px;
}

.notice-card {
  max-width: 100%;
  margin: 0 auto;
  background: #f4e7d7;
  border: 3px solid #f26c00;
  border-radius: 0;
  padding: 22px 28px 20px;
  display: block;
  box-shadow: none;
}

.notice-card .notice-text {
  margin: 0;
  color: #1d3c4d;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
}

/* ---------------------------------------------------------------------
   8. Split (two-column) content layout
   Reusable text + visual layout — used by the Dakshinamurthy Katha
   section and by the new "Walk the Path of Sadhana" section, so the
   two-column pattern is defined once rather than duplicated.
   --------------------------------------------------------------------- */
.split-section {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.split-section.reverse {
  flex-direction: row-reverse;
}

.split-visual {
  display: none;
}

.split-visual.brown-visual {
  background: linear-gradient(150deg, var(--light-brown) 0%, #e6c8a8 100%);
  border: 2.5px solid var(--dark-brown);
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-soft);
}

.split-content {
  flex: 1 1 100%;
  max-width: 780px;
  min-width: 280px;
  max-width: 100%;
  text-align: center;
}

.split-content h2 { text-align: center; }

/* Responsive image placeholder — a fixed-aspect-ratio box ready to take a
   real photo later (see assets/images/target-image.jpg). Gracefully shows
   a soft placeholder until the real file exists, via the img's onerror
   handler in the HTML. */
.image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, var(--light-brown) 0%, #e6c8a8 100%);
  border: 2.5px solid var(--dark-brown);
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-placeholder .placeholder-label {
  color: var(--dark-brown);
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
  padding: 0 20px;
  opacity: 0.75;
}

/* ---------------------------------------------------------------------
   9. Guruji Video Section
   --------------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.video-card {
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.video-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--box-orange-deep), var(--box-orange));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transform: translate(-50%, -50%);
  transition: transform var(--transition-fast);
}
.video-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.1); }

.video-thumb-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-info { padding: 18px 20px 22px; }
.video-info h3 { font-size: 1.15rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.video-info p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------------------------------------------------------------------
   10. More Information Section
   --------------------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--box-orange-soft);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--box-orange-deep);
}

.info-card .info-icon {
  width: 36px;
  height: 36px;
  color: var(--box-orange-deep);
  margin-bottom: 14px;
}

.info-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.info-card p { font-size: 0.88rem; margin-bottom: 0; }
.info-card .info-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   11. Donation Section
   --------------------------------------------------------------------- */
.donation-card {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg,
    rgba(246, 212, 120, 0.42) 0%,
    rgba(222, 141, 62, 0.7) 22%,
    rgba(117, 179, 211, 0.9) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  color: var(--dark-blue-deep);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}

.donation-card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(14,51,73,0.12);
  top: -80px;
  right: -80px;
}

.donation-card h2 { color: var(--dark-blue-deep); font-size: clamp(1.4rem, 3vw, 1.9rem); }
.donation-card p { color: rgba(14,51,73,0.8); max-width: 480px; margin: 0 auto 26px; }

/* Gurudev book purchase */
.gurudev-book-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
  border: 2px solid var(--dark-brown);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fffaf4, var(--light-brown));
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-lift);
}

.gurudev-book-cover {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1.276;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
}

.gurudev-book-cover img {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% / 1.276);
  height: calc(100% * 1.276);
  max-width: none;
  object-fit: fill;
  transform: rotate(-90deg);
  translate: -50% -50%;
}

.gurudev-book-content h2 {
  margin-bottom: 14px;
  color: var(--dark-brown);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.gurudev-book-content > p {
  max-width: 560px;
  color: #5a4536;
  font-size: 1.08rem;
}

.gurudev-book-content > .gurudev-book-price {
  margin: 0 auto 12px;
  color: var(--accent-orange-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-whatsapp {
  margin-top: 8px;
  background: #168c4b;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(22, 140, 75, 0.22);
  white-space: normal;
  text-align: center;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  background: #11763e;
  box-shadow: var(--shadow-lift);
}

.btn-whatsapp svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.gurudev-book-content .gurudev-book-phone {
  margin: 14px 0 0;
  font-size: 0.96rem;
  font-weight: 600;
}

.gurudev-book-phone a {
  color: #11763e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 699px) {
  .gurudev-book-card {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .gurudev-book-cover {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .gurudev-book-content > p {
    margin-right: auto;
    margin-left: auto;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(184, 92, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  padding: 20px;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 30px;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lift);
  transform: scale(0.94);
  transition: transform var(--transition-fast);
}
.modal-overlay.is-open .modal-box { transform: scale(1); }

.modal-box h3 { margin-bottom: 10px; }
.modal-box p { margin-bottom: 20px; font-size: 0.94rem; }

/* ---------------------------------------------------------------------
   12. Contact Section
   --------------------------------------------------------------------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: flex-start;
}

.contact-info h2 { text-align: center; }
.contact-info p { font-size: 1rem; text-align: center; }

.contact-detail {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}
.contact-detail .c-icon {
  width: 22px;
  height: 22px;
  color: var(--box-orange-deep);
  flex-shrink: 0;
  margin-top: 3px;
}
.contact-detail strong {
  display: block;
  color: var(--dark-blue);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.contact-detail span { color: var(--ink-soft); font-size: 0.95rem; }
.contact-detail a {
  color: inherit;
  text-decoration: none;
}
.contact-detail a:hover,
.contact-detail a:focus-visible {
  color: var(--box-orange-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-detail a:focus-visible {
  outline: 2px solid var(--box-orange-deep);
  outline-offset: 3px;
}
.contact-link-action {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(194, 112, 40, 0.1);
  color: var(--box-orange-deep) !important;
  font-size: 0.78em !important;
  font-weight: 600;
  white-space: nowrap;
}

.contact-whatsapp {
  padding: 12px 14px;
  margin-top: 6px;
  border-left: 3px solid #25d366;
  background: rgba(37, 211, 102, 0.08);
}
.contact-whatsapp .c-icon { color: #159447; }
.contact-whatsapp a {
  color: #117a3a;
  font-weight: 600;
  text-decoration: none;
}
.contact-whatsapp .contact-link-action {
  background: rgba(37, 211, 102, 0.14);
  color: #117a3a !important;
}
.contact-whatsapp a:hover,
.contact-whatsapp a:focus-visible { text-decoration: underline; }

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--box-orange-soft);
}

.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 6px;
}
.form-row .required-mark { color: var(--red); }

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--box-orange-soft);
  border-radius: var(--radius-sm);
  background: #fff8f0;
  color: var(--ink);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--box-orange-deep);
  background: var(--white);
  outline: none;
}
.form-row textarea { min-height: 130px; resize: vertical; }

.form-error {
  display: block;
  color: var(--red);
  font-size: 0.78rem;
  margin-top: 5px;
  min-height: 1em;
}

.form-row.has-error input,
.form-row.has-error textarea {
  border-color: var(--red);
  background: var(--red-soft);
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success {
  background: #e6f6ec;
  color: #1e7e42;
  border: 1px solid #b7e4c7;
}
.form-status.error {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(198,40,40,0.25);
}

.form-submit-btn {
  width: 100%;
  position: relative;
}
.form-submit-btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.form-submit-btn.is-loading .spinner { display: inline-block; }
.form-submit-btn.is-loading .btn-label { opacity: 0.8; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   13. Chatbot CTA
   --------------------------------------------------------------------- */
.chatbot-cta {
  text-align: center;
}

.chatbot-cta-card {
  max-width: 690px;
  margin: 0 auto;
  padding: 46px 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
    rgba(137, 191, 225, 0.95) 0%,
    rgba(195, 219, 234, 0.92) 32%,
    rgba(246, 212, 120, 0.55) 68%,
    rgba(231, 171, 85, 0.52) 100%);
  border: 1px solid rgba(23, 74, 104, 0.75);
  box-shadow: 0 14px 36px rgba(134, 104, 51, 0.12);
}

.chatbot-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  color: var(--dark-blue);
}

/* ---------------------------------------------------------------------
   14. Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg,
    rgba(246, 212, 120, 0.42) 0%,
    rgba(222, 141, 62, 0.7) 22%,
    rgba(117, 179, 211, 0.9) 100%);
  color: var(--dark-blue-deep);
  padding: 56px 0 22px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(23,74,104,0.22);
}

.footer-col h4 {
  color: var(--dark-blue-deep);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.footer-org-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--dark-blue-deep);
  margin-bottom: 10px;
}
.footer-col p { color: rgba(14,51,73,0.8); font-size: 0.92rem; margin-bottom: 8px; }
.footer-col a {
  color: var(--dark-blue-deep);
  text-decoration: none;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-list a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.48);
  border: 1px solid rgba(23,74,104,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-blue-deep);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.social-list a:hover {
  background: var(--white);
  transform: translateY(-3px);
}
.social-list svg { width: 18px; height: 18px; }

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(14,51,73,0.75);
}

/* ---------------------------------------------------------------------
   15. Chatbot Page
   --------------------------------------------------------------------- */
.chatbot-page-main {
  min-height: calc(100vh - var(--header-bar1-height) - var(--header-bar2-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.chatbot-placeholder-card {
  max-width: 480px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--sky-blue-soft);
}

.chatbot-placeholder-card .chatbot-icon {
  width: 64px;
  height: 64px;
}

.chatbot-page-main {
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 64px;
}

.chatbot-shell {
  width: min(100%, 820px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 74, 104, 0.22);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}

.chatbot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  background: linear-gradient(110deg, rgba(234, 248, 255, 0.95), rgba(244, 233, 201, 0.62));
  border-bottom: 1px solid rgba(23, 74, 104, 0.16);
}

.chatbot-eyebrow {
  margin: 0 0 4px;
  color: var(--accent-orange-deep);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.chatbot-heading h1 {
  margin: 0;
  color: var(--dark-blue-deep);
  font-family: var(--font-display);
  font-size: 2rem;
}

.chatbot-intro {
  margin: 2px 0 0;
  color: var(--ink-soft);
}

.chatbot-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--dark-blue);
  font-size: 0.82rem;
  font-weight: 600;
}

.chatbot-source span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #41845a;
}

.chatbot-transcript {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding: 26px 30px;
  scroll-behavior: smooth;
}

.chat-message {
  width: fit-content;
  max-width: min(88%, 620px);
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--ink);
  background: #f0f7f8;
  border: 1px solid rgba(23, 74, 104, 0.12);
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-whatsapp-link {
  color: #167c48;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-whatsapp-link:focus-visible {
  outline: 3px solid rgba(22, 124, 72, 0.28);
  outline-offset: 2px;
}

.chat-message-label {
  display: block;
  margin-bottom: 4px;
  color: var(--dark-blue);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-message {
  align-self: flex-end;
  background: #fff4e5;
  border-color: rgba(184, 92, 0, 0.2);
}

.user-message .chat-message-label { color: var(--accent-orange-deep); }

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 30px 18px;
}

.chat-suggestion {
  padding: 7px 12px;
  border: 1px solid rgba(23, 74, 104, 0.24);
  border-radius: 18px;
  color: var(--dark-blue);
  background: var(--white);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.chat-suggestion:hover {
  background: var(--light-blue);
  border-color: var(--medium-blue);
}

.chatbot-composer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 30px;
  border-top: 1px solid rgba(23, 74, 104, 0.14);
}

.chatbot-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  max-height: 140px;
  resize: vertical;
  padding: 11px 13px;
  border: 1px solid rgba(23, 74, 104, 0.28);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.45;
}

.chatbot-composer textarea:focus-visible,
.chat-suggestion:focus-visible {
  outline: 3px solid rgba(79, 163, 209, 0.36);
  outline-offset: 2px;
}

.chatbot-composer .btn { min-height: 46px; }

.chatbot-composer button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.chatbot-status {
  min-height: 1.5em;
  margin: 0;
  padding: 0 30px 16px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.chatbot-status.is-error { color: var(--red); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 599px) {
  .chatbot-page-main { padding: 28px 12px 42px; }
  .chatbot-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 22px 20px; }
  .chatbot-heading h1 { font-size: 1.7rem; }
  .chatbot-transcript { min-height: 280px; padding: 20px; }
  .chat-message { max-width: 94%; }
  .chatbot-suggestions { padding: 0 20px 16px; }
  .chatbot-composer { gap: 8px; padding: 14px 20px; }
  .chatbot-composer .btn { padding: 11px 16px; }
  .chatbot-status { padding: 0 20px 14px; }
}

/* ---------------------------------------------------------------------
   16. Dakshinamurti Gallery + Lightbox
   --------------------------------------------------------------------- */
.card-teaser {
  max-width: 560px;
  margin: 0 auto;
}

.card-teaser-inline {
  max-width: 100%;
  margin-top: 28px;
}

.gallery-card-visuals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-card-visuals .card-icon {
  flex: 0 0 auto;
  margin: 0;
}

.gallery-preview-strip {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.gallery-preview-strip img {
  width: clamp(22px, 7vw, 34px);
  height: clamp(22px, 7vw, 34px);
  border-radius: 4px;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.42;
}

.gallery-grid-modal .grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(150deg, var(--light-brown), #e6c8a8);
  border: 2px solid var(--dark-brown);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.gallery-thumb:hover, .gallery-thumb:focus-visible { transform: scale(1.03); }
.gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb.img-missing::after {
  content: "Photo coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 0.72rem;
  color: var(--dark-brown);
  font-family: var(--font-display);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 4, 0.88);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  padding: 20px;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }

.lightbox-stage {
  position: relative;
  max-width: 90vw;
  max-height: 82vh;
  width: min(720px, 90vw);
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--light-brown), #e6c8a8);
  border-radius: var(--radius-md);
  border: 3px solid var(--high-intensity-orange);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--dark-brown);
}
.lightbox-stage .placeholder-label { color: var(--dark-brown); font-family: var(--font-display); }

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--dark-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 2;
}
.lightbox-close:hover, .lightbox-arrow:hover { background: var(--white); }
.lightbox-close { top: -54px; right: 0; }
.lightbox-arrow.prev { left: -54px; top: 50%; transform: translateY(-50%); }
.lightbox-arrow.next { right: -54px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: absolute;
  bottom: -34px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   17. Full-screen content modal (shared shell)
   Used by the Katha reading view and the Video Collections viewer, so
   both reuse one overlay/panel pattern instead of duplicating it.
   --------------------------------------------------------------------- */
.content-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 4, 0.55);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  padding: 24px;
}
.content-modal-overlay.is-open { opacity: 1; visibility: visible; }

.content-modal-panel {
  background: var(--light-brown);
  border: 3px solid var(--dark-brown);
  box-shadow: inset 0 0 0 3px var(--high-intensity-orange), var(--shadow-lift);
  border-radius: var(--radius-lg);
  width: min(760px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform var(--transition-fast);
}
.content-modal-overlay.is-open .content-modal-panel { transform: scale(1); }

.content-modal-panel.is-wide { width: min(960px, 100%); }
.content-modal-panel-katha { width: min(820px, 100%); }

.content-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 2px solid rgba(74, 44, 32, 0.18);
  flex-shrink: 0;
}
.content-modal-header h2, .content-modal-header h3 {
  color: var(--dark-brown);
  margin: 0;
  font-size: 1.3rem;
}
.content-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(74, 44, 32, 0.1);
  color: var(--dark-brown);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.content-modal-close:hover { background: rgba(74, 44, 32, 0.2); }

.content-modal-body {
  padding: 26px 28px 28px;
  overflow-y: auto;
  color: var(--dark-brown);
  text-align: center;
}

.katha-language-switcher {
  display: inline-flex;
  gap: 8px;
  margin-top: 12px;
  padding: 4px;
  background: rgba(74, 44, 32, 0.06);
  border-radius: 999px;
}
.katha-lang-btn {
  border: 0;
  background: transparent;
  color: var(--dark-brown);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.katha-lang-btn.is-active {
  background: var(--dark-brown);
  color: var(--light-brown);
}

.katha-reader-book {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(74, 44, 32, 0.12);
  border-radius: var(--radius-md);
  padding: 8px;
}

.katha-reader-page {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.66));
  border-radius: 12px;
  border: 1px solid rgba(74, 44, 32, 0.12);
  padding: 28px 28px 20px;
  box-shadow: inset 0 0 0 1px rgba(74, 44, 32, 0.08);
}
.katha-reader-entry {
  display: grid;
  gap: 16px;
}
.katha-reader-page h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin: 0;
  color: var(--dark-brown);
  line-height: 1.2;
  text-align: center;
}
.katha-reader-page p,
.katha-reader-page blockquote {
  color: #6b4a38;
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 0;
  text-align: center;
  text-indent: 0;
}
.katha-reader-page blockquote {
  border-left: 0;
  padding-left: 0;
  margin-top: 8px;
  font-style: italic;
}

.katha-reader-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 2px solid rgba(74, 44, 32, 0.18);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.katha-reader-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.katha-reader-nav > #kathaPageIndicator {
  font-size: 0.85rem;
  color: var(--dark-brown);
  min-width: 70px;
  text-align: center;
}
.katha-reader-downloads {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-brown {
  background: var(--dark-brown);
  color: var(--light-brown);
}
.btn-brown:hover { background: #3a2118; }
.btn-brown:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-high-orange {
  background: var(--high-intensity-orange);
  color: var(--white);
}
.btn-high-orange.alt {
  background: #d66b00;
}
.btn-high-orange:hover { background: #e56e00; transform: translateY(-2px); }

/* Video collection viewer reuses .video-grid / .video-card from section 9 */
.content-modal-body .video-grid { margin-top: 4px; }
.video-empty-note {
  color: var(--dark-brown);
  font-style: italic;
  padding: 12px 0;
}

/* ---------------------------------------------------------------------
   18. Category cards (Sadhana / Jyotish / Vastu) + Walk the Path section
   --------------------------------------------------------------------- */
.category-grid { margin-top: 6px; }

.walk-path-section .split-content p { color: #5a4536; }

.walk-path-highlight {
  margin-top: 22px;
}
.walk-path-highlight .notice-text {
  color: var(--dark-brown);
}
.walk-path-highlight .notice-translation {
  color: #6b4a38;
}
.walk-path-highlight .placeholder-note {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--accent-orange-deep);
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   16b. Responsive
   --------------------------------------------------------------------- */
@media (min-width: 900px) {
  .primary-nav {
    display: flex;
    gap: clamp(10px, 1.35vw, 26px);
  }
  .primary-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
  }
  .primary-nav a:hover { color: var(--white); }
}

@media (max-width: 899px) {
  .header-bar-1 .container {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .header-address {
    order: 3;
    width: 100%;
    text-align: left;
    margin-top: 6px;
    max-width: none;
    align-items: flex-start;
  }
  .brand-title { font-size: 1.1rem; }
  .logo-placeholder { width: 54px; height: 54px; font-size: 0.7rem; }

  .side-drawer { width: 88%; max-width: none; }

  .carousel { width: 100%; }

  .split-section { flex-direction: column; }
  .split-section > .split-content { width: 100%; }
  .split-content h2, .contact-info h2 { text-align: center; }
  .puja-book-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-info { text-align: center; }
  .contact-detail { justify-content: center; }

  .contact-wrap { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .social-list { justify-content: center; }
  .contact-detail { text-align: left; }
}

/* --- Tablet: 768px --- */
@media (max-width: 800px) {
  .container { padding: 0 18px; }
  .video-grid, .info-grid, .grid-auto { gap: 18px; }
}

/* --- General small-phone fixes: 599px and below --- */
@media (max-width: 599px) {
  .section { padding: 52px 0; }
  .container { padding: 0 16px; }
  .video-info { padding: 16px 16px 18px; }
  .notice-card { flex-direction: column; }
  .contact-form-card { padding: 24px 20px; }
  .donation-card { padding: 36px 24px; }
  .brown-card { padding: 22px 18px; }
  .puja-book-links { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 22px; }

  /* Lightbox controls: on narrow screens, keep arrows/close INSIDE the
     stage instead of floating outside it, so nothing ever needs space
     beyond the viewport edge. */
  .lightbox-stage { width: 100%; max-width: 100%; }
  .lightbox-close { top: 8px; right: 8px; width: 38px; height: 38px; }
  .lightbox-arrow.prev { left: 8px; }
  .lightbox-arrow.next { right: 8px; }
  .lightbox-counter { bottom: -28px; }

  .content-modal-panel { max-height: 88vh; }
  .content-modal-header { padding: 16px 18px; }
  .content-modal-body { padding: 18px 18px 20px; }
  .katha-reader-footer { padding: 14px 18px; flex-direction: column; align-items: stretch; }
  .katha-reader-nav { justify-content: center; }
}

/* --- Very narrow phones: 320–412px, the widths most prone to overflow --- */
@media (max-width: 420px) {
  :root {
    --header-bar1-height: 92px;
  }
  .container { padding: 0 14px; }
  .brand { gap: 10px; }
  .logo-placeholder { width: 46px; height: 46px; font-size: 0.62rem; }
  .brand-title { font-size: 1rem; }
  .hero-intro h1 { font-size: 1.6rem; }
  .btn { padding: 11px 22px; font-size: 0.9rem; }
  .video-grid, .info-grid, .grid-auto { grid-template-columns: 1fr; }
  .gallery-grid-modal .grid-auto { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}