/* ============================================================================
   style.css  —  BRĪVI KRISTŪ
   ----------------------------------------------------------------------------
   Structure of this file:
     1. CSS variables (colors, fonts, spacing)  ← tweak brand here
     2. Reset & base
     3. Buttons & shared section styles
     4. Top navbar
     5. Side dot navigation
     6. Section: Hero
     7. Section: About
     8. Section: Stream
     9. Section: Events (+ carousel)
    10. Section: Services & House groups
    11. Section: Accept Jesus
    12. Section: Gallery
    13. Section: Donations
    14. Section: Contacts
    15. Footer
    16. Modal (events)
    17. Lightbox (gallery)
    18. Scroll-reveal animation
    19. Responsive / mobile
   ============================================================================ */


/* ============================================================================
   1. CSS VARIABLES  —  change the brand look here
   ============================================================================ */
:root {
  /* Brand colors */
  --color-gold:    #BE9144;   /* primary accent */
  --color-navy:    #1E2A38;   /* primary background */
  --color-cream:   #F5F1EA;   /* light text / soft backgrounds */
  --color-graphite:#20242B;   /* dark sections / footer */
  --color-overlay: rgba(30, 42, 56, 0.85); /* dark overlay */

  /* Derived / helper colors */
  --color-gold-soft: rgba(190, 145, 68, 0.15);
  --color-cream-dim: rgba(245, 241, 234, 0.72);
  --color-line:      rgba(245, 241, 234, 0.12);

  /* Typography */
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  /* Layout */
  --max-width: 1100px;
  --radius:    14px;
  --radius-sm: 8px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


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

html {
  scroll-behavior: smooth;       /* smooth scrolling between sections */
  scroll-padding-top: 80px;      /* keep anchored sections clear of the navbar */
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  background-color: var(--color-navy);
  color: var(--color-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}


/* ============================================================================
   3. BUTTONS & SHARED SECTION STYLES
   ============================================================================ */

/* Generic section wrapper — vertical rhythm + centered max width */
.section {
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Section header block (label + title) */
.section__head {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section__label {
  display: inline-block;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--color-cream);
}

/* Dark-text variants for use on light backgrounds */
.section__label--dark { color: var(--color-gold); }
.section__title--dark { color: var(--color-navy); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease);
}

.btn--primary {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(190, 145, 68, 0.3);
}


/* ============================================================================
   4. TOP NAVBAR
   ============================================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--space-md);
  background-color: transparent;       /* transparent over hero */
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Solid state — toggled by JS once the user scrolls past the hero */
.topbar.is-scrolled {
  background-color: var(--color-navy);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar__logo {
  height: 40px;
  width: auto;
}

.topbar__name {
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--color-cream);
}

.topbar__links {
  display: flex;
  gap: 1.05rem;
}

.topbar__links a {
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  color: var(--color-cream-dim);
  transition: color 0.2s var(--ease);
}

.topbar__links a:hover {
  color: var(--color-gold);
}

/* Hamburger toggle — hidden on desktop, shown on mobile */
.topbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.topbar__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-cream);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}


/* ============================================================================
   5. SIDE DOT NAVIGATION  (right side, vertical)
   ============================================================================ */
.dotnav {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dotnav__dot {
  position: relative;
  display: block;
  padding: 4px;
}

/* The visible dot */
.dotnav__dot span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-cream-dim);
  opacity: 0.5;
  transition: all 0.25s var(--ease);
}

.dotnav__dot:hover span {
  opacity: 1;
  transform: scale(1.2);
}

/* Active dot — set by JS via IntersectionObserver */
.dotnav__dot.is-active span {
  background-color: var(--color-gold);
  opacity: 1;
  transform: scale(1.4);
}

/* Tooltip label that appears on hover */
.dotnav__dot::after {
  content: attr(data-label);
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background-color: var(--color-graphite);
  color: var(--color-cream);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.dotnav__dot:hover::after {
  opacity: 1;
}


/* ============================================================================
   6. SECTION: HERO
   ============================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  /* Subtle radial gradient — slightly lighter in the center */
  background: radial-gradient(circle at 50% 40%,
              #2a3a4d 0%, var(--color-navy) 60%);
}

.hero__inner {
  max-width: 760px;
}

.hero__logo {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-md);
}

.hero__title {
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.04em;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.hero__verse {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: var(--color-cream);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.hero__verse-ref {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-top: var(--space-xs);
}

.hero__tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 500;
  color: var(--color-cream-dim);
}

/* Scroll-down indicator at the bottom of the hero */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--color-cream-dim);
  border-radius: 14px;
}

.hero__scroll-arrow {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background-color: var(--color-gold);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollBounce 1.6s infinite;
}

@keyframes scrollBounce {
  0%   { transform: translate(-50%, 0);    opacity: 1; }
  100% { transform: translate(-50%, 16px); opacity: 0; }
}


/* ============================================================================
   7. SECTION: ABOUT
   ============================================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-lg);
  align-items: start;
}

.about__text p {
  margin-bottom: var(--space-sm);
  color: var(--color-cream-dim);
  font-size: 1.05rem;
}

/* Decorative card on the right */
.about__visual-card {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #26374a, var(--color-navy));
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.about__visual-logo {
  width: 45%;
  opacity: 0.85;
}


/* ============================================================================
   8. SECTION: STREAM
   ============================================================================ */

/* Responsive 16:9 video frame */
.stream__video {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.stream__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stream__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream-dim);
  font-weight: 500;
}


/* ============================================================================
   9. SECTION: EVENTS (+ carousel)
   ============================================================================ */

.events__loading {
  text-align: center;
  color: var(--color-cream-dim);
}

/* --- Single featured event (full-width hero card) --- */
.event-feature {
  position: relative;
  width: 100%;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Dark gradient so the overlaid text stays readable */
.event-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-overlay) 10%, transparent 70%);
}

.event-feature__content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg);
  max-width: 640px;
}

.event-feature__meta {
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.event-feature__title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.event-feature__desc {
  color: var(--color-cream-dim);
}

/* --- Carousel for multiple events --- */
.events-carousel {
  position: relative;
}

.events-carousel__track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
}

.events-carousel__track::-webkit-scrollbar {
  height: 6px;
}
.events-carousel__track::-webkit-scrollbar-thumb {
  background: var(--color-gold-soft);
  border-radius: 3px;
}

/* Individual event card in the carousel */
.event-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background-color: var(--color-graphite);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.event-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #2a3a4d;
}

.event-card__body {
  padding: var(--space-md);
}

.event-card__meta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.event-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.event-card__desc {
  font-size: 0.92rem;
  color: var(--color-cream-dim);
  /* Clamp the preview text to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Carousel arrow buttons */
.events-carousel__btn {
  position: absolute;
  top: 40%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-gold);
  color: var(--color-navy);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease);
  z-index: 2;
}
.events-carousel__btn:hover { transform: scale(1.08); }
.events-carousel__btn--prev { left: -10px; }
.events-carousel__btn--next { right: -10px; }


/* ============================================================================
   10. SECTION: SERVICES & HOUSE GROUPS
   ============================================================================ */
.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.services__col {
  background-color: var(--color-graphite);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.services__subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

/* Intro paragraph inside a services column (e.g. house groups) */
.services__lead {
  color: var(--color-cream-dim);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.services__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-line);
}
.services__item:last-child { border-bottom: none; }

.services__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.services__info {
  display: flex;
  flex-direction: column;
}

.services__info strong {
  font-weight: 700;
}

.services__info span {
  color: var(--color-cream-dim);
  font-size: 0.92rem;
}


/* ============================================================================
   11. SECTION: ACCEPT JESUS
   Full-bleed warm/cream background to give it visual weight.
   ============================================================================ */
.jesus {
  /* override .section centering: this one is full-bleed with its own bg */
  max-width: none;
  background-color: var(--color-cream);
  text-align: center;
}

.jesus__inner {
  max-width: 760px;
  margin: 0 auto;
}

/* Body paragraphs read better left-aligned even though the heading is centered */
.jesus__text {
  color: #4a4a4a;
  font-size: 1.05rem;
  text-align: left;
  margin-bottom: var(--space-md);
}

/* Subheadings within the section (Kāpēc..., Kā tikt..., etc.) */
.jesus__subtitle {
  text-align: left;
  color: var(--color-navy);
  font-size: 1.4rem;
  font-weight: 800;
  margin: var(--space-lg) 0 var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 4px solid var(--color-gold);
}

/* The salvation prayer — a highlighted callout box */
.jesus__prayer {
  position: relative;
  text-align: left;
  background-color: #fff;
  border: 1px solid rgba(190, 145, 68, 0.35);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-navy);
  box-shadow: 0 14px 36px rgba(30, 42, 56, 0.1);
}

.jesus__prayer-label {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

/* Space the CTA button away from the text */
.jesus .btn {
  margin-top: var(--space-md);
}

/* ----------------------------------------------------------------------------
   PROSE — shared readable text block (Mācītāji, SOZO, Inkaunters)
   ---------------------------------------------------------------------------- */
.prose {
  max-width: 780px;
  margin: 0 auto;
}

.prose p {
  color: var(--color-cream-dim);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

/* Call-to-action line within a prose block (e.g. phone sign-up) */
.prose__cta {
  color: var(--color-cream);
  font-weight: 500;
}

.prose__cta a {
  color: var(--color-gold);
  font-weight: 700;
  white-space: nowrap;
}
.prose__cta a:hover { text-decoration: underline; }


/* ============================================================================
   12. SECTION: GALLERY
   ============================================================================ */

/* Masonry-style columns layout */
.gallery__grid {
  columns: 3;
  column-gap: var(--space-sm);
}

.gallery__loading {
  text-align: center;
  color: var(--color-cream-dim);
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: auto;
  transition: transform 0.4s var(--ease), filter 0.3s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* Empty-state message when no photos are uploaded yet */
.gallery__empty {
  text-align: center;
  color: var(--color-cream-dim);
  padding: var(--space-lg) 0;
}


/* ============================================================================
   13. SECTION: DONATIONS
   ============================================================================ */
.donate__intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  color: var(--color-cream-dim);
}

/* Single centered bank-details card */
.donate__single {
  max-width: 460px;
  margin: 0 auto;
}

/* Closing blessing line under the donation details */
.donate__blessing {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--color-gold);
  font-style: italic;
  font-size: 1.1rem;
}

.donate__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.donate__card {
  background-color: var(--color-graphite);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.donate__card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-gold);
}

.donate__card p {
  color: var(--color-cream-dim);
  font-size: 0.95rem;
}

.donate__qr {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-sm);
  background-color: #fff;
  padding: 8px;
}

.donate__qr-hint {
  font-size: 0.85rem;
}

.donate__bank {
  text-align: left;
  font-size: 0.9rem;
  color: var(--color-cream-dim);
  width: 100%;
}

.donate__bank li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--color-line);
}
.donate__bank li:last-child { border-bottom: none; }


/* ============================================================================
   14. SECTION: CONTACTS
   ============================================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-lg);
  align-items: stretch;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 1.05rem;
}
.contact__list li:last-child { border-bottom: none; }

.contact__list a:hover { color: var(--color-gold); }

.contact__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-gold-soft);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.contact__map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--color-line);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}


/* ============================================================================
   15. FOOTER
   ============================================================================ */
.footer {
  background-color: var(--color-graphite);
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--color-line);
}

.footer__logo {
  width: 60px;
  margin: 0 auto var(--space-sm);
  opacity: 0.9;
}

.footer__name {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--color-cream-dim);
}


/* ============================================================================
   16. MODAL (events)
   ============================================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;             /* shown via .is-open */
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay);
  backdrop-filter: blur(4px);
}

.modal__box {
  position: relative;
  z-index: 1;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--color-graphite);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal__image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.modal__body {
  padding: var(--space-lg);
}

.modal__meta {
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.modal__title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.modal__desc {
  color: var(--color-cream-dim);
  margin-bottom: var(--space-md);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--color-cream);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background-color: var(--color-gold); color: var(--color-navy); }


/* ============================================================================
   17. LIGHTBOX (gallery)
   ============================================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.92);
  padding: var(--space-md);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--color-cream);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { color: var(--color-gold); }

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  padding: 1rem;
}
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }


/* ============================================================================
   18. SCROLL-REVEAL ANIMATION
   Elements with .reveal start hidden and fade in when scrolled into view
   (JS adds .is-visible via IntersectionObserver).
   ============================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-arrow { animation: none; }
}


/* ============================================================================
   19. RESPONSIVE / MOBILE
   ============================================================================ */

/* Tablet and narrow laptops — collapse the 11-item nav into a clean menu */
@media (max-width: 1150px) {
  .about__grid,
  .services__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

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

  .gallery__grid {
    columns: 2;
  }

  /* Hide the side dot nav on smaller screens to avoid clutter */
  .dotnav {
    display: none;
  }

  /* Turn the top links into a slide-down panel */
  .topbar__toggle {
    display: flex;
  }

  .topbar__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--color-navy);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }

  /* Opened state — toggled by JS */
  .topbar__links.is-open {
    max-height: 480px;
  }

  .topbar__links a {
    padding: 1rem var(--space-md);
    border-bottom: 1px solid var(--color-line);
  }

  /* Animate hamburger into an X when menu is open */
  .topbar__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar__toggle.is-open span:nth-child(2) { opacity: 0; }
  .topbar__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Phones */
@media (max-width: 560px) {
  .section {
    padding: var(--space-lg) var(--space-md);
  }

  .gallery__grid {
    columns: 1;
  }

  .event-card {
    flex: 0 0 80%;
  }

  .topbar__name {
    font-size: 0.95rem;
  }
}
