/* ================================================================
   NAVA GRAHA MANDIR — STYLESHEET
   Pure CSS3, no frameworks. Organised by section for easy editing.
   ================================================================ */

/* ----------------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------------- */
:root {
  /* Palette */
  --white: #ffffff;
  --cream: #fbf6ec;
  --cream-deep: #f2e8d0;
  --gold: #c8a13c;
  --gold-light: #e6c877;
  --saffron: #e07a2c;
  --soft-orange: #f0994d;
  --maroon: #6b1e23;
  --maroon-deep: #4a1418;
  --forest: #1f4b3f;
  --forest-deep: #163a30;
  --ink: #2c2115;
  --ink-soft: #55483a;

  /* Type */
  --font-display: "Cinzel", "Noto Serif Devanagari", serif;
  --font-body: "Noto Serif", "Noto Serif Devanagari", serif;
  --font-accent: "Merriweather", serif;
  --font-ui: "Poppins", sans-serif;

  /* Rhythm */
  --radius: 14px;
  --radius-lg: 26px;
  --shadow-soft: 0 10px 30px rgba(74, 20, 24, 0.12);
  --shadow-card: 0 6px 20px rgba(74, 20, 24, 0.1);
  --section-pad: 6rem 1.5rem;
}

/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

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

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

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--maroon-deep);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-bottom: 0.6rem;
}
h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
}

.section-eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--saffron);
  margin-bottom: 0.6rem;
}

.section-intro {
  max-width: 640px;
  color: var(--ink-soft);
  margin: 0.8rem auto 3rem;
  font-size: 1.02rem;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.editable-note {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--forest);
  background: rgba(31, 75, 63, 0.08);
  border-left: 3px solid var(--forest);
  padding: 0.7rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.4rem;
}

.editable-note code {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.06);
  padding: 0 4px;
  border-radius: 3px;
}

/* Alternate section backgrounds for gentle visual rhythm */
.about-section {
  background: var(--white);
}
.history-section {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}
.navagraha-section {
  background: var(--white);
}
.gallery-section {
  background: var(--cream);
}
.festivals-section {
  background: var(--white);
}
.schedule-section {
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 100%);
}
.committee-section {
  background: var(--white);
}
.donation-section {
  background: linear-gradient(
    135deg,
    var(--maroon-deep) 0%,
    var(--maroon) 55%,
    var(--saffron) 130%
  );
  color: var(--cream);
}
.contact-section {
  background: var(--cream);
}

/* Section divider: a row of nine small marigold-gold discs, echoing the
   temple's nine circumambulations — used between major sections */
.section::before {
  content: "";
  display: block;
  width: 220px;
  height: 10px;
  margin: 0 auto 3rem;
  background-image: radial-gradient(
    circle,
    var(--gold) 0 3px,
    transparent 3.5px
  );
  background-size: 24px 10px;
  background-repeat: repeat-x;
  opacity: 0.6;
}
.hero::before,
.donation-section::before {
  display: none;
}

/* ----------------------------------------------------------------
   3. BUTTONS
   ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: var(--maroon-deep);
  box-shadow: 0 8px 20px rgba(224, 122, 44, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(224, 122, 44, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(251, 246, 236, 0.7);
}
.btn-outline:hover {
  background: rgba(251, 246, 236, 0.15);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------------
   4. HEADER & NAVIGATION
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107, 30, 35, 0.12);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-np {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--maroon-deep);
}
.brand-en {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--forest);
  text-transform: uppercase;
}
.brand-sub {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.main-nav ul {
  display: flex;
  gap: 1.9rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
/* ============================================================
   NOTICE BAR
============================================================ */

.notice-bar {
  display: flex;
  align-items: center;
  background: #f7f1dc;
  border-top: 2px solid #d4af37;
  border-bottom: 2px solid #d4af37;
  overflow: hidden;
  height: 48px;
}

.notice-title {
  background: #8b0000;
  color: #fff;
  font-weight: bold;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.notice-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.notice-slider {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  white-space: nowrap;
  color: #222;
  font-weight: 600;
  will-change: left;
}

.notice-slider a {
  color: inherit;
  text-decoration: none;
}

.notice-slider a:hover {
  text-decoration: underline;
}

.dark-mode .notice-bar {
  background: #132a13;
  border-color: #4caf50;
}

.dark-mode .notice-title {
  background: #0b5d1e;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* Pause when hovering */
.notice-wrapper:hover .notice-track {
  animation-play-state: paused;
}

/* Mobile */

@media (max-width: 768px) {
  .notice-bar {
    height: 42px;
  }

  .notice-label {
    padding: 0 14px;
    font-size: 13px;
  }

  .notice-track span {
    font-size: 13px;
  }
}

.main-nav a {
  position: relative;
  padding: 0.3rem 0;
  color: var(--ink);
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--saffron);
  transition: width 0.25s ease;
}
.main-nav a:hover {
  color: var(--saffron);
}
.main-nav a:hover::after {
  width: 100%;
}

/* Mobile nav toggle (checkbox hack, no JS) */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle-label span {
  width: 26px;
  height: 2.5px;
  background: var(--maroon-deep);
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   5. HERO SECTION
   ---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   HERO IMAGE SLIDER
---------------------------------------------------------------- */
.hero-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
}

.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(74, 20, 24, 0.55) 0%,
    rgba(74, 20, 24, 0.35) 45%,
    rgba(31, 75, 63, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
  padding: 0 1.5rem;
  color: var(--cream);
}

.hero .eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--cream);
  font-size: clamp(2rem, 5vw, 3.4rem);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.2rem;
}

.hero-tagline {
  font-family: var(--font-accent);
  font-weight: 300;
  font-size: 1.08rem;
  color: var(--cream-deep);
  margin-bottom: 2.2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream);
  font-size: 1.4rem;
  opacity: 0.8;
  animation: float-down 2.4s ease-in-out infinite;
}
@keyframes float-down {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, 8px);
    opacity: 1;
  }
}

/* ----------------------------------------------------------------
   6. ABOUT SECTION
   ---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.about-text h2 {
  margin-bottom: 1.2rem;
}
.about-text p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

/* ----------------------------------------------------------------
   7. HISTORY / TIMELINE
   ---------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 2.2rem;
  border-left: 2px solid var(--gold-light);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.6rem 1.8rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  background: var(--saffron);
  border: 3px solid var(--cream);
  outline: 2px solid var(--gold);
  border-radius: 50%;
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  box-shadow: var(--shadow-card);
}

.timeline-year {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--forest);
  background: rgba(31, 75, 63, 0.08);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.timeline-card p {
  color: var(--ink-soft);
}

.history-photo {
  margin-top: 3.5rem;
  text-align: center;
}
.history-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  max-width: 720px;
  margin: 0 auto;
}
.caption {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
}

/* ----------------------------------------------------------------
   8. CARD GRIDS (shared by Navagraha / Festivals / Committee)
   ---------------------------------------------------------------- */
.grid-cards {
  display: grid;
  gap: 1.8rem;
}

.navagraha-grid {
  grid-template-columns: repeat(3, 1fr);
}
.festival-grid {
  grid-template-columns: repeat(3, 1fr);
}
.committee-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Planet cards */
.planet-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-align: center;
  padding-bottom: 1.6rem;
}
.planet-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.planet-card img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: #f8f5ec;
  display: block;
}

.planet-card h3 {
  margin: 1.1rem 1rem 0.4rem;
}
.planet-en {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 400;
}
.planet-card p {
  padding: 0 1.3rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* ----------------------------------------------------------------
   9. GALLERY (CSS-only hover, no JS)
   ---------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
}

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

.gallery-item:hover img {
  transform: scale(1.12);
  filter: saturate(1.15) brightness(1.03);
}

/* ----------------------------------------------------------------
   10. FESTIVAL CARDS
   ---------------------------------------------------------------- */
.festival-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.festival-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.festival-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.festival-body {
  padding: 1.3rem 1.4rem 1.6rem;
}

.festival-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--saffron);
  text-transform: uppercase;
}

.festival-body p {
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

/* ----------------------------------------------------------------
   11. WORSHIP SCHEDULE TABLE
   ---------------------------------------------------------------- */
.table-wrap {
  max-width: 860px;
  margin: 0 auto;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.schedule-table thead {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  color: var(--cream);
}

.schedule-table th,
.schedule-table td {
  padding: 1rem 1.4rem;
  text-align: left;
}

.schedule-table tbody tr:nth-child(even) {
  background: var(--cream);
}
.schedule-table tbody tr:hover {
  background: rgba(230, 200, 119, 0.25);
}
.schedule-table td:first-child {
  font-weight: 600;
  color: var(--maroon-deep);
}

/* ----------------------------------------------------------------
   12. TEMPLE COMMITTEE
   ---------------------------------------------------------------- */
/* Committee Grid */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* Committee Card */
.committee-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.committee-card:hover {
  transform: translateY(-6px);
}

/* Same image size for all cards */
.committee-card img {
  width: 100%;
  height: 320px; /* Fixed height */
  object-fit: cover; /* Crop instead of stretching */
  display: block;
}

.committee-card h3 {
  margin: 1rem 0 0.25rem;
  font-size: 1.1rem;
}

.committee-role {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--forest);
  margin-bottom: 0.3rem;
}

.committee-phone {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

/* ----------------------------------------------------------------
   13. DONATION SECTION
   ---------------------------------------------------------------- */
.donation-section h2 {
  color: var(--cream);
}
.donation-section .section-eyebrow {
  color: var(--gold-light);
}
.donation-section p {
  color: var(--cream-deep);
}

.donation-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: center;
}

.donation-details {
  background: rgba(251, 246, 236, 0.1);
  border: 1px solid rgba(251, 246, 236, 0.25);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.4rem 0;
}
.donation-details p {
  margin-bottom: 0.4rem;
  color: var(--cream);
}
.donation-details strong {
  color: var(--gold-light);
}

.donation-section .editable-note {
  background: rgba(251, 246, 236, 0.12);
  color: var(--cream-deep);
  border-left-color: var(--gold-light);
}
.donation-section .editable-note code {
  background: rgba(255, 255, 255, 0.15);
}

.donation-qr {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.donation-qr img {
  border-radius: var(--radius);
  margin: 0 auto;
}
.donation-qr .caption {
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------
   14. CONTACT SECTION
   ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info address {
  font-style: normal;
}
.contact-info address p {
  margin-bottom: 1rem;
  color: var(--ink-soft);
}
.contact-info address strong {
  color: var(--maroon-deep);
  font-family: var(--font-ui);
}
.contact-info a:hover {
  color: var(--saffron);
}

.social-icons {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon);
  color: var(--cream);
  font-family: var(--font-ui);
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.social-icon:hover {
  background: var(--saffron);
  transform: translateY(-3px);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 340px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

/* ----------------------------------------------------------------
   15. FOOTER
   ---------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, var(--forest-deep) 0%, #0f2620 100%);
  color: var(--cream-deep);
  padding-top: 4rem;
  transition: background 0.3s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(251, 246, 236, 0.12);
}

.footer-brand .brand-np {
  font-size: 1.15rem;
  color: var(--gold-light);
  display: block;
}
.footer-brand .brand-en {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  display: block;
  margin: 0.3rem 0 0.6rem;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--cream-deep);
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-ui);
  color: var(--gold-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.footer-links ul li {
  margin-bottom: 0.55rem;
}
.footer-links a,
.footer-contact a {
  font-size: 0.92rem;
  color: var(--cream-deep);
  transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold-light);
}
.footer-contact p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  color: var(--cream-deep);
}

.footer-bottom {
  text-align: center;
  padding: 1.4rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: rgba(251, 246, 236, 0.6);
}

/* ================================================================
   16. RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet / small laptop */
@media (max-width: 1024px) {
  .navagraha-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .committee-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-grid,
  .donation-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-image,
  .donation-qr {
    order: -1;
  }
}

/* Tablet portrait */
@media (max-width: 860px) {
  .festival-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .navagraha-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --section-pad: 4rem 1.2rem;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle-label {
    display: flex;
  }

  .main-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }
  .main-nav a {
    display: block;
    padding: 0.7rem 0.2rem;
    border-top: 1px solid rgba(107, 30, 35, 0.08);
  }
  .nav-toggle:checked ~ .main-nav {
    max-height: 400px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .navagraha-grid {
    grid-template-columns: 1fr;
  }
  .festival-grid {
    grid-template-columns: 1fr;
  }
  .committee-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .social-icons {
    justify-content: center;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ================================================================
   17. DARK MODE
   Overrides the core palette tokens. Because the whole stylesheet is
   built on CSS custom properties, most components re-skin automatically.
   ================================================================ */
[data-theme="dark"] {
  --white: #1c1712;
  --cream: #14100c;
  --cream-deep: #1f1a13;
  --gold: #c8a13c;
  --gold-light: #e9cd7f;
  --saffron: #e78a3f;
  --soft-orange: #f0994d;
  --maroon: #9c343b;
  --maroon-deep: #4a1418;
  --forest: #3a7a65;
  --forest-deep: #163a30;
  --ink: #ece3d3;
  --ink-soft: #c6bba6;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] body {
  background: var(--cream);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: var(--gold-light);
}

[data-theme="dark"] .site-header {
  background: rgba(20, 16, 12, 0.92);
  border-bottom-color: rgba(233, 205, 127, 0.14);
}

[data-theme="dark"] .btn-primary {
  color: #1c1712;
}

[data-theme="dark"] .main-nav a {
  color: var(--ink);
}

[data-theme="dark"] .nav-toggle-label span {
  background: var(--gold-light);
}

[data-theme="dark"] .editable-note {
  background: rgba(233, 205, 127, 0.08);
  border-left-color: var(--forest);
  color: var(--ink);
}
[data-theme="dark"] .editable-note code {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .timeline {
  border-left-color: var(--gold);
}
[data-theme="dark"] .timeline-marker {
  border-color: var(--cream);
}

[data-theme="dark"] .planet-card img {
  background: #201a13;
}

[data-theme="dark"] .schedule-table thead {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
}
[data-theme="dark"] .schedule-table tbody tr:hover {
  background: rgba(233, 205, 127, 0.1);
}

[data-theme="dark"] .contact-map {
  filter: brightness(0.85) contrast(1.05);
}

[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, #0d1512 0%, #070c0a 100%);
}

/* ----------------------------------------------------------------
   18. HEADER CONTROLS (theme + language toggle buttons)
   ---------------------------------------------------------------- */

/* Keep the brand pinned left and push controls + nav to the right,
   instead of relying on space-between across every child. */
.header-inner {
  justify-content: flex-start;
}
.brand {
  margin-right: auto;
}

.site-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--maroon-deep);
  background: rgba(200, 161, 60, 0.12);
  border: 1.5px solid rgba(200, 161, 60, 0.35);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease,
    border-color 0.25s ease;
}
.control-btn:hover {
  background: rgba(200, 161, 60, 0.22);
  transform: translateY(-1px);
}

[data-theme="dark"] .control-btn {
  color: var(--gold-light);
  background: rgba(233, 205, 127, 0.1);
  border-color: rgba(233, 205, 127, 0.3);
}
[data-theme="dark"] .control-btn:hover {
  background: rgba(233, 205, 127, 0.18);
}

/* Theme toggle: swap sun/moon icon depending on current mode */
#theme-toggle .icon-moon {
  display: none;
}
#theme-toggle .icon-sun {
  display: inline-block;
}
[data-theme="dark"] #theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] #theme-toggle .icon-moon {
  display: inline-block;
}

.lang-btn .lang-icon {
  font-size: 0.95rem;
}
.lang-btn .lang-label {
  white-space: nowrap;
}

/* Mobile: keep controls compact and let them sit next to the burger */
@media (max-width: 640px) {
  .site-controls {
    margin-left: 0.5rem;
    gap: 0.4rem;
  }
  .control-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }
}