/* =============================================================================
   Mediatrix Group — mediatrixgroup.org
   Static site stylesheet (single file for local file:// + Cloudflare Pages)

   TABLE OF CONTENTS
   1. Design tokens (:root)
   2. Reset & global base
   3. Site atmosphere
   4. Typography & layout (.container, .section)
   5. Navigation
   6. Hero (home)
   7. Quick actions & cards
   8. Welcome, mission, devotion sections
   9. Events, gallery marquee, testimonies
   10. Scroll reveal & page hero
   11. Gallery, contact, donate (page components)
   12. About, prayer, leadership, lightbox
   13. Footer
   14. Accessibility & utilities
   15. Reduced motion (consolidated)
   16. Responsive breakpoints
   ============================================================================= */

:root {
  --blue-deep: #0c1f3d;
  --blue-royal: #1a3a6b;
  --blue-marian: #2c5282;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --cream: #f5f0e6;
  --cream-dark: #e8e0d0;
  --white: #ffffff;
  --gray-soft: #6b7280;
  --gray-light: #f8f7f4;
  --text: #2d3748;
  --text-light: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.22);
  --shadow: 0 12px 40px rgba(12, 31, 61, 0.15);
  --shadow-lg: 0 24px 64px rgba(12, 31, 61, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  position: relative;
}

/* ── Site-wide layered atmosphere (static, no animation) ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(165deg,
      #f8f4ec 0%,
      var(--cream) 28%,
      #ebe6dc 55%,
      #e4ecf4 82%,
      rgba(44, 82, 130, 0.14) 100%),
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(44, 82, 130, 0.1), transparent 58%),
    radial-gradient(ellipse 80% 55% at 0% 100%, rgba(44, 82, 130, 0.07), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 60%, rgba(26, 58, 107, 0.06), transparent 48%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 38% at 18% 22%, rgba(201, 162, 39, 0.09), transparent 55%),
    radial-gradient(ellipse 38% 32% at 82% 68%, rgba(232, 197, 71, 0.07), transparent 52%),
    radial-gradient(ellipse 55% 45% at 50% 45%, rgba(201, 162, 39, 0.04), transparent 60%);
}

.site-ambience {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.cloud-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.42;
  will-change: auto;
}

.cloud-blob--1 {
  width: 420px;
  height: 260px;
  top: 8%;
  left: -6%;
  background: rgba(255, 255, 255, 0.75);
}

.cloud-blob--2 {
  width: 380px;
  height: 220px;
  top: 38%;
  right: -8%;
  background: rgba(255, 252, 248, 0.65);
  opacity: 0.35;
}

.cloud-blob--3 {
  width: 340px;
  height: 200px;
  bottom: 12%;
  left: 18%;
  background: rgba(228, 236, 244, 0.55);
  opacity: 0.38;
}

.cloud-blob--4 {
  width: 300px;
  height: 180px;
  bottom: 28%;
  right: 22%;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.3;
}

/* Decorative light rays — CSS only, shared pattern */
.light-rays {
  background:
    conic-gradient(from 195deg at 50% -12%,
      transparent 0deg,
      rgba(255, 255, 255, 0.045) 10deg,
      transparent 22deg,
      rgba(232, 197, 71, 0.04) 34deg,
      transparent 48deg,
      rgba(255, 255, 255, 0.03) 62deg,
      transparent 78deg,
      rgba(232, 197, 71, 0.025) 92deg,
      transparent 108deg);
}

.section-rays {
  position: relative;
  overflow: hidden;
}

.section-rays::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background:
    conic-gradient(from 200deg at 50% -25%,
      transparent 0deg,
      rgba(255, 255, 255, 0.35) 8deg,
      transparent 18deg,
      rgba(232, 197, 71, 0.2) 28deg,
      transparent 42deg,
      rgba(255, 255, 255, 0.2) 56deg,
      transparent 72deg);
}

.section-rays > .container {
  position: relative;
  z-index: 1;
}

.section--mist {
  background: rgba(248, 246, 242, 0.55);
}

.section--cream {
  background: rgba(245, 240, 230, 0.45);
}

.section--cloud::after {
  content: "";
  position: absolute;
  width: min(380px, 70vw);
  height: min(240px, 45vw);
  top: -3rem;
  right: -5rem;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
  background: rgba(255, 255, 255, 0.55);
}

.section--cloud-left::after {
  right: auto;
  left: -5rem;
  background: rgba(228, 236, 244, 0.45);
}

.section--cloud > .container {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--blue-marian);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--blue-deep);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); }

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  position: relative;
  z-index: 1;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header p {
  margin-top: 1rem;
  color: var(--gray-soft);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s;
}

.navbar.transparent {
  background: transparent;
}

.navbar.solid {
  background: rgba(12, 31, 61, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.nav-inner {
  width: min(1200px, 94vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  color: var(--white);
  font-family: var(--font-serif);
  line-height: 1.1;
}

.nav-brand strong {
  font-size: 1.35rem;
  font-weight: 600;
}

.nav-brand span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.75;
  font-family: var(--font-sans);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: background 0.25s, color 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.08);
}

.nav-donate {
  background: linear-gradient(135deg, var(--gold), #a88620) !important;
  color: var(--blue-deep) !important;
  font-weight: 600 !important;
  margin-left: 0.5rem;
}

.nav-donate:hover {
  color: var(--blue-deep) !important;
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ── Hero (cinematic / Marian) ── */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a1628;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 3.5s var(--ease-smooth);
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-inner {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  will-change: transform;
}

.hero-slide.is-active .hero-slide-inner {
  animation: heroKenBurns 11s ease-out forwards;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

/* REPLACE: drop your photos into assets/images/ */
.hero-slide-inner--1 {
  background-image: url("assets/images/hero-1.jpg");
  background-color: #141e36;
}
.hero-slide-inner--2 {
  background-image: url("assets/images/hero-2.jpg");
  background-color: #101a30;
}
.hero-slide-inner--3 {
  background-image: url("assets/images/hero-3.jpg");
  background-color: #0c1828;
}
.hero-slide-inner--4 {
  background-image: url("assets/images/hero-4.jpg");
  background-color: #162038;
}

/* Deep Marian blue veil */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(8, 18, 40, 0.55) 0%,
      rgba(10, 22, 48, 0.72) 45%,
      rgba(6, 14, 32, 0.88) 100%);
  pointer-events: none;
}

/* Soft golden radiance — cathedral light */
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 90% 55% at 50% 12%, rgba(232, 197, 71, 0.22), transparent 58%),
    radial-gradient(ellipse 45% 35% at 50% 28%, rgba(255, 248, 220, 0.08), transparent 50%),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(201, 162, 39, 0.06), transparent 45%);
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.hero-rays {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.75;
  pointer-events: none;
  background:
    conic-gradient(from 188deg at 50% -8%,
      transparent 0deg,
      rgba(255, 255, 255, 0.05) 10deg,
      transparent 22deg,
      rgba(232, 197, 71, 0.045) 36deg,
      transparent 50deg,
      rgba(255, 255, 255, 0.035) 64deg,
      transparent 80deg,
      rgba(232, 197, 71, 0.03) 96deg,
      transparent 112deg),
    conic-gradient(from 175deg at 48% -5%,
      transparent 0deg,
      rgba(255, 255, 255, 0.025) 14deg,
      transparent 32deg);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  box-shadow: inset 0 0 120px rgba(4, 10, 24, 0.75);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.hero-particles .particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-particles .particle--dust {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

.hero-particles .particle--gold {
  background: rgba(232, 197, 71, 0.85);
  box-shadow: 0 0 10px rgba(232, 197, 71, 0.55), 0 0 20px rgba(201, 162, 39, 0.25);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: calc(var(--nav-h) + 2.5rem) 1.5rem 5.5rem;
  max-width: 920px;
  animation: heroContentIn 1.4s ease-out both;
  animation-delay: 0.35s;
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 1.5vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232, 197, 71, 0.88);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.08;
  color: var(--white);
  text-shadow:
    0 2px 40px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(232, 197, 71, 0.12);
  margin-bottom: 0;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.35rem auto 1.35rem;
  width: min(280px, 70vw);
}

.hero-divider::before,
.hero-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 197, 71, 0.55), transparent);
}

.hero-divider span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 12px rgba(232, 197, 71, 0.6);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2.25rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

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

.btn-hero-primary {
  padding: 0.95rem 2rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #d4b04a 0%, #b8922a 100%);
  color: #0c1f3d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 24px rgba(201, 162, 39, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hero-primary:hover {
  color: #0c1f3d;
  filter: brightness(1.06);
  box-shadow:
    0 8px 32px rgba(201, 162, 39, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary {
  padding: 0.95rem 2rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(232, 197, 71, 0.45);
  backdrop-filter: blur(6px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(232, 197, 71, 0.65);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #a88620);
  color: var(--blue-deep);
  box-shadow: 0 8px 28px var(--gold-glow);
}

.btn-outline {
  background: var(--glass);
  color: var(--white);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  animation: heroScrollFloat 3s ease-in-out infinite;
}

.hero-scroll:hover {
  color: rgba(232, 197, 71, 0.85);
}

.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(232, 197, 71, 0.6));
}

.hero-scroll-chevron {
  width: 10px;
  height: 10px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
}

@keyframes heroScrollFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

@media (max-width: 768px) {
  .hero-content {
    padding-bottom: 4.5rem;
  }

  .hero-title {
    letter-spacing: 0.02em;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    text-align: center;
  }

  .hero-eyebrow {
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active .hero-slide-inner {
    animation: none;
    transform: scale(1);
  }

  .hero-glow {
    animation: none;
  }

  .hero-content {
    animation: none;
  }

  .hero-scroll {
    animation: none;
  }
}

/* ── Quick actions ── */
.quick-actions {
  margin-top: -3rem;
  position: relative;
  z-index: 20;
  padding-bottom: 1rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.quick-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
  color: var(--text);
}

.quick-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.quick-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-marian), var(--blue-deep));
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.quick-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.quick-card p {
  font-size: 0.85rem;
  color: var(--gray-soft);
}

/* ── Glass cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.glass-card .card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.glass-card h3 {
  margin-bottom: 0.75rem;
}

.glass-card p {
  color: var(--gray-soft);
  font-size: 0.95rem;
}

/* ── Welcome split ── */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.welcome-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.welcome-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--blue-marian), var(--blue-deep));
}

.welcome-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(201, 162, 39, 0.15));
  pointer-events: none;
}

/* ── Parallax sections ── */
.parallax-section {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
}

.parallax-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(12, 31, 61, 0.88), rgba(44, 82, 130, 0.75));
}

.bg-mission::before,
.bg-devotion::before {
  background:
    conic-gradient(from 198deg at 50% -18%,
      transparent 0deg,
      rgba(255, 255, 255, 0.09) 11deg,
      transparent 26deg,
      rgba(232, 197, 71, 0.07) 40deg,
      transparent 56deg,
      rgba(255, 255, 255, 0.05) 70deg,
      transparent 86deg),
    linear-gradient(135deg, rgba(12, 31, 61, 0.88), rgba(44, 82, 130, 0.75));
}

.parallax-inner {
  position: relative;
  z-index: 2;
  color: var(--text-light);
  text-align: center;
  padding: 5rem 1.5rem;
}

.parallax-inner h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.parallax-inner p {
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.9;
}

.bg-mission {
  background-image: url("assets/images/prayer.jpg");
  background-color: var(--blue-deep);
}

.bg-devotion {
  background-image: url("assets/images/mary.jpg");
  background-color: var(--blue-royal);
}

/* ── Devotion pills ── */
.devotion-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.devotion-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease);
}

.devotion-item:hover {
  transform: translateY(-4px);
}

.devotion-item span {
  display: block;
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

/* ── Events ── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease);
}

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

.event-date {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-marian));
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.event-date .day {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-light);
}

.event-body {
  padding: 1.5rem;
}

.event-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.event-body p {
  font-size: 0.9rem;
  color: var(--gray-soft);
}

/* ── Gallery marquee strip ── */
.gallery-strip {
  padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg,
      transparent 0%,
      rgba(235, 230, 220, 0.5) 12%,
      var(--blue-deep) 38%,
      #0a1628 100%);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.gallery-strip-header {
  text-align: center;
  max-width: 640px;
  margin-bottom: 2.25rem;
}

.gallery-strip-header h2 {
  margin-bottom: 0.65rem;
}

.gallery-strip-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-style: italic;
  color: var(--gray-soft);
  line-height: 1.5;
}

.gallery-marquee-wrap {
  overflow: hidden;
  padding: 1.5rem 0 2rem;
  position: relative;
  cursor: default;
}

.gallery-marquee-wrap::before,
.gallery-marquee-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(48px, 8vw, 120px);
  z-index: 3;
  pointer-events: none;
}

.gallery-marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #0a1628 15%, transparent);
}

.gallery-marquee-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, #0a1628 15%, transparent);
}

.gallery-marquee {
  width: 100%;
}

.gallery-marquee-track {
  display: flex;
  gap: 1.35rem;
  width: max-content;
  animation: galleryMarquee 72s linear infinite;
  will-change: transform;
}

.gallery-marquee-wrap:hover .gallery-marquee-track {
  animation-play-state: paused;
}

@keyframes galleryMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-card {
  flex-shrink: 0;
  margin: 0;
  padding: 4px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(232, 197, 71, 0.55), rgba(201, 162, 39, 0.25));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(232, 197, 71, 0.2);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.gallery-card img {
  display: block;
  width: clamp(240px, 28vw, 320px);
  height: clamp(150px, 18vw, 200px);
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-marian), #1a3050);
  transition: transform 0.45s var(--ease);
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(201, 162, 39, 0.25);
  z-index: 2;
  position: relative;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-strip-cta {
  text-align: center;
  padding: 0 1rem 0.5rem;
  position: relative;
  z-index: 2;
}

/* Reduced motion: static scrollable row, hide duplicate clones */
@media (prefers-reduced-motion: reduce) {
  .gallery-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding: 0 1rem;
    gap: 1rem;
  }

  .gallery-marquee-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }

  .gallery-marquee-wrap::before,
  .gallery-marquee-wrap::after {
    display: none;
  }

  .gallery-card[aria-hidden="true"] {
    display: none;
  }

  .gallery-card:hover {
    transform: none;
  }

  .gallery-card:hover img {
    transform: none;
  }
}

.gallery-marquee-wrap.is-static .gallery-marquee-track {
  animation: none;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 1rem;
}

.gallery-marquee-wrap.is-static .gallery-card[aria-hidden="true"] {
  display: none;
}

/* ── Testimonies ── */
.testimony-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimony-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  transition: transform 0.35s var(--ease);
}

.testimony-card:hover {
  transform: translateY(-4px);
}

.testimony-card blockquote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--blue-deep);
  margin-bottom: 1rem;
}

.testimony-card cite {
  font-size: 0.85rem;
  color: var(--gray-soft);
  font-style: normal;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s var(--ease-smooth), transform 0.85s var(--ease-smooth);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Page hero (inner pages) ── */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-marian) 50%, #1a4a7a 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201, 162, 39, 0.2), transparent 60%);
}

.page-hero--rays::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
  background:
    conic-gradient(from 198deg at 50% -15%,
      transparent 0deg,
      rgba(255, 255, 255, 0.06) 10deg,
      transparent 22deg,
      rgba(232, 197, 71, 0.05) 34deg,
      transparent 50deg,
      rgba(255, 255, 255, 0.04) 66deg,
      transparent 82deg);
}

.page-hero h1 {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 1rem auto 0;
  position: relative;
  z-index: 1;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

/* ── Gallery page grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--blue-marian), var(--cream-dark));
}

/* ── Contact form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info {
  background: linear-gradient(160deg, var(--blue-deep), var(--blue-marian));
  color: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
}

.contact-info h3 {
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.contact-info p,
.contact-info a {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  display: block;
}

.contact-info a:hover {
  color: var(--gold-light);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--blue-deep);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-marian);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ── Donate ── */
.donate-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.donate-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
}

.donate-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.donate-amount {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--gold);
  margin: 1rem 0;
}

/* ── Inner page navbar (always solid) ── */
.navbar.navbar--static {
  background: rgba(12, 31, 61, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* ── History timeline ── */
.history-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(232, 197, 71, 0.45);
  max-width: 720px;
}

.history-item {
  position: relative;
  padding-bottom: 2rem;
}

.history-item:last-child {
  padding-bottom: 0;
}

.history-item::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 7px);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 197, 71, 0.25);
}

.history-year {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.history-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.history-item p {
  color: var(--gray-soft);
  font-size: 0.95rem;
}

/* ── Mission & vision ── */
.mission-vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.mv-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}

.mv-card h3 {
  color: var(--blue-deep);
  margin-bottom: 1rem;
  font-size: 1.45rem;
}

.mv-card p {
  color: var(--gray-soft);
  line-height: 1.7;
}

.mv-card ul {
  margin-top: 1rem;
  padding-left: 1.25rem;
  color: var(--gray-soft);
}

.mv-card li {
  margin-bottom: 0.5rem;
}

/* ── Leadership / chapter cards ── */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.leader-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), border-color 0.35s;
  border: 2px solid transparent;
}

.leader-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 197, 71, 0.5);
}

.leader-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-marian), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--gold-light);
  border: 3px solid var(--gold);
}

.leader-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.leader-role {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.leader-card p {
  font-size: 0.9rem;
  color: var(--gray-soft);
}

/* ── Rosary guide ── */
.rosary-guide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.rosary-mystery {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.rosary-mystery h3 {
  color: var(--blue-deep);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.rosary-mystery ol {
  padding-left: 1.25rem;
  color: var(--gray-soft);
  font-size: 0.92rem;
}

.rosary-mystery li {
  margin-bottom: 0.35rem;
}

.rosary-steps {
  background: linear-gradient(160deg, var(--blue-deep), var(--blue-marian));
  color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.rosary-steps h3 {
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.rosary-steps ol {
  padding-left: 1.25rem;
  opacity: 0.92;
  line-height: 1.8;
}

.rosary-steps li {
  margin-bottom: 0.35rem;
}

/* ── Devotional resources ── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  transition: transform 0.3s var(--ease);
}

.resource-card:hover {
  transform: translateY(-4px);
}

.resource-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--gray-soft);
  margin-bottom: 0.75rem;
}

.resource-link {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--blue-marian);
}

.resource-link:hover {
  color: var(--gold);
}

/* ── Events: past section ── */
.events-section-header {
  margin-bottom: 2rem;
}

.event-card--past {
  opacity: 0.92;
}

.event-card--past .event-date {
  background: linear-gradient(135deg, #4a5568, #718096);
}

.event-card--past .event-body h3 {
  color: var(--gray-soft);
}

.event-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

/* ── Masonry gallery ── */
.masonry-gallery {
  column-count: 3;
  column-gap: 1.25rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  border: none;
  padding: 0;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue-marian), var(--cream-dark));
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
  position: relative;
}

.masonry-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.3s;
  pointer-events: none;
}

.masonry-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.masonry-item:hover::after {
  border-color: var(--gold);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.masonry-item--wide img {
  min-height: 180px;
  object-fit: cover;
}

/* ── Lightbox ── */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 31, 61, 0.92);
  backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(232, 197, 71, 0.35);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  max-width: 560px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(232, 197, 71, 0.25);
  border-color: var(--gold);
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
}

.lightbox-prev {
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ── Contact social block ── */
.contact-social {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-social h4 {
  color: var(--gold-light);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.form-panel {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-success {
  margin-top: 1rem;
  color: var(--blue-marian);
  font-weight: 600;
}

/* ── Footer ── */
.footer {
  background: linear-gradient(180deg, rgba(12, 31, 61, 0.97) 0%, var(--blue-deep) 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--white);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
}

.footer h4 {
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.6rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

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

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.65;
}

/* ── Members Area banner ── */
.members-banner {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0;
  overflow: hidden;
}

.members-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(12, 31, 61, 0.06) 0%, rgba(44, 82, 130, 0.12) 100%),
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(201, 162, 39, 0.12), transparent 60%);
  pointer-events: none;
}

.members-banner-inner {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(201, 162, 39, 0.15);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  transition: transform 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth);
}

.members-banner-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 72px rgba(12, 31, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(201, 162, 39, 0.35);
}

.members-banner-inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: calc(var(--radius) + 4px) calc(var(--radius) + 4px) 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.members-banner-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-deep), var(--blue-marian));
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  box-shadow: 0 8px 24px rgba(12, 31, 61, 0.25);
  flex-shrink: 0;
}

.members-banner-content h2 {
  color: var(--blue-deep);
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.members-banner-content p {
  color: var(--gray-soft);
  max-width: 640px;
  line-height: 1.75;
}

.members-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: min(100%, 220px);
}

.members-banner-actions .btn { text-align: center; white-space: nowrap; }

.btn-member-login {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-marian));
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-member-login:hover { color: var(--white); filter: brightness(1.08); }

.btn-member-join {
  background: linear-gradient(135deg, var(--gold), #a88620);
  color: var(--blue-deep);
  font-weight: 700;
}

.btn-member-join:hover { color: var(--blue-deep); filter: brightness(1.06); }

/* ── Auth pages ── */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  display: flex;
  align-items: center;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(2rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-marian), var(--gold), var(--blue-marian));
}

.auth-card-header { text-align: center; margin-bottom: 2rem; }
.auth-card-header h1 { font-size: clamp(1.75rem, 3vw, 2.1rem); color: var(--blue-deep); margin-bottom: 0.5rem; }
.auth-card-header p { color: var(--gray-soft); font-size: 0.95rem; }

.auth-note {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  background: rgba(201, 162, 39, 0.1);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--blue-deep);
}

.auth-footer-link { text-align: center; margin-top: 1.5rem; font-size: 0.92rem; color: var(--gray-soft); }
.auth-footer-link a { color: var(--blue-marian); font-weight: 600; }

.form-check { display: flex; align-items: flex-start; gap: 0.65rem; margin-bottom: 1.25rem; }
.form-check input { margin-top: 0.25rem; width: auto; accent-color: var(--blue-marian); }
.form-check label { font-size: 0.9rem; color: var(--gray-soft); line-height: 1.5; }

/* ── Members portal ── */
.members-portal { padding-top: 0; }

.members-portal-header {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-marian) 55%, #1a4a7a 100%);
  color: var(--white);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}

.members-portal-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 20%, rgba(201, 162, 39, 0.2), transparent 55%);
  pointer-events: none;
}

.members-portal-header .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.members-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(232, 197, 71, 0.45);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.members-portal-header h1 { color: var(--white); font-size: clamp(1.85rem, 3.5vw, 2.5rem); }
.members-portal-header p { opacity: 0.88; margin-top: 0.35rem; }

.btn-logout {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: background 0.3s, border-color 0.3s;
}

.btn-logout:hover { background: rgba(232, 197, 71, 0.2); border-color: var(--gold-light); color: var(--white); }

.members-dashboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.member-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s;
  border-top: 3px solid var(--gold);
}

.member-panel:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.member-panel h3 { color: var(--blue-deep); font-size: 1.15rem; margin-bottom: 1rem; }
.member-panel ul { list-style: none; }
.member-panel li { padding: 0.65rem 0; border-bottom: 1px solid rgba(12, 31, 61, 0.08); font-size: 0.92rem; color: var(--gray-soft); }
.member-panel li:last-child { border-bottom: none; }
.member-panel li strong { display: block; color: var(--blue-deep); font-size: 0.95rem; margin-bottom: 0.15rem; }

.member-doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--gray-soft);
  margin-bottom: 0.65rem;
  transition: background 0.25s;
}

.member-doc-item:hover { background: rgba(201, 162, 39, 0.12); }

.member-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-marian), var(--blue-deep));
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Events calendar ── */
.calendar-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: start; }

.calendar-glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gold);
}

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; }
.calendar-toolbar h3 { font-family: var(--font-serif); font-size: 1.45rem; color: var(--blue-deep); text-align: center; flex: 1; }

.calendar-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(44, 82, 130, 0.2);
  background: var(--white); color: var(--blue-deep);
  cursor: pointer; font-size: 1.25rem;
  display: grid; place-items: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.calendar-nav-btn:hover { background: rgba(201, 162, 39, 0.15); border-color: var(--gold); transform: scale(1.05); }

.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; margin-bottom: 0.5rem; }
.calendar-weekdays span { text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-marian); padding: 0.35rem 0; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }

.calendar-day {
  aspect-ratio: 1; min-height: 44px;
  border: none; border-radius: var(--radius-sm);
  background: rgba(245, 240, 230, 0.6);
  color: var(--text); font-family: inherit; font-size: 0.9rem; font-weight: 500;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
}

.calendar-day--empty { background: transparent; }
.calendar-day--today { box-shadow: inset 0 0 0 2px var(--blue-marian); font-weight: 700; }

.calendar-day--event {
  background: linear-gradient(145deg, rgba(26, 58, 107, 0.12), rgba(201, 162, 39, 0.18));
  cursor: pointer; font-weight: 700; color: var(--blue-deep);
}

.calendar-day--event::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

.calendar-day--event:hover,
.calendar-day--event.calendar-day--selected {
  background: linear-gradient(145deg, var(--blue-marian), var(--blue-deep));
  color: var(--white); transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(12, 31, 61, 0.25);
}

.calendar-events-sidebar {
  background: linear-gradient(165deg, var(--blue-deep), var(--blue-marian));
  color: var(--white);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(232, 197, 71, 0.25);
  min-height: 320px;
}

.calendar-events-sidebar h3 { color: var(--gold-light); font-size: 1.2rem; margin-bottom: 0.35rem; }
.calendar-events-sidebar > p { font-size: 0.88rem; opacity: 0.8; margin-bottom: 1.25rem; }

.calendar-event-item { padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.calendar-event-item:last-child { border-bottom: none; }
.calendar-event-item time { display: block; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.35rem; }
.calendar-event-item h4 { font-size: 1rem; color: var(--white); margin-bottom: 0.25rem; }
.calendar-event-item p { font-size: 0.85rem; opacity: 0.82; }

.calendar-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(12, 31, 61, 0.08); font-size: 0.8rem; color: var(--gray-soft); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.calendar-legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* ── Footer social bar ── */
.footer-social-bar {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social-bar h4 { text-align: center; margin-bottom: 1.5rem; font-size: 0.85rem; }

.footer-social-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.85rem; }

.footer-social-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 1rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}

.footer-social-card:hover { background: rgba(201, 162, 39, 0.15); border-color: rgba(232, 197, 71, 0.4); transform: translateY(-3px); color: var(--white); }

.footer-social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 700;
}

.footer-social-name { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }
.footer-social-handle { font-size: 0.68rem; opacity: 0.75; color: var(--gold-light); font-style: italic; }

.footer-credit { margin-top: 0.65rem; font-size: 0.82rem; opacity: 0.75; }

.kolestack {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(232, 197, 71, 0.35);
}

.nav-members { color: var(--gold-light) !important; }

/* ── 14. Accessibility & utilities ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--blue-deep);
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: top 0.2s var(--ease-smooth);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3.5rem; }
.text-center { text-align: center; }
.section-overlap { margin-top: -3rem; padding-top: 0; }

.resource-link--soon {
  color: var(--gray-soft);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: default;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.form-success[role="status"] {
  padding: 0.75rem 1rem;
  background: rgba(44, 82, 130, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--blue-marian);
}

img {
  max-width: 100%;
  height: auto;
}

/* ── 15. Reduced motion (consolidated overrides) ── */
@media (prefers-reduced-motion: reduce) {
  .quick-card:hover,
  .glass-card:hover,
  .event-card:hover,
  .leader-card:hover,
  .testimony-card:hover,
  .resource-card:hover,
  .gallery-item:hover,
  .masonry-item:hover,
  .donate-card:hover {
    transform: none;
  }

  .members-banner-inner:hover,
  .member-panel:hover,
  .footer-social-card:hover {
    transform: none;
  }

  .calendar-day--event:hover {
    transform: none;
  }

  .gallery-marquee-track {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── 16. Responsive ── */
@media (max-width: 1024px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid,
  .event-grid,
  .testimony-grid,
  .devotion-grid { grid-template-columns: repeat(2, 1fr); }
  .leadership-grid,
  .resource-grid,
  .rosary-guide,
  .mission-vision-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry-gallery { column-count: 2; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .donate-options { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
  .members-dashboard { grid-template-columns: 1fr; }
  .members-banner-inner { grid-template-columns: 1fr; text-align: center; }
  .members-banner-actions { width: 100%; max-width: 280px; margin: 0 auto; }
  .footer-social-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(12, 31, 61, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.35s;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .welcome-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .quick-grid,
  .card-grid,
  .event-grid,
  .testimony-grid,
  .devotion-grid,
  .leadership-grid,
  .resource-grid,
  .rosary-guide,
  .mission-vision-grid,
  .gallery-grid { grid-template-columns: 1fr; }

  .masonry-gallery { column-count: 1; }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }

  .nav-donate {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
    display: block;
  }

  .page-hero {
    padding: calc(var(--nav-h) + 2.5rem) 1rem 3rem;
  }

  .history-timeline {
    padding-left: 1.5rem;
  }

  .footer-social-grid { grid-template-columns: repeat(2, 1fr); }
  .members-banner-inner { padding: 1.75rem; }

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

  .parallax-section {
    background-attachment: scroll;
  }

  .members-banner-icon {
    margin: 0 auto 0.5rem;
  }

  .members-banner-content p {
    margin-inline: auto;
  }

  .members-portal-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-logout {
    width: 100%;
    text-align: center;
  }

  .calendar-glass {
    padding: 1.25rem;
  }

  .calendar-day {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .calendar-weekdays span {
    font-size: 0.65rem;
  }

  .auth-card {
    margin-inline: 0.25rem;
  }

  .container {
    width: min(1140px, 94vw);
  }
}

@media (max-width: 480px) {
  .footer-social-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .footer-social-card {
    padding: 0.85rem 0.35rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .calendar-toolbar h3 {
    font-size: 1.15rem;
  }

  .calendar-nav-btn {
    width: 36px;
    height: 36px;
  }
}
