/*
Theme Name: Ramakrishna Math Simultala
Theme URI: https://ramkrishnamathsimultala.org
Description: WordPress-ready HTML design for Ramakrishna Math Simultala — spiritual centre website with seva karya, philosophy, gallery, and donation pages.
Version: 1.0.0
Author: Ramakrishna Math Simultala
Text Domain: rkm-simultala
*/

/* ── Design tokens (match React/Tailwind project) ── */
:root {
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;
  --saffron-50: #fff9f0;
  --saffron-100: #fff3e0;
  --saffron-200: #ffe0b2;
  --saffron-300: #ffcc80;
  --saffron-400: #ffb74d;
  --saffron-500: #ff9800;
  --saffron-600: #f57c00;
  --saffron-700: #e65100;
  --cream: #faf6f0;
  --gold: #c9a227;
  --maroon: #6b3a2a;
  --maroon-80: rgba(107, 58, 42, 0.8);
  --maroon-70: rgba(107, 58, 42, 0.7);
  --maroon-60: rgba(107, 58, 42, 0.6);
  --header-h: 72px;
  --container: 80rem;
  --radius: 1rem;
  --shadow: 0 10px 40px rgba(107, 58, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--maroon);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.font-serif { font-family: var(--font-serif); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

.section-padding { padding: 4rem 1rem; }
@media (min-width: 768px) { .section-padding { padding: 6rem 2rem; } }

.site-main { flex: 1; padding-top: var(--header-h); }

/* Glass */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(to right, var(--saffron-500), var(--saffron-600));
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(to right, var(--saffron-600), var(--saffron-700));
  box-shadow: 0 6px 20px rgba(245, 124, 0, 0.45);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--maroon);
}
.btn-outline:hover { background: rgba(201, 162, 39, 0.1); }
.btn-white {
  background: #fff;
  color: var(--saffron-700);
}
.btn-white:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.8);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

/* Section title */
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title.left { text-align: left; }
.section-title .subtitle {
  color: var(--saffron-600);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-title h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--maroon);
  font-weight: 600;
}
.section-title .underline {
  margin-top: 1rem;
  height: 4px;
  width: 5rem;
  background: linear-gradient(to right, var(--gold), var(--saffron-400));
  border-radius: 2px;
}
.section-title.center .underline { margin-left: auto; margin-right: auto; }

/* ── Divine minimal reveal animations (Math / ashram tone) ── */
@keyframes divineEmergence {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.divine-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.divine-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Softer motion for sacred quote & CTA bands */
.quote-band .divine-reveal,
.cta-band .divine-reveal {
  transform: translateY(8px);
  transition-duration: 1.1s;
}

/* Section title underline draws in gently */
.section-title .underline {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.section-title.center .underline,
.section-title .underline.center { transform-origin: center; }
.section-title.is-visible .underline { transform: scaleX(1); }

/* Hero slider — quiet entrance */
.hero-content > * {
  opacity: 0;
  animation: divineEmergence 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.25s; }
.hero-content > *:nth-child(2) { animation-delay: 0.45s; }
.hero-content > *:nth-child(3) { animation-delay: 0.65s; }

/* Header & footer — subtle presence */
.site-header {
  opacity: 0;
  transition: opacity 0.9s ease;
}
body.is-ready .site-header { opacity: 1; }

.site-footer .footer-brand,
.site-footer .footer-col {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-footer .footer-col:nth-child(2) { transition-delay: 80ms; }
.site-footer .footer-col:nth-child(3) { transition-delay: 160ms; }
.site-footer.is-visible .footer-brand,
.site-footer.is-visible .footer-col {
  opacity: 1;
  transform: translateY(0);
}

.site-footer .footer-bottom {
  opacity: 0;
  transition: opacity 1s ease 0.25s;
}
.site-footer.is-visible .footer-bottom { opacity: 1; }

/* Prose */
.prose-spiritual h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--saffron-700);
  margin: 2rem 0 1rem;
}
.prose-spiritual h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--maroon);
  margin: 1.5rem 0 0.75rem;
}
.prose-spiritual h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--maroon);
  margin: 1rem 0 0.5rem;
}
.prose-spiritual p {
  color: var(--maroon-80);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.prose-spiritual p.lead {
  font-size: 1.125rem;
  color: rgba(107, 58, 42, 0.9);
  font-weight: 500;
}
.prose-spiritual ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--maroon-70);
}
.prose-spiritual li { margin-bottom: 0.5rem; line-height: 1.7; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.brand-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--maroon);
  line-height: 1.2;
}
.brand-text{text-decoration:none; color:inherit;}
.brand-sub { font-size: 0.7rem; color: var(--maroon-60); letter-spacing: 0.15em; text-transform: uppercase; }

.custom-logo-link{ display:flex; align-items:center;}

.custom-logo{ width:56px; height:56px; object-fit:contain;}


.main-nav { display: none;  align-items: center; gap: 0.15rem; flex-wrap: wrap;}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
    }
}

/* WordPress ul */
.main-nav ul { display: flex;  align-items: center;  gap: 0.15rem;  list-style: none;  margin: 0;  padding: 0; }

.main-nav li { list-style: none; margin: 0; padding: 0; }

.main-nav a { display: block; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-radius: 9999px; color: var(--maroon-70); text-decoration: none; transition: color 0.2s, background 0.2s;}

.main-nav a:hover { color: var(--saffron-600); }

/* WordPress Active Menu */
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-menu-parent > a {
    background: var(--saffron-100);
    color: var(--saffron-700);
    font-weight: 500;
}


.header-donate { display: none; font-size: 0.875rem; padding: 0.5rem 1rem; }
@media (min-width: 768px) { .header-donate { display: inline-flex; } }

.nav-toggle {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--maroon);
  cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--saffron-100);
  background: rgba(255,255,255,0.95);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 0.85rem 1rem;
  color: var(--maroon);
  border-radius: 0.5rem;
}
.mobile-nav a:hover { background: var(--saffron-50); }

/* ── Hero slider ── */
.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
}
@media (min-width: 768px) { .hero-slider { height: 85vh; } }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(107,58,42,0.85) 0%, rgba(107,58,42,0.35) 50%, rgba(107,58,42,0.2) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 2rem;
}
.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.75rem);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-content p { font-size: 1.1rem; color: var(--saffron-200); letter-spacing: 0.05em; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
}
.hero-nav-btn:hover { background: rgba(255,255,255,0.4); }
.hero-nav-btn.prev { left: 1rem; }
.hero-nav-btn.next { right: 1rem; }

.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.hero-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.hero-dots button.active { width: 24px; border-radius: 4px; background: var(--saffron-400); }

/* Page hero bands */
.page-hero {
  height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  color: #fff;
}
.page-hero.maroon { background: var(--maroon); }
.page-hero.saffron { background: linear-gradient(to right, var(--saffron-600), var(--saffron-700)); }
.page-hero.cream {
  background: linear-gradient(135deg, var(--saffron-100), var(--cream), var(--saffron-50));
  color: var(--maroon);
}
.page-hero .eyebrow { font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--saffron-300); margin-bottom: 0.5rem; }
.page-hero.cream .eyebrow { color: var(--saffron-600); }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3rem); }
.page-hero .tagline { margin-top: 0.75rem; opacity: 0.85; max-width: 36rem; margin-left: auto; margin-right: auto; font-size: 0.95rem; }

/* Grids */
.grid-2 { display: grid; gap: 2rem; }
.grid-3 { display: grid; gap: 1.5rem; }
.grid-4 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-2.sm-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .grid-2.md-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3.md-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-2.lg-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3.lg-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4.lg-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(107,58,42,0.12); }
.card-img { width: 100%; height: 12rem; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { font-family: var(--font-serif); font-size: 1.25rem; color: var(--maroon); margin-bottom: 0.5rem; }
.card-body p { font-size: 0.9rem; color: var(--maroon-70); }
.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron-600);
  margin-bottom: 0.5rem;
}

.quote-card {
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
}
.quote-card .mark {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--saffron-200);
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}
.quote-card blockquote {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: rgba(107,58,42,0.9);
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
}
.quote-card footer { margin-top: 1rem; color: var(--saffron-700); font-weight: 500; font-style: normal; }

.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .num {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--saffron-600);
}
.stat-card .label { font-size: 0.9rem; color: var(--maroon-70); margin-top: 0.25rem; }

.belief-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--saffron-500);
}
.belief-card h3 { font-family: var(--font-serif); font-size: 1.125rem; color: var(--maroon); margin-bottom: 0.5rem; }
.belief-card p { font-size: 0.9rem; color: var(--maroon-70); }

.program-card { border-radius: var(--radius); overflow: hidden; }
.program-header {
  background: linear-gradient(to right, var(--saffron-600), var(--saffron-700));
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.program-header .icon {
  width: 3rem; height: 3rem;
  background: rgba(255,255,255,0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.program-header h2 { font-family: var(--font-serif); font-size: 1.25rem; }
.program-header .summary { font-size: 0.85rem; color: var(--saffron-100); margin-top: 0.25rem; }
.program-body { padding: 1.5rem 2rem; }
.program-body .impact {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--saffron-50);
  border: 1px solid var(--saffron-100);
  border-radius: var(--radius);
}
.program-body ul { list-style: none; padding: 0; margin-top: 1rem; }
.program-body ul li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--maroon-70);
  margin-bottom: 0.5rem;
}
.program-body ul li::before { content: "•"; color: var(--saffron-500); }

.check-list li {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--saffron-100);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--maroon-80);
  margin-bottom: 0.75rem;
}
.check-list .check { color: var(--saffron-600); font-weight: bold; }

/* CTA band */
.cta-band {
  background: linear-gradient(to right, var(--saffron-600), var(--saffron-700));
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}
.cta-band h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 1rem; }
.cta-band p { opacity: 0.9; max-width: 32rem; margin: 0 auto 2rem; }
.cta-band .btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* Quote band */
.quote-band {
  background: var(--maroon);
  color: var(--cream);
  text-align: center;
  padding: 4rem 1rem;
}
.quote-band .eyebrow { color: var(--saffron-300); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.quote-band blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-style: italic;
  color: var(--saffron-100);
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.5;
}
.quote-band .author { margin-top: 1.5rem; color: var(--saffron-300); font-weight: 500; }
.quote-band .note { margin-top: 1rem; font-size: 0.875rem; color: rgba(250,246,240,0.6); max-width: 36rem; margin-left: auto; margin-right: auto; }

/* Gallery masonry */
@keyframes galleryFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes galleryShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes lightboxBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightboxImageIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes galleryIconPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.gallery-grid {
  columns: 2;
  column-gap: 1rem;
}
@media (min-width: 768px) { .gallery-grid { columns: 3; } }
@media (min-width: 1024px) { .gallery-grid { columns: 4; } }

.gallery-item {
  display: block;
  margin-bottom: 1rem;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(107, 58, 42, 0.08);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item.is-visible {
  animation: galleryFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--gallery-delay, 0ms);
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(107, 58, 42, 0) 40%,
    rgba(107, 58, 42, 0.45) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-item::after {
  content: "⊕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  background: rgba(245, 124, 0, 0.85);
  border-radius: 50%;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.gallery-item:hover {
  box-shadow: 0 12px 32px rgba(107, 58, 42, 0.14);
  transform: translateY(-2px) scale(1.01);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-item:hover::before { opacity: 1; }

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* Skeleton shimmer while images load */
.gallery-item.is-loading img {
  min-height: 10rem;
  background: linear-gradient(
    90deg,
    var(--saffron-100) 25%,
    var(--saffron-50) 50%,
    var(--saffron-100) 75%
  );
  background-size: 200% 100%;
  animation: galleryShimmer 1.4s ease-in-out infinite;
}

.gallery-item.is-loaded.is-loading img {
  animation: none;
  background: none;
  min-height: 0;
}

/* Homepage gallery preview */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) { .gallery-preview-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-preview-grid .gallery-item {
  margin-bottom: 0;
}

.gallery-preview-grid .gallery-item img {
  max-height: 10rem;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item.is-visible,
  .gallery-item img,
  .lightbox.open,
  .lightbox.open img,
  .divine-reveal,
  .divine-reveal.is-visible,
  .hero-content > *,
  .site-header,
  .site-footer .footer-brand,
  .site-footer .footer-col,
  .site-footer .footer-bottom {
    animation: none !important;
    transition: none !important;
  }
  .gallery-item,
  .divine-reveal,
  .site-header,
  .site-footer .footer-brand,
  .site-footer .footer-col {
    opacity: 1;
    transform: none;
  }
  .section-title .underline { transform: scaleX(1); }
  body.is-ready .site-header { opacity: 1; }
  .site-footer.is-visible .footer-bottom { opacity: 1; }
}

/* Legacy selector support */
.gallery-grid a:not(.gallery-item) {
  display: block;
  margin-bottom: 1rem;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-grid a:not(.gallery-item) img { width: 100%; transition: opacity 0.3s; }
.gallery-grid a:not(.gallery-item):hover img { opacity: 0.9; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.filter-pills button {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--saffron-200);
  background: #fff;
  color: var(--maroon);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.filter-pills button.active,
.filter-pills button:hover {
  background: var(--saffron-600);
  color: #fff;
  border-color: var(--saffron-600);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; color: var(--maroon); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--saffron-200);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--maroon);
  background: #fff;
  outline: none;
  transition: box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.25);
}
.form-status { font-size: 0.875rem; color: var(--saffron-700); background: var(--saffron-50); padding: 0.75rem; border-radius: 0.5rem; margin-top: 1rem; display: none; }
.form-status.show { display: block; }

/* Tabs */
.tabs { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.tabs button {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid var(--saffron-200);
  background: #fff;
  cursor: pointer;
  text-transform: capitalize;
}
.tabs button.active { background: var(--saffron-600); color: #fff; border-color: var(--saffron-600); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Timeline */
.timeline { border-left: 2px solid var(--saffron-200); padding-left: 2rem; }
.timeline-item { margin-bottom: 2rem; }
.timeline-item .year { color: var(--saffron-600); font-weight: 500; font-size: 0.875rem; }
.timeline-item h3 { font-family: var(--font-serif); font-size: 1.25rem; margin: 0.25rem 0; }
.timeline-item p { font-size: 0.9rem; color: var(--maroon-70); }

/* Values grid */
.value-pill {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(201,162,39,0.3);
  text-align: center;
  background: #fff;
  transition: background 0.2s;
}
.value-pill:hover { background: var(--saffron-50); }
.value-pill img { width: 2.5rem; height: 2.5rem; margin: 0 auto 0.75rem; object-fit: contain; }

/* Footer */
.site-footer {
  background: linear-gradient(to bottom, var(--maroon), rgba(107,58,42,0.95));
  color: var(--cream);
  margin-top: auto;
}
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 4rem 1rem 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand img { width: 3.5rem; height: 3.5rem; margin-bottom: 0.75rem; }
.footer-brand h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.875rem; color: rgba(250,246,240,0.7); max-width: 24rem; line-height: 1.7; }
.footer-col h4 { color: var(--saffron-200); font-weight: 500; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.875rem; color: rgba(250,246,240,0.7); transition: color 0.2s; }
.footer-col a:hover { color: var(--saffron-300); }
.footer-bottom {
  border-top: 1px solid rgba(250,246,240,0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(250,246,240,0.5);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: background 0.35s ease;
}
.lightbox.open {
  display: flex;
  background: rgba(0, 0, 0, 0.92);
  animation: lightboxBackdropIn 0.35s ease forwards;
}
.lightbox.open img {
  animation: lightboxImageIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
  z-index: 10;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover {
  background: rgba(245, 124, 0, 0.6);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* Utility backgrounds */
.bg-white { background: #fff; }
.bg-saffron-50 { background: var(--saffron-50); }
.bg-gradient-cream { background: linear-gradient(to bottom, var(--saffron-50), var(--cream)); }

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.space-y-10 > * + * { margin-top: 2.5rem; }

.rounded-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-height: 24rem; object-fit: cover; }

/* Event card date */
.event-date {
  text-align: center;
  min-width: 4rem;
}
.event-date .day { font-family: var(--font-serif); font-size: 1.5rem; color: var(--saffron-600); }
.event-date .month { font-size: 0.75rem; color: var(--maroon-60); text-transform: uppercase; }

.donation-box {
  border-radius: var(--radius);
  padding: 2rem;
}
.donation-box h3 { font-family: var(--font-serif); font-size: 1.25rem; margin-bottom: 1rem; }
.donation-box dl { font-size: 0.9rem; }
.donation-box dt { font-weight: 600; color: var(--maroon); margin-top: 0.75rem; }
.donation-box dd { color: var(--maroon-70); }

.qr-placeholder {
  width: 12rem; height: 12rem;
  background: var(--saffron-50);
  border: 2px dashed var(--saffron-200);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--maroon-60);
  margin: 1rem auto;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  height: 16rem;
  background: var(--saffron-50);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
