@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --canvas: #fffdf6;
  --band-bg: #fbf1d6;
  --row-tint: rgba(0, 0, 0, 0.03);
  --maroon: #800020;
  --maroon-dark: #5a0016;
  --gold: #d4ac0d;
  --gold-soft: #fef9e7;
  --body-text: #2c3e50;
  --muted: #5a6b7a;
  --card: #ffffff;
  --line: rgba(128, 0, 32, 0.14);
  --shadow: 0 12px 40px rgba(128, 0, 32, 0.1);
  --sidebar-border: #800020;
  --drawer-bg: #ffffff;
  --footer-bg: #ffffff;
  --hero-overlay: rgba(26, 18, 21, 0.62);
  --quote-bg: #fef9e7;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Poppins", "Segoe UI", sans-serif;
}

body.dark-mode {
  --canvas: #1a1215;
  --band-bg: #241a1f;
  --row-tint: rgba(255, 255, 255, 0.06);
  --maroon: #962d43;
  --maroon-dark: #c2575b;
  --gold: #f39c12;
  --gold-soft: rgba(243, 156, 18, 0.12);
  --body-text: #f0eae1;
  --muted: #c9bfb3;
  --card: #3a2a32;
  --line: rgba(243, 156, 18, 0.18);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --sidebar-border: #36272d;
  --drawer-bg: #261b20;
  --footer-bg: #261b20;
  --hero-overlay: rgba(26, 18, 21, 0.78);
  --quote-bg: #2f2228;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body-text);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: clip;
  max-width: 100%;
}

/* Safety net: any wide content (tables, code, etc.) scrolls inside
   itself instead of ever widening the whole page sideways. */
table { display: block; overflow-x: auto; max-width: 100%; }

h1,
h2,
h3,
.quote-text {
  font-family: var(--font-serif);
  color: var(--maroon);
  line-height: 1.15;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: var(--body-text);
}

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

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

/* ===== HEADER ===== */
/* The <header> is only a wrapper: its children (brand row + nav bar) join the normal
   page flow, so ONLY the nav bar sticks while scrolling. See "HEADER v2" at the end. */
.site-header {
  display: contents;
}

.header-top__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 10px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 20px;
}

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

.brand-logo {
  width: auto;
  height: 86px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  flex-shrink: 0;
 }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.04em;
}

.brand-tagline {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.header-mantra {
  text-align: center;
  padding: 0 12px;
}

.header-mantra p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(13px, 1.5vw, 17px);
  color: var(--gold);
  line-height: 1.35;
  white-space: nowrap;
}

.prabhupada-block {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
  max-width: 280px;
}

.prabhupada-caption {
  margin: 0;
  font-size: 10px;
  font-style: italic;
  line-height: 1.35;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

 
 .prabhupada-portrait {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  /* Lineage boundary lines removed cleanly */
  border: none; 
  flex-shrink: 0;
 }
 

.header-nav {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  border-top: 1px solid var(--line);
}

.header-nav a {
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  position: relative;
  transition: color 0.2s, background 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--maroon);
}

.header-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
}

.header-nav .nav-cta {
  background: var(--maroon);
  color: #fff !important;
  border-radius: 6px;
  margin-left: 8px;
}

.header-nav .nav-cta:hover {
  background: var(--maroon-dark);
}

.header-nav .nav-cta::after {
  display: none;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
}

.menu-button span,
.menu-button span::before,
.menu-button span::after {
  width: 22px;
  height: 2px;
  background: var(--maroon);
  display: block;
  content: "";
  border-radius: 2px;
}

.menu-button span::before {
  transform: translateY(-7px);
}

.menu-button span::after {
  transform: translateY(5px);
}

.menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: min(340px, 88vw);
  height: 100vh;
  padding: 0;
  background: var(--drawer-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head .brand-name {
  font-size: 18px;
}

.drawer-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--maroon);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.drawer-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  font-family: inherit;
  font-size: 20px; /* Makes the mode emoji look clear and touch-friendly */
  color: var(--body-text);
 }
 

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.drawer-nav a:active,
.drawer-nav a.active {
  background: var(--gold-soft);
  color: var(--maroon);
}

.drawer-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--line);
}

.drawer-footer .button {
  width: 100%;
}

.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(26, 18, 21, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.menu-toggle:checked ~ .menu-drawer {
  transform: translateX(0);
}

.menu-toggle:checked ~ .menu-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--band-bg);
  border-top: 1px solid var(--line);
  padding: 48px 0 24px;
  margin-top: 0;
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-brand .brand-logo {
  width: auto;
  height: 110px;
  margin-bottom: 12px;
}

.footer-brand h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.footer h3 {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--maroon);
}

.footer p,
.footer address {
  margin: 0 0 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.footer a {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--maroon);
}

body.dark-mode .footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.theme-switch-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--gold-soft);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--body-text);
}

.footer .map-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--maroon);
}

/* ===== SHARED ===== */
.section-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--card);
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

h1 { font-size: clamp(36px, 6vw, 64px); margin: 0 0 16px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 14px; }
h3 { font-size: 22px; margin: 0 0 10px; }

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 2px solid var(--maroon);
  border-radius: 6px;
  background: var(--maroon);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.button:hover {
  background: var(--maroon-dark);
  border-color: var(--maroon-dark);
}

.button.secondary {
  background: transparent;
  color: var(--maroon);
}

body.dark-mode .button.secondary {
  color: var(--gold);
  border-color: var(--gold);
}

.button.secondary:hover {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}

.button.gold-outline {
  border-color: var(--gold);
  color: var(--maroon);
  background: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* ===== HERO ===== */
.home-hero,
.page-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 64px 0 48px;
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.85)),
    url("assets/community-placeholder.svg") center/cover no-repeat;
}

.home-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.82)),
    url("images/hero-image.webp") center/cover no-repeat;
}

.home-hero .section-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}
.home-hero-text {
  grid-column: 1;
  text-align: left;
}
.home-hero-text .welcome-heading,
.home-hero-text .catchphrase,
.home-hero-text p {
  text-align: left;
}
.home-hero .actions {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  align-self: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 172, 13, 0.4);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}
.home-hero .actions .button,
.home-hero .actions .button.secondary {
  width: 100%;
  text-align: center;
}

@media (max-width: 900px) {
  .home-hero .section-inner {
    grid-template-columns: 1fr;
  }
  .home-hero-text,
  .home-hero .actions {
    grid-column: 1;
  }
  .home-hero-text {
    text-align: center;
  }
  .home-hero-text .welcome-heading,
  .home-hero-text .catchphrase,
  .home-hero-text p {
    text-align: center;
  }
}

.page-hero.has-bg-about {
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.85)),
    url("images/about-us-hero.webp") center/cover no-repeat;
}

.page-hero.has-bg-events {
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.85)),
    url("images/hero-image-2.webp") center/cover no-repeat;
}

.page-hero.has-bg-participate {
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.85)),
    url("images/get-involved-hero.jpg") center/cover no-repeat;
}

.page-hero.has-bg-merch {
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.85)),
    url("images/merch-hero-bookshelf.jpg") center/cover no-repeat;
}

.page-hero.has-bg-courses {
  background:
    linear-gradient(var(--hero-overlay), rgba(26, 18, 21, 0.88)),
    url("images/bhagavad-gita-cover.jpg") center 20%/cover no-repeat;
}

.home-hero h1,
.page-hero h1 {
  color: #fff;
}

.home-hero .catchphrase {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.home-hero p,
.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
  font-size: 17px;
}

.home-hero .welcome-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

/* ===== SUNDAY + QUOTE GRID ===== */
.split-grid-60-40 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  align-items: start;
}

.step-list {
  display: grid;
  gap: 28px;
}

.step-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
}

.step-item h3 {
  margin-bottom: 6px;
}

.quote-card {
  background: linear-gradient(145deg, var(--maroon) 0%, var(--maroon-dark, #5c0017) 100%);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 36px 30px;
  box-shadow: 0 12px 32px rgba(128, 0, 32, 0.35);
  position: relative;
  overflow: hidden;
}

.quote-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(212, 172, 13, 0.25), transparent 60%);
  pointer-events: none;
}

.quote-card::before {
  content: "\201C";
  font-family: var(--font-serif);
  font-size: 90px;
  line-height: 1;
  color: var(--gold);
  opacity: 0.85;
  position: absolute;
  top: 0px;
  left: 18px;
}

.quote-card .eyebrow {
  color: var(--gold);
  letter-spacing: 0.08em;
}

.quote-text {
  font-size: clamp(22px, 2.8vw, 30px);
  font-style: italic;
  font-weight: 600;
  color: #fff;
  margin: 28px 0 20px;
  position: relative;
  z-index: 1;
}

.quote-source {
  text-align: right;
  font-style: italic;
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* ===== CAROUSEL / ARTICLES ===== */
.section-header-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.carousel-wrap {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.article-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(128, 0, 32, 0.14);
}

.article-card:hover h3 {
  color: var(--maroon);
}

.article-thumb {
  height: 160px;
  background:
    linear-gradient(135deg, rgba(128, 0, 32, 0.15), rgba(212, 172, 13, 0.2)),
    var(--gold-soft);
}

.article-body {
  padding: 20px;
}

.category-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--maroon);
}

body.dark-mode .category-tag {
  background: rgba(243, 156, 18, 0.15);
  color: var(--gold);
}

.article-card h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
}

.read-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--maroon);
  font-size: 14px;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--maroon);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ===== STATS RIBBON ===== */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: var(--maroon);
  color: #fff;
  padding: 36px 28px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  color: var(--gold);
  margin-bottom: 6px;
}

.stat-item span {
  font-size: 14px;
  opacity: 0.9;
}

/* ===== SPLIT SECTIONS ===== */
.split-40-60,
.split-50-50,
.split-60-40 {
  display: grid;
  gap: 36px;
  align-items: center;
}

.split-40-60 { grid-template-columns: 2fr 3fr; }
.split-60-40 { grid-template-columns: 3fr 2fr; }
.split-50-50 { grid-template-columns: 1fr 1fr; }

.portrait-frame img {
  width: 100%;
  /* Never display larger than the file's real pixel width (363px) —
     stretching it past that is what made it look soft/blurry. */
  max-width: 363px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.pillar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.pillar-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.callout-box {
  border: 1px solid var(--maroon);
  background: var(--gold-soft);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-ribbon {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
  margin-bottom: 12px;
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-weight: 700;
  color: var(--body-text);
  cursor: pointer;
  background: var(--canvas);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  font-size: 22px;
  color: var(--maroon);
}

.accordion[open] summary::after {
  content: "\2212";
}

.accordion-content {
  padding: 0 22px 22px;
}

/* ===== CARDS & FORMS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.event-ticket {
  border-left: 4px solid var(--gold);
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
}

.timeline-list li:last-child {
  border-bottom: 0;
}

.form {
  display: grid;
  gap: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--body-text);
  padding: 12px 14px;
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}

.filter-bar input {
  flex: 1;
  min-width: 200px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--body-text);
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}

.resource-card .meta-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
}

.map iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.signup-ribbon {
  background: linear-gradient(135deg, var(--gold-soft), rgba(212, 172, 13, 0.25));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signup-ribbon .form-inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  max-width: 800px;
  margin: 20px auto 0;
}

.mpesa-box {
  background: #e8f5e9;
  border: 2px solid #2e7d32;
  border-radius: 12px;
  padding: 24px;
}

.mpesa-box h3 {
  color: #1b5e20;
}

.mpesa-number {
  font-size: 24px;
  font-weight: 800;
  font-family: monospace;
  color: #1b5e20;
  letter-spacing: 0.05em;
}

.devotee-hub-grid {
  display: grid;
  gap: 24px;
}

.calendar-card {
  border: 2px solid var(--maroon);
  border-radius: 12px;
  overflow: hidden;
}

.calendar-card__header {
  background: var(--maroon);
  color: #fff;
  padding: 16px 22px;
  font-weight: 800;
}

.calendar-card__body {
  padding: 22px;
  background: var(--card);
}

.parana-window {
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  background: var(--gold-soft);
}

body.dark-mode .parana-window {
  border-color: var(--gold);
}

.course-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.progress-bar {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 60%;
  background: var(--gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(128, 0, 32, 0.12), rgba(212, 172, 13, 0.18)),
    var(--gold-soft);
  display: flex;
  align-items: end;
  padding: 16px;
}

.gallery-item h3 {
  font-family: var(--font-sans);
  font-size: 16px;
}

.hidden {
  display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {


  .brand-text,
  .prabhupada-caption {
    display: none;
  }



  .header-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }




  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-grid-60-40,
  .split-40-60,
  .split-60-40,
  .split-50-50,
  .pillars-grid,
  .stats-ribbon,
  .course-layout {
    grid-template-columns: 1fr;
  }

  .signup-ribbon .form-inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 901px) {
  .brand-name-mobile {
    display: none !important;
  }
}
/* ===== ISOLATED ICON-ONLY NAV THEME SWITCH =====
   The icon itself is set by site.js (syncThemeControls), NOT by CSS.
   Do not add a ::before/::after content icon here — that was the
   cause of the "double icon" bug (JS content + CSS content, both
   rendering inside the same button at once). */
.theme-switch-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--maroon);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  position: relative;
  transition: background 0.2s, color 0.2s;
 }

 body.dark-mode .theme-switch-nav {
  color: var(--gold);
  border-color: var(--line);
 }

 .theme-switch-nav:hover {
  background: var(--gold-soft);
 }
 

/* ===== UNIFORM HEADER PARTS (moved out of inline styles) ===== */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.nav-container .header-nav { flex-grow: 1; }
.header-actions {
  display: flex;
  align-items: center;
  padding-right: 1rem;
  gap: 16px;
}
.profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #D4AC0D;
  color: #800020;
  text-decoration: none;
  background: #fff;
}
.drawer-logo { height: 56px; width: auto; }

/* ===== MEMBER AREA SUB-NAV ===== */
.member-subnav {
  background: var(--gold-soft, #fff7d6);
  border-bottom: 1px solid var(--line, #e5e5e5);
}
.member-subnav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.member-subnav a {
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--maroon, #800020);
  text-decoration: none;
}
.member-subnav a.active,
.member-subnav a:hover { background: var(--maroon, #800020); color: #fff; }

/* ===== FLOATING CONTACT BUTTONS (always visible, every page) ===== */
.float-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.float-whatsapp {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  text-decoration: none;
}
.float-whatsapp:hover { transform: scale(1.06); }

.float-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 8px;
  min-width: 220px;
}
.float-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--body-text, #222);
}
.float-menu a:hover { background: var(--gold-soft); }

/* ===== HONEST EMPTY STATES (shown until admin adds content) ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--line, #ccc);
  border-radius: 8px;
  color: var(--muted, #666);
}


/* Anything marked hidden stays hidden (used for not-yet-functional items) */
[hidden] { display: none !important; }

/* ===== AUTO-GENERATED PAGE-SECTION SIDEBAR =====
   Built at runtime by site.js from each page's own <h2> section headings.
   The hero banner stays full width above; sidebar + sections sit below it. */
.toc-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}
.toc-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h, 54px) + 12px);
  max-height: calc(100vh - var(--nav-h, 54px) - 24px);
  overflow-y: auto;
  padding: 20px 14px;
}
.toc-toggle { display: none; }
.toc-links h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 10px;
  margin: 0 0 8px;
}
.toc-links a {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--body-text);
  border-left: 2px solid transparent;
}
.toc-links a:hover { background: var(--gold-soft); }
.toc-links a.active { border-left-color: var(--maroon); color: var(--maroon); font-weight: 700; background: var(--gold-soft); }
.toc-content { flex: 1; min-width: 0; }

@media (max-width: 1100px) {
  .toc-layout { flex-direction: column; align-items: stretch; }
  .toc-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
  }
  .toc-toggle {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    color: var(--maroon);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
  }
  .toc-toggle::after { content: " \25BE"; }
  .toc-sidebar.open .toc-toggle::after { content: " \25B4"; }
  .toc-links { display: none; margin-top: 6px; }
  .toc-sidebar.open .toc-links { display: block; }
  .toc-links h3 { display: none; }
}

/* ===== ADMIN PANEL ===== */
.admin-tab-btn.active {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}
.admin-tab-btn:not(.active) {
  background: var(--card);
  color: var(--body-text);
}

/* ===== AUTH GUARD (member/admin pages) ===== */
body.auth-checking > * { visibility: hidden !important; }
body.auth-checking::before {
  content: "Checking your login...";
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--canvas); color: var(--maroon);
  font-family: var(--font-sans); font-size: 15px; z-index: 99999;
}


/* ============================================================
   HEADER v2
   Two separate pieces, never mixed:
   1) BRAND ROW: logo | maha-mantra | Prabhupada. Same arrangement on EVERY
      device; only the sizes scale. Nothing else is ever placed inside it.
   2) NAV BAR: menu button / links, profile icon, theme toggle. This is the part
      that stays stuck to the top while scrolling.
   ============================================================ */
:root {
  --brand-img: clamp(40px, 12vw, 86px);   /* logo and portrait scale together */
  --nav-h: 54px;
}
html { scroll-padding-top: calc(var(--nav-h) + 12px); }

.header-top {
  background: var(--band-bg);
  border-bottom: 1px solid var(--line);
}
.header-top__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(6px, 2vw, 20px);
  width: min(1200px, calc(100% - 16px));
  margin: 0 auto;
  padding: clamp(6px, 1.4vw, 14px) 0;
}
.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.2vw, 14px);
  min-width: 0;
}
.brand-logo {
  height: var(--brand-img);
  width: auto;
  flex-shrink: 0;
}
.prabhupada-block {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.2vw, 12px);
  min-width: 0;
}
.prabhupada-caption { max-width: clamp(120px, 16vw, 220px); }
.prabhupada-portrait {
  width: var(--brand-img);
  height: var(--brand-img);
  flex-shrink: 0;
}
.header-mantra {
  display: block;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
  container-type: inline-size;
}
.header-mantra p {
  margin: 0;
  white-space: nowrap;
  line-height: 1.35;
  font-size: clamp(6px, 2.1vw, 16px);          /* fallback for very old browsers */
}
@supports (font-size: 1cqw) {
  /* sized from the mantra's OWN available width, so each of the two lines
     always fits on one line, whatever the device */
  .header-mantra p { font-size: min(3.6cqw, 17px); }
}
@media (max-width: 900px) {
  .header-top__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}

.nav-container {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  padding: 0 clamp(8px, 2vw, 20px);
  background: var(--band-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.nav-container .menu-button { margin: 4px 0; }
