/* Anahata — Gallery page (matches index design tokens) */
:root {
  --green-950: #0d2818;
  --green-900: #1b4332;
  --green-700: #2d6a4f;
  --green-500: #40916c;
  --green-300: #74c69d;
  --green-100: #d8f3dc;
  --green-50:  #f0faf4;
  --amber-700: #c77a1a;
  --amber-500: #f4a261;
  --amber-300: #fcd5a5;
  --cream:     #faf7f2;
  --cream-200: #f0ebe3;
  --cream-300: #e5ddd3;
  --text-900:  #1a1a1a;
  --text-700:  #374151;
  --text-500:  #6b7280;
  --text-300:  #9ca3af;
  --white:     #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow:    0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.14);
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 24px;
  --ease: 0.3s ease;
  --section-pad: clamp(60px, 8vw, 100px);
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-900);
  background: var(--cream);
  line-height: 1.7;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
h1, h2 { font-family: 'Lora', serif; line-height: 1.25; }
button { font-family: 'Inter', sans-serif; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* ── Nav ─────────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250,247,242,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cream-300);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-mark { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; background: #fff; }
.nav-logo-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--green-900);
  line-height: 1.2;
}
.nav-logo-name span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-500);
}
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-700);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--green-700);
  background: var(--green-50);
}
.nav-links .nav-donate {
  background: var(--green-700);
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}
.nav-links .nav-donate:hover { background: var(--green-900) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-900);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--cream-200);
  padding: 10px 0 18px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-700);
  padding: 10px clamp(16px, 4vw, 48px);
  transition: color var(--ease), background var(--ease);
}
.nav-mobile a:hover { color: var(--green-700); background: var(--green-50); }
.nav-mobile a.active {
  color: var(--green-700);
  background: var(--green-50);
  font-weight: 600;
}
.nav-mobile .nav-donate {
  margin: 10px clamp(16px, 4vw, 48px) 0;
  text-align: center;
  background: var(--green-700);
  color: var(--white) !important;
  border-radius: 999px;
  padding: 11px 20px !important;
}

/* ── Page hero ───────────────────────────────────────────────── */
.gallery-page-hero {
  padding: clamp(48px, 8vw, 72px) 0 clamp(28px, 4vw, 40px);
  background: linear-gradient(165deg, var(--green-900) 0%, var(--green-700) 55%, #388e5e 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.gallery-page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(252,213,165,.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.gallery-page-hero .section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-300);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.gallery-page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  max-width: 16ch;
}
.gallery-page-hero .lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  max-width: 52ch;
  line-height: 1.75;
}
.gallery-page-hero .back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--amber-300);
}
.gallery-page-hero .back-home:hover { text-decoration: underline; }

/* ── Filter bar ──────────────────────────────────────────────── */
.gallery-main { padding: var(--section-pad) 0; background: var(--white); }
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 4vw, 36px);
}
.gallery-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px;
  background: var(--cream);
  border: 1px solid var(--cream-300);
  border-radius: 999px;
}
.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-700);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}
.gallery-filter-btn svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.gallery-filter-btn:hover { color: var(--green-700); background: var(--white); }
.gallery-filter-btn.active {
  background: var(--green-700);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(45,106,79,.35);
}
.gallery-filter-btn.active svg { opacity: 1; }
.filter-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
}
.gallery-filter-btn.active .filter-count {
  background: rgba(255,255,255,.22);
}
.gallery-result-hint {
  font-size: 0.875rem;
  color: var(--text-500);
}

/* ── Grid ────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  background: var(--cream-200);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.gallery-item.is-hidden {
  display: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  min-height: 0;
  transition: transform var(--ease);
  cursor: zoom-in;
}
.gallery-item iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  border-radius: var(--radius);
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.video-item { background: #0d2818; }

.video-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13,40,24,.75);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.video-badge svg { width: 14px; height: 14px; }

.gallery-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--ease);
}
.btn-primary {
  background: var(--amber-500);
  color: var(--white);
  border-color: var(--amber-500);
}
.btn-primary:hover {
  background: var(--amber-700);
  border-color: var(--amber-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244,162,97,.4);
}
.btn-outline-green {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.btn-outline-green:hover { background: var(--green-700); color: var(--white); }

/* ── Lightbox ────────────────────────────────────────────────── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 32px);
  background: rgba(10, 16, 12, 0.86);
  backdrop-filter: blur(4px);
}
.gallery-lightbox.open { display: flex; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  cursor: zoom-out;
}
.lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lightbox-image {
  max-width: 100%;
  max-height: calc(92vh - 62px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #111;
}
.lightbox-caption {
  color: rgba(255,255,255,.88);
  font-size: 0.9rem;
  text-align: center;
  max-width: 80ch;
}
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.45rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--ease), opacity var(--ease);
}
.lightbox-nav:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.lightbox-nav:disabled { opacity: 0.35; cursor: default; }
.lightbox-prev { left: clamp(8px, 2vw, 20px); }
.lightbox-next { right: clamp(8px, 2vw, 20px); }
.lightbox-counter {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.35);
  padding: 6px 12px;
  border-radius: 999px;
}

.site-footer {
  padding: 28px 0;
  background: var(--green-950);
  color: rgba(255,255,255,.7);
  font-size: 0.8125rem;
  text-align: center;
}
.site-footer a { color: var(--green-300); font-weight: 600; }

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-item.tall { grid-row: span 1; }
  .gallery-filters { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .gallery-filter-btn { padding: 8px 14px; font-size: 0.8125rem; }
  .gallery-item.wide { grid-column: span 2; }
}
