/* ============================================================
   ZAG South — Design System & Global Styles
   Author: Jithin Mathew / noedge.ca
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=DM+Sans:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  --color-burgundy:     #7B1C2E;
  --color-burgundy-dk:  #5A1320;
  --color-gold:         #C8922A;
  --color-gold-lt:      #E8B84B;
  --color-cream:        #FAF6EF;
  --color-cream-dk:     #F0E9DC;
  --color-charcoal:     #1C1C1E;
  --color-charcoal-lt:  #3A3A3C;
  --color-muted:        #7A6F65;
  --color-rule:         rgba(200,146,42,0.35);
  --color-white:        #FFFFFF;

  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Source Serif 4', Georgia, serif;
  --font-ui:       'DM Sans', system-ui, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --shadow-card: 0 2px 16px rgba(28,28,30,0.10);
  --shadow-hero: 0 8px 48px rgba(28,28,30,0.35);

  --max-width:    1200px;
  --section-gap:  96px;
  --header-h:     76px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-charcoal);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section { padding-block: var(--section-gap); }
.section--cream { background: var(--color-cream); }
.section--burgundy { background: var(--color-burgundy); color: var(--color-white); }
.section--charcoal { background: var(--color-charcoal); color: var(--color-white); }

.section-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--color-gold);
}

.section-header { margin-bottom: 3.5rem; }
.section-header--center { text-align: center; }
.section-header--center .section-eyebrow { justify-content: center; }
.section-header--center .section-eyebrow::before { display: none; }
.section-header--center .section-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--color-gold);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
  max-width: 58ch;
}
.section-header--center .section-subtitle { margin-inline: auto; }

/* on dark sections */
.section--burgundy .section-subtitle,
.section--charcoal .section-subtitle { color: rgba(255,255,255,0.65); }
.section--burgundy h2,
.section--charcoal h2 { color: var(--color-white); }

/* --- Gold Rule Divider --- */
.gold-rule {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  margin-block: 1.25rem;
}
.gold-rule--center { margin-inline: auto; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-gold);
  color: var(--color-charcoal);
  border-color: var(--color-gold);
}
.btn-primary:hover {
  background: var(--color-gold-lt);
  border-color: var(--color-gold-lt);
}
.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-white);
}
.btn-burgundy {
  background: var(--color-burgundy);
  color: var(--color-white);
  border-color: var(--color-burgundy);
}
.btn-burgundy:hover { background: var(--color-burgundy-dk); border-color: var(--color-burgundy-dk); }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#site-header.transparent {
  background: transparent;
}
#site-header.scrolled {
  background: var(--color-white);
  box-shadow: 0 1px 0 var(--color-rule), var(--shadow-card);
}
#site-header.scrolled .site-title a { color: var(--color-charcoal); }
#site-header.scrolled .nav-link { color: var(--color-charcoal); }
#site-header.scrolled .nav-link:hover { color: var(--color-burgundy); }
#site-header.scrolled .header-cta { border-color: var(--color-burgundy); color: var(--color-burgundy); }
#site-header.scrolled .header-cta:hover { background: var(--color-burgundy); color: var(--color-white); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo { width: 46px; height: 46px; object-fit: contain; }

.site-title-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  transition: color 0.3s;
}
.site-tagline {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#site-header.scrolled .site-tagline { color: var(--color-muted); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.9);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
}
.nav-link:hover { color: var(--color-gold-lt); }

/* Dropdown */
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(28,28,30,0.18);
  border: 1px solid var(--color-cream-dk);
  padding: 0.4rem 0 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 200;
  /* Bridge gap: pseudo-element covers the space between link and dropdown */
}
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}
.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}
.nav-dropdown a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-charcoal);
  padding: 0.65rem 1.25rem;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--color-cream); color: var(--color-burgundy); }

.header-cta {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--color-white);
  transition: all 0.2s;
  margin-left: 0.5rem;
}
.header-cta:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-charcoal);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.25s;
}
#site-header.scrolled .menu-toggle span { background: var(--color-charcoal); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--color-white);
  box-shadow: var(--shadow-hero);
  padding: 1.5rem 2rem 2rem;
  z-index: 999;
  border-top: 3px solid var(--color-gold);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-charcoal);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-cream-dk);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--color-burgundy); }
.mobile-nav-group-title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 1rem 0 0.25rem;
}
.mobile-nav a.sub { padding-left: 1rem; font-size: 0.9rem; color: var(--color-charcoal-lt); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(91,19,32,0.82) 0%,
    rgba(28,28,30,0.55) 60%,
    rgba(28,28,30,0.3) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  max-width: 680px;
  padding-top: var(--header-h);
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-lt);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 36px;
  height: 1.5px;
  background: var(--color-gold-lt);
  display: block;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.12;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--color-gold-lt);
}
.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 48ch;
  margin-bottom: 2.5rem;
  font-style: italic;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 20px; height: 20px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SERVICE TIMES STRIP
   ============================================================ */
.service-strip {
  background: var(--color-burgundy);
  padding: 0;
}
.service-strip-inner {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.service-item {
  flex: 1;
  min-width: 200px;
  padding: 1.75rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.service-item:last-child { border-right: none; }
.service-day {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-lt);
}
.service-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-white);
}
.service-time {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* ============================================================
   WELCOME / ABOUT SNIPPET
   ============================================================ */
.welcome-section { padding-block: var(--section-gap); }
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.welcome-image-wrap {
  position: relative;
}
.welcome-image-wrap img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.welcome-image-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--color-gold);
  color: var(--color-charcoal);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  text-align: center;
  line-height: 1.3;
}
.welcome-image-badge span { display: block; font-size: 2rem; font-weight: 900; }

/* ============================================================
   PASTOR FEATURE
   ============================================================ */
.pastor-feature { padding-block: var(--section-gap); background: var(--color-cream); }
.pastor-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  align-items: start;
}
.pastor-photo-wrap { position: relative; }
.pastor-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}
.pastor-photo-label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(91,19,32,0.92);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.pastor-photo-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.pastor-photo-label span {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-gold-lt);
  letter-spacing: 0.06em;
}
.pastor-bio-quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-style: italic;
  color: var(--color-burgundy);
  border-left: 3px solid var(--color-gold);
  padding-left: 1.5rem;
  margin-block: 1.75rem;
  line-height: 1.5;
}
.pastor-bio p {
  color: var(--color-charcoal-lt);
  line-height: 1.85;
}

/* ============================================================
   MINISTRY CARDS
   ============================================================ */
.ministries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.ministry-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-cream-dk);
}
.ministry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(28,28,30,0.14);
}
.ministry-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.ministry-card-icon {
  width: 100%;
  height: 180px;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.ministry-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ministry-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 0.5rem;
}
.ministry-card-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.65;
  flex: 1;
}
.ministry-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-burgundy);
  margin-top: 1.25rem;
  transition: gap 0.2s;
}
.ministry-card-link:hover { gap: 0.7rem; }

/* ============================================================
   EVENTS
   ============================================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.event-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-cream-dk);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s;
}
.event-card:hover { border-color: var(--color-gold); }
.event-date-box {
  flex-shrink: 0;
  width: 56px;
  height: 64px;
  background: var(--color-burgundy);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}
.event-date-day {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.event-date-month {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-lt);
  margin-top: 2px;
}
.event-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 0.25rem;
}
.event-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ============================================================
   SERMONS
   ============================================================ */
.sermon-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-cream-dk);
  box-shadow: var(--shadow-card);
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.sermon-card:hover { border-color: var(--color-gold); }
.sermon-play {
  width: 48px;
  height: 48px;
  background: var(--color-burgundy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.sermon-card:hover .sermon-play { background: var(--color-gold); }
.sermon-play svg { width: 18px; height: 18px; fill: white; }
.sermon-info h4 { font-size: 1rem; font-weight: 600; color: var(--color-charcoal); margin-bottom: 0.2rem; }
.sermon-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sermon-tag {
  background: var(--color-cream);
  color: var(--color-burgundy);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-ui);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

/* ============================================================
   LEADERSHIP / TEAM
   ============================================================ */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}
.leader-card {
  text-align: center;
}
.leader-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-cream-dk);
  box-shadow: var(--shadow-card);
}
.leader-photo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-cream-dk);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-burgundy);
  border: 3px solid var(--color-cream-dk);
}
.leader-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 0.25rem;
}
.leader-role {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

/* Pastor Profile Page */
.pastor-profile-hero {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 4rem;
  background: var(--color-cream);
}
.pastor-profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}
.pastor-profile-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(91,19,32,0.5);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ============================================================
   SCRIPTURE BANNER
   ============================================================ */
.scripture-banner {
  background: var(--color-burgundy);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.scripture-banner::before {
  content: '✟';
  position: absolute;
  font-size: 18rem;
  color: rgba(255,255,255,0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scripture-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: italic;
  color: var(--color-white);
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 1.45;
}
.scripture-ref {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-lt);
}

/* ============================================================
   MEMBERS PORTAL / ZDS INTEGRATION
   ============================================================ */
.portal-cta-section {
  background: var(--color-charcoal);
  padding: 5rem 0;
}
.portal-cta-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.portal-cta-text h2 { color: var(--color-white); margin-bottom: 0.75rem; }
.portal-cta-text p { color: rgba(255,255,255,0.65); font-size: 1rem; }
.portal-cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ZDS Override — theme integration */
.zds-shell {
  font-family: var(--font-body);
}
.zds-hero-card {
  background: linear-gradient(135deg, var(--color-burgundy), var(--color-burgundy-dk));
  border-radius: var(--radius-lg);
  color: var(--color-white);
}
.zds-btn {
  background: var(--color-gold);
  color: var(--color-charcoal);
  border-color: var(--color-gold);
  font-family: var(--font-ui);
  font-weight: 600;
}
.zds-btn:hover { background: var(--color-gold-lt); }
.zds-btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}
.zds-chip {
  background: var(--color-cream);
  color: var(--color-burgundy);
  font-family: var(--font-ui);
}
.zds-member-card { border-radius: var(--radius-md); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--color-cream);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  border: 1px solid var(--color-cream-dk);
}
.contact-info-text h4 { font-size: 0.9rem; color: var(--color-charcoal); margin-bottom: 0.2rem; }
.contact-info-text p, .contact-info-text a {
  font-size: 0.9rem;
  color: var(--color-muted);
}
.contact-info-text a:hover { color: var(--color-burgundy); }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-charcoal);
}
.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-charcoal);
  background: var(--color-cream);
  border: 1.5px solid var(--color-cream-dk);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  background: var(--color-white);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* Map embed */
.contact-map {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-cream-dk);
  margin-top: 2rem;
}
.contact-map iframe { width: 100%; height: 100%; border: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-charcoal);
  color: rgba(255,255,255,0.75);
  padding-top: 5rem;
  padding-bottom: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-brand .site-logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 30ch;
}
.footer-col h5 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  padding-block: 0.35rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--color-white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.footer-social a:hover { background: var(--color-gold); color: var(--color-charcoal); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 4rem;
  background: var(--color-cream);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-burgundy));
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero .breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-hero .breadcrumb a { color: var(--color-muted); transition: color 0.2s; }
.page-hero .breadcrumb a:hover { color: var(--color-burgundy); }
.page-hero .breadcrumb span { color: var(--color-cream-dk); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-area {
  padding-block: var(--section-gap);
}
.entry-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.entry-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.entry-content p { line-height: 1.85; color: var(--color-charcoal-lt); }
.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
  list-style: disc;
  margin-bottom: 1rem;
}
.entry-content li { margin-bottom: 0.5rem; line-height: 1.75; }

/* Beliefs list */
.beliefs-list { list-style: none !important; padding: 0 !important; }
.beliefs-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-gold);
  margin-bottom: 0.75rem;
}
.beliefs-list li::before {
  content: '✦';
  color: var(--color-gold);
  font-size: 0.75rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-burgundy { color: var(--color-burgundy); }
.text-muted { color: var(--color-muted); }
.mt-auto { margin-top: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .welcome-grid { grid-template-columns: 1fr; gap: 3rem; }
  .pastor-grid { grid-template-columns: 260px 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .portal-cta-grid { grid-template-columns: 1fr; }
  .pastor-profile-grid { grid-template-columns: 240px 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 60px; }

  .primary-nav { display: none; }
  .menu-toggle { display: flex; }

  .hero h1 { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }

  .service-strip-inner { flex-direction: column; }
  .service-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .service-item:last-child { border-bottom: none; }

  .pastor-grid { grid-template-columns: 1fr; }
  .pastor-photo-wrap { max-width: 280px; }

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

  .welcome-image-badge { bottom: -1rem; right: 0; }

  .form-row { grid-template-columns: 1fr; }

  .pastor-profile-grid { grid-template-columns: 1fr; }
  .pastor-profile-photo { max-width: 260px; }
}

@media (max-width: 480px) {
  .ministries-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WP NAV MENU — active / current item states
   ============================================================ */
.nav-link.current-menu-item,
.nav-link.current-menu-parent,
.nav-link.current-page-ancestor {
    color: var(--color-gold-lt) !important;
}
#site-header.scrolled .nav-link.current-menu-item,
#site-header.scrolled .nav-link.current-menu-parent {
    color: var(--color-burgundy) !important;
}

/* Footer nav links generated by ZAG_Footer_Nav_Walker */
.site-footer a {
    display: block;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    padding-block: 0.35rem;
    transition: color 0.2s;
}
.site-footer .footer-col a:hover { color: var(--color-white); }

/* Mobile menu generated links (wp_nav_menu output) */
.mobile-nav a {
    display: block;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-charcoal);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-cream-dk);
    text-decoration: none;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--color-burgundy); }
.mobile-nav a.sub {
    padding-left: 1rem;
    font-size: 0.9rem;
    color: var(--color-charcoal-lt);
}

/* ============================================================
   PAGE HERO — IMAGE VARIANT
   (used by Ministry, Mission, Beliefs pages with bg photo)
   ============================================================ */
.page-hero--image {
  background-color: var(--color-burgundy); /* fallback */
  padding-bottom: 3.5rem;
}
/* On image heroes the gold rule bottom border is hidden by bg — remove it */
.page-hero--image::after { display: none; }

/* Text colours on image hero */
.page-hero--image h1,
.page-hero__title { color: #fff !important; }

.section-eyebrow--light {
  color: rgba(255,255,255,0.8) !important;
}
.section-eyebrow--light::before { background: rgba(255,255,255,0.6) !important; }

/* Breadcrumb on image hero */
.page-hero--image .breadcrumb,
.page-hero--image .breadcrumb a,
.page-hero--image .breadcrumb span {
  color: rgba(255,255,255,0.7);
}
.page-hero--image .breadcrumb a:hover { color: var(--color-gold-lt); }
.page-hero--image .breadcrumb span:last-child { color: rgba(255,255,255,0.95); }

/* ============================================================
   MINISTRY PAGE LAYOUT
   ============================================================ */
.ministry-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

.ministry-verse {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-style: italic;
  color: var(--color-burgundy);
  border-left: 3px solid var(--color-gold);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}
.ministry-verse__ref {
  font-size: 0.8em;
  margin-top: 0.5rem;
  color: var(--color-gold);
  display: block;
}

.ministry-meta-card {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-top: 3px solid var(--color-gold);
}
.ministry-meta-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 0.4rem;
}
.ministry-meta-value {
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.65;
  color: var(--color-charcoal);
}

.ministry-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn--full { width: 100%; justify-content: center; }
.btn--outline-burgundy {
  border: 1.5px solid var(--color-burgundy);
  color: var(--color-burgundy);
  background: transparent;
}
.btn--outline-burgundy:hover {
  background: var(--color-burgundy);
  color: var(--color-white);
}

/* ============================================================
   RESPONSIVE — comprehensive mobile fixes
   ============================================================ */

/* ---- 1024px ---- */
@media (max-width: 1024px) {
  /* Ministry */
  .ministry-layout {
    grid-template-columns: 1fr 260px;
    gap: 2.5rem;
  }
  /* Leadership */
  .leadership-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ---- 768px ---- */
@media (max-width: 768px) {

  /* Page hero padding — less cramped on small screens */
  .page-hero {
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 2.5rem;
  }
  .page-hero h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  /* Ministry — stack on mobile */
  .ministry-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Move sidebar above content on mobile? No — keep content first,
     sidebar below. Sidebar already stacks naturally. */
  .ministry-sidebar {
    /* On mobile, sidebar becomes a horizontal strip of cards */
  }
  .ministry-meta-card { padding: 1.25rem; }

  /* Leadership */
  .leadership-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
  }

  /* Pastor grid — already stacked, just tighten */
  .pastor-grid { gap: 2rem; }

  /* Events grid on mobile */
  .events-grid { grid-template-columns: 1fr; }

  /* Sermon cards */
  .sermon-card {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }
  .sermon-tag { display: none; } /* hide tag on mobile */

  /* Ministry cards */
  .ministry-card-icon { height: 140px; }

  /* About / contact grids */
  .contact-grid { grid-template-columns: 1fr; }

  /* Portal CTA */
  .portal-cta-grid { grid-template-columns: 1fr; }
  .portal-cta-actions { flex-direction: column; }

  /* Front page contact strip */
  #main [style*="grid-template-columns:1fr 1fr"] {
    display: block !important;
  }

  /* Service strip */
  .service-strip-inner { flex-direction: column; }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* Hero scroll indicator — hide on short screens */
  .hero-scroll { display: none; }
}

/* ---- 480px ---- */
@media (max-width: 480px) {

  :root { --header-h: 64px; } /* smaller header on phones */

  /* Single column everything */
  .ministry-layout { grid-template-columns: 1fr; }
  .ministries-grid  { grid-template-columns: 1fr; }
  .events-grid      { grid-template-columns: 1fr; }
  .leadership-grid  { grid-template-columns: repeat(2, 1fr); }

  /* Tighter section gap */
  :root { --section-gap: 48px; }

  /* Gallery single column */
  .gallery-grid { grid-template-columns: 1fr; }

  /* Sermon card — tighter */
  .sermon-play { width: 40px; height: 40px; }
  .sermon-play svg { width: 14px; height: 14px; }

  /* Ministry meta card full width */
  .ministry-meta-card { margin-bottom: 1.5rem; }

  /* Buttons full-width on tiny screens */
  .ministry-sidebar-actions .btn { font-size: 0.8125rem; }

  /* Footer bottom — stack */
  .footer-bottom { flex-direction: column; text-align: center; gap: 0.5rem; }

  /* Reduce hero padding further */
  .page-hero {
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 2rem;
  }
  .page-hero h1 { font-size: 1.6rem; }

  /* Breadcrumb smaller */
  .page-hero .breadcrumb { font-size: 0.75rem; margin-bottom: 1rem; }

  /* Event card */
  .event-card { flex-direction: column; gap: 0.75rem; }
  .event-date-box { width: 100%; height: 44px; flex-direction: row; gap: 0.5rem; border-radius: var(--radius-sm); }
  .event-date-day { font-size: 1.1rem; }
}
