/* ── DESIGN TOKENS ── */
:root {
  --red:        #CC1939;
  --red-dark:   #790D20;
  --red-hover:  #DD183B;
  --navy:       #1c3144;
  --cream:      #F5F3EB;
  --bg:         #fffefc;
  --card-bg:    #f6f6f6;

  --max-w:      1200px;
  --gutter:     clamp(20px, 4vw, 56px);
  --card-gap:   clamp(12px, 2vw, 20px);
  --section-gap: clamp(32px, 5vw, 60px);

  --font-body:  'EB Garamond', Georgia, serif;
  --font-ui:    'Roboto', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw, 22.5px);
  color: var(--navy);
  background-color: var(--bg);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* Inline line-break span produced by renderMarkdown() for single newlines */
.line-br { display: block; margin-top: 0.75rem; }

/* ── SHARED CONTAINER ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ══════════════════════════════════════════
   WIDTH SYSTEM
   .width-1  generous margins — centered, max 1200px, padding = --gutter
   .width-2  slim margins    — padding = --card-gap
   .width-3  full bleed      — no side spacing
══════════════════════════════════════════ */
.width-1 {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.width-2 { padding-inline: var(--card-gap); }
.width-3 { padding-inline: 0; }

/* ── PLACEHOLDER BOXES ── */
.img-placeholder {
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 12px;
  color: #888;
  text-align: center;
  padding: 12px;
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 5px 30px rgba(0,0,0,0.10);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 15px var(--gutter);
  gap: 16px;
}
.site-logo img {
  width: 278px;
  max-width: 100%;
  height: 83px;
  object-fit: contain;
}
nav.main-nav ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 0;
}
nav.main-nav li a {
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  padding: 12px clamp(14px, 2vw, 32px);
  white-space: nowrap;
}
nav.main-nav li a:hover { color: var(--red-dark); }

/* ── Dropdown menus ── */
nav.main-nav li.has-dropdown {
  position: relative;
}
/* Top-level item + chevron sit in a row */
nav.main-nav li.has-dropdown > a {
  padding-right: 4px;
}
.dropdown-toggle {
  display: none; /* hidden on desktop; shown on mobile */
}
nav.main-nav ul.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  border-top: 2px solid var(--red);
  border-radius: 0 0 3px 3px;
  z-index: 200;
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
}
/* Invisible bridge above the dropdown so cursor movement doesn't break hover */
nav.main-nav ul.dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
nav.main-nav li.has-dropdown:hover > ul.dropdown,
nav.main-nav li.has-dropdown.is-open > ul.dropdown {
  display: flex;
}
nav.main-nav ul.dropdown li a {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--navy);
  padding: 14px 20px;
  white-space: nowrap;
  border-bottom: none;
  transition: background .12s, color .12s;
}
nav.main-nav ul.dropdown li a:hover {
  background: #fdf0f2;
  color: var(--red);
}

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('https://i0.wp.com/gracetheplains.org/wp-content/uploads/2025/07/Screenshot-2025-07-11-at-10.31.05%E2%80%AFPM.webp?fit=1870%2C1080&ssl=1');
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(204, 25, 57, 0.25);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(20px, 4vw, 40px) var(--gutter);
  width: 100%;
}
@keyframes expandFromCenter {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.hero-rule {
  display: block;
  width: min(32%, 420px);
  margin: 20px auto;
  border: none;
  border-top: 0.75px solid rgba(255,255,255,0.85);
  transform-origin: center;
  animation: expandFromCenter 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}
.hero-title {
  font-family: var(--font-body);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: clamp(3px, 0.6vw, 6.3px);
  color: #fff;
  text-shadow: -2px 0 10px rgba(0,0,0,0.9);
  line-height: 1.35;
}

/* ════════════════════════════════════════
   WORSHIP SCHEDULE BOX
════════════════════════════════════════ */
.worship-box-wrap {
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  margin-top: -50px;
  position: relative;
  z-index: 10;
}
.worship-box {
  background: var(--cream);
  box-shadow: 0 0 10px -3px rgba(0,0,0,0.5);
  padding: clamp(24px, 3vw, 36px) clamp(24px, 4vw, 56px) clamp(28px, 3.5vw, 42px);
  text-align: center;
  width: min(71%, 860px);
}
.worship-schedule-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 28px;
  margin-bottom: 16px;
}
.worship-schedule-btn:hover { background: var(--red-dark); }
.worship-service-info {
  font-family: var(--font-body);
  font-size: 17px;
  color: #000;
  line-height: 1.7;
  margin-bottom: 16px;
}
.worship-service-info strong { font-weight: 700; }
.worship-service-info em     { font-style: italic; }
.worship-links {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.4px;
}
.worship-links a { color: var(--navy); text-decoration: underline; }
.worship-links a:hover { color: var(--red); }

/* ════════════════════════════════════════
   ABOUT
════════════════════════════════════════ */
.about-section {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 3vw, 40px);
  margin-block: var(--section-gap);
}
.about-image { flex: 0 0 43%; }
.about-image img,
.about-image .img-placeholder {
  width: 100%;
  aspect-ratio: 600 / 415;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  display: block;
}
.about-text {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.section-label,
.about-label,
.community-label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.about-heading {
  font-family: var(--font-body);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 16px;
}
.about-body {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
}

/* ════════════════════════════════════════
   FEATURED EVENTS
════════════════════════════════════════ */
.featured-events { margin-block: var(--section-gap); }
.section-title-center,
.featured-events-label {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  text-align: center;
  margin-bottom: clamp(16px, 2vw, 24px);
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

/* ── SKELETON LOADING STATE ── */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 3px;
}
.event-card--loading .event-card-img { aspect-ratio: 100 / 76; width: 100%; }
.skeleton-line { height: 16px; margin-bottom: 10px; }
.skeleton-line--short { width: 55%; }

.event-card {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-radius: 4px;
}
.event-card-body { background: #fff; }
.event-card-img {
  width: 100%;
  aspect-ratio: 100 / 76;
  position: relative;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}
.event-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-card-img .img-placeholder { position: absolute; inset: 0; }
.event-card-body { padding: clamp(18px, 2.5vw, 30px); }
.event-title {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--navy);
  text-decoration: underline;
  margin-bottom: 8px;
  display: block;
}
.event-title:hover { color: var(--red); }
.event-meta {
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.5;
  margin-bottom: 20px;
}
.event-learn-more {
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 600;
  color: var(--red);
}
.event-learn-more:hover { color: var(--red-dark); }
.events-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(12px, 1.5vw, 20px);
}
.events-buttons a {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 20px;
}
.events-buttons a:hover { background: var(--red-dark); }

/* ════════════════════════════════════════
   LETTERS FROM FATHER SANTIAGO BAND
════════════════════════════════════════ */
.letter-band {
  background: var(--navy);
  padding: clamp(36px, 5vw, 60px) var(--gutter);
  text-align: center;
}
.letter-band-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
}
.letter-band-title {
  font-family: var(--font-body);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.letter-band-date {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}
.letter-band-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  padding: 11px 28px;
  border-radius: 2px;
  transition: background .15s, border-color .15s;
}
.letter-band-link:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.8);
}
.letter-band-skeleton {
  height: 22px;
  width: 340px;
  max-width: 80%;
  margin: 0 auto 0.5rem;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.08) 25%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ════════════════════════════════════════
   QUICK LINKS GRID
════════════════════════════════════════ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
  margin-block: var(--section-gap);
}
.quick-link-tile {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.quick-link-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: transparent;
  transition: background-color 0.25s ease;
  z-index: 1;
}
.quick-link-tile:hover::before {
  background-color: rgba(204, 25, 57, 0.72);
}
.quick-link-tile h3 {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  padding: 20px;
  line-height: 1.3;
}
#tile-live    { background-image: url('/images/grace-square-livestream.webp'); }
#tile-serve   { background-image: url('/images/grace-square-serve.webp'); }
#tile-music   { background-image: url('/images/grace-square-music-1.webp'); }
#tile-history { background-image: url('/images/grace-square-history-1.webp'); }

/* ════════════════════════════════════════
   COMMUNITY / NEW TO GRACE
════════════════════════════════════════ */
.community-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-block: var(--section-gap);
}
.community-text { padding-right: clamp(0px, 3vw, 40px); }
.community-heading {
  font-family: var(--font-body);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.community-body {
  font-family: var(--font-ui);
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.7;
  margin-bottom: 28px;
}
.connect-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 32px;
}
.connect-btn:hover { background: var(--red-dark); }
.community-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 26px rgba(0,0,0,0.5);
  display: block;
  max-height: 320px;
}

/* ════════════════════════════════════════
   VISIT US
════════════════════════════════════════ */
.visit-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-block: var(--section-gap);
}
.visit-map { min-height: 360px; }
.visit-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
}
.visit-text {
  background: var(--red);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.visit-heading {
  font-family: var(--font-body);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.visit-body {
  font-family: var(--font-ui);
  font-size: clamp(15px, 1.4vw, 19px);
  color: #fff;
  line-height: 1.7;
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  position: relative;
  background-image: url('/images/grace-sketch.webp');
  background-position: top left;
  background-repeat: no-repeat;
  background-size: contain;
}
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.76);
  z-index: 0;
}
footer > * { position: relative; z-index: 1; }
.footer-rule {
  border: none;
  border-top: 1px solid #000;
  margin: 0;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(24px, 3vw, 36px);
}
.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.footer-col p,
.footer-col address {
  font-style: normal;
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--navy);
  line-height: 1.75;
}
.footer-col em {
  display: block;
  font-style: italic;
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--navy);
  line-height: 1.7;
}
.social-icons {
  display: flex;
  gap: 20px;
  margin-block: 14px;
  align-items: center;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--red);
  font-size: 22px;
}
.social-icons a:hover { color: var(--red-dark); }
.newsletter-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 20px;
  text-align: center;
  width: 100%;
  max-width: 300px;
}
.newsletter-btn:hover { background: var(--red-dark); }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 2px; }
.footer-nav li a {
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  display: block;
  padding: 5px 13px;
}
.footer-nav li a:hover { color: var(--red); }
.footer-bottom-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(16px, 2vw, 24px);
}
.footer-logo-block img { max-width: 240px; }
.footer-schedule-content {
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--navy);
  line-height: 1.6;
}
.footer-schedule-content p      { margin: 0; }
.footer-schedule-content em     { font-style: italic; }
.footer-schedule-content strong { font-weight: 700; }
.footer-diocese {
  font-size: clamp(14px, 1.2vw, 17px);
  font-style: italic;
  color: var(--navy);
  line-height: 1.7;
}
.footer-diocese a {
  display: block;
  color: var(--navy);
  text-decoration: underline;
}
.footer-diocese a:hover { color: var(--red); }
.footer-copyright {
  padding-block: clamp(10px, 1.2vw, 16px);
  font-size: 14px;
  color: var(--navy);
}

/* ════════════════════════════════════════
   INNER PAGE — SHARED COMPONENTS
   Used on About, Worship, Music, Community, Give, etc.
════════════════════════════════════════ */

/* Page hero banner */
.page-hero {
  background:
    linear-gradient(135deg, rgba(28,49,68,0.45) 0%, rgba(204,25,57,0.08) 100%),
    var(--red);
  min-height: clamp(120px, 16vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 6vw, 72px) var(--gutter);
}
.page-hero-title {
  font-family: var(--font-body);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  letter-spacing: clamp(2px, 0.4vw, 4px);
  text-transform: uppercase;
}

/* Feature section: side-by-side image + text */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}
.feature-section.reverse { direction: rtl; }
.feature-section.reverse > * { direction: ltr; }
.feature-img {
  background: var(--navy);
  background-size: cover;
  background-position: center;
  min-height: 320px;
}
.feature-text {
  padding: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}
.feature-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 10px;
}
.feature-heading {
  font-family: var(--font-body);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.25;
}
.feature-body {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
  color: var(--navy);
  margin-bottom: 28px;
}
.feature-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  padding: 12px 28px;
  align-self: flex-start;
  transition: background 0.2s;
}
.feature-btn:hover { background: var(--red-dark); }

/* Bottom tile links (e.g. Calendar, History, Rental) */
.page-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
  padding-inline: var(--card-gap);
  padding-block: var(--card-gap);
}
.page-tile {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-decoration: none;
}
.page-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: transparent;
  transition: background-color 0.25s ease;
  z-index: 1;
}
.page-tile:hover::before { background-color: rgba(204,25,57,0.72); }
.page-tile h3 {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  padding: 20px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

/* Inner page intro block */
.page-intro {
  padding-block: clamp(40px, 5vw, 64px);
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}
.page-intro p {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
  color: var(--navy);
  margin-bottom: 1em;
}
.page-intro p:last-child { margin-bottom: 0; }
.page-intro blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--red);
  line-height: 1.6;
  margin-bottom: 1.5em;
}

/* Responsive inner page */
@media (max-width: 768px) {
  .feature-section { grid-template-columns: 1fr; }
  .feature-section.reverse { direction: ltr; }
  .feature-img { min-height: 260px; }
  .page-tiles { grid-template-columns: 1fr 1fr; padding-inline: var(--card-gap); }
  .page-tile { min-height: 160px; }
}
@media (max-width: 540px) {
  .page-tiles { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   SUBPAGE LAYOUT (sidebar + content)
   Used by worship, and future section layouts
════════════════════════════════════════ */
.subpage-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(40px, 5vw, 64px);
  align-items: start;
}
.subpage-sidebar {
  position: sticky;
  top: 110px;
}
.sidebar-section-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}
.sidebar-nav ul { list-style: none; }
.sidebar-nav li a {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--navy);
  padding: 9px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: color 0.2s;
}
.sidebar-nav li a:hover { color: var(--red); }
.sidebar-nav li a.active {
  color: var(--red);
  font-weight: 600;
}

/* Subpage content typography */
.subpage-content h1 {
  font-family: var(--font-body);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 400;
  color: var(--navy);
  margin-bottom: clamp(20px, 2.5vw, 32px);
  line-height: 1.2;
}
.subpage-content h2 {
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-top: clamp(28px, 3vw, 40px);
  margin-bottom: 16px;
}
.subpage-content p {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--navy);
  margin-bottom: 1.1em;
}
.subpage-content ul {
  margin: 0 0 1.1em 1.5em;
}
.subpage-content ul li {
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--navy);
  margin-bottom: 4px;
}
.subpage-content a {
  color: var(--red);
  text-decoration: underline;
}
.subpage-content a:hover { color: var(--red-dark); }
.subpage-content hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.12);
  margin: clamp(24px, 3vw, 40px) 0;
}
.subpage-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff !important;
  background: var(--red);
  padding: 13px 28px;
  text-decoration: none !important;
  transition: background 0.2s;
  margin-block: 8px 24px;
}
.subpage-btn:hover { background: var(--red-dark) !important; }
button.subpage-btn { border: none; cursor: pointer; }

/* Sidebar toggle button — hidden on desktop */
.sidebar-toggle {
  display: none;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  .subpage-layout {
    grid-template-columns: 1fr;
  }
  .subpage-sidebar {
    position: static;
    margin-bottom: 8px;
  }
  /* Hide the static desktop label; show toggle button instead */
  .sidebar-section-label { display: none; }
  .sidebar-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    padding: 14px 0;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--navy);
  }
  .sidebar-toggle .toggle-icon {
    font-size: 13px;
    transition: transform 0.3s ease;
    color: var(--red);
  }
  .sidebar-toggle.is-open .toggle-icon {
    transform: rotate(180deg);
  }
  /* Nav hidden by default on mobile, shown when toggled */
  .sidebar-nav { display: none; }
  .sidebar-nav.is-open { display: block; }
  .sidebar-nav ul { display: flex; flex-direction: column; }
  .sidebar-nav li a {
    padding: 11px 0;
    font-size: 14px;
  }
}

/* ════════════════════════════════════════
   WORSHIP PAGE
════════════════════════════════════════ */
.worship-schedule-block {
  background: #fff;
  text-align: center;
  padding: clamp(32px, 4vw, 56px) var(--gutter);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.worship-schedule-block .ws-title {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 10px;
  text-decoration: none;
}
.worship-schedule-block .ws-title:hover { color: var(--red-dark); }
.worship-schedule-block .ws-info {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.5;
}
.worship-schedule-block .ws-links {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 1.5px;
}
.worship-schedule-block .ws-links a {
  color: var(--red);
  text-transform: uppercase;
  text-decoration: underline;
}
.worship-schedule-block .ws-links a:hover { color: var(--red-dark); }

/* Life events grid (Baptisms, Weddings, Confirmations, Funerals) */
.life-events {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(0,0,0,0.08);
}
.life-event-tile {
  padding: clamp(32px, 4vw, 56px) clamp(20px, 2.5vw, 36px);
  border-right: 1px solid rgba(0,0,0,0.08);
  text-decoration: none;
  background: #fff;
  transition: background 0.2s;
}
.life-event-tile:last-child { border-right: none; }
.life-event-tile:hover { background: var(--cream); }
.life-event-tile h3 {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 12px;
}
.life-event-tile p {
  font-family: var(--font-ui);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--navy);
  margin-bottom: 16px;
}
.life-event-tile .learn-more {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}
@media (max-width: 900px) {
  .life-events { grid-template-columns: repeat(2, 1fr); }
  .life-event-tile { border-bottom: 1px solid rgba(0,0,0,0.08); }
}
@media (max-width: 540px) {
  .life-events { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   HAMBURGER MENU
════════════════════════════════════════ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--red);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Footer nav toggle button — hidden on desktop */
.footer-nav-toggle { display: none; }

/* ════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 900px)
════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-section    { flex-direction: column; }
  .about-image,
  .about-text       { flex: unset; max-width: 100%; width: 100%; }
  .about-text       { padding: 0; }

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

  .quick-links      { grid-template-columns: repeat(2, 1fr); }

  .community-section { grid-template-columns: 1fr; }
  .community-text   { padding-right: 0; }

  .visit-section    { grid-template-columns: 1fr; }
  .visit-map        { min-height: 300px; }
  .visit-map iframe { min-height: 300px; }

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

  /* Footer nav collapses to hamburger at 2-column breakpoint */
  .footer-nav-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    color: var(--navy);
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0 0 12px 0;
    margin-bottom: 0;
  }
  .footer-nav-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 13px;
  }
  .footer-nav-toggle.is-open .toggle-icon { transform: rotate(180deg); }

  .footer-nav nav { display: none; }
  .footer-nav.is-open nav { display: block; }
}

/* ════════════════════════════════════════
   RESPONSIVE — HAMBURGER  (≤ 768px)
════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Restore centered hero image on mobile */
  .hero { background-position: center center; }

  /* Show hamburger button */
  .nav-toggle { display: flex; }

  /* Header wraps to allow nav to drop below */
  .header-inner { flex-wrap: wrap; position: relative; }

  /* Hide nav by default; show when open */
  nav.main-nav {
    display: none;
    width: 100%;
    order: 3;
    border-top: 1px solid #f0f0f0;
  }
  nav.main-nav.is-open { display: block; }
  nav.main-nav ul { flex-direction: column; }
  nav.main-nav li a {
    padding: 14px var(--gutter);
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
  }

  /* Mobile dropdown — chevron toggle visible, dropdown inline */
  nav.main-nav li.has-dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  nav.main-nav li.has-dropdown > a {
    flex: 1;
    padding-right: 8px;
  }
  .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    color: var(--red);
    cursor: pointer;
    font-size: 11px;
    transition: transform .2s;
    flex-shrink: 0;
  }
  .dropdown-toggle i {
    transition: transform .25s;
  }
  nav.main-nav li.has-dropdown.is-open > .dropdown-toggle i {
    transform: rotate(180deg);
  }
  nav.main-nav ul.dropdown {
    display: none;
    position: static;
    width: 100%;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--red);
    border-radius: 0;
    background: #fafafa;
    padding: 4px 0;
    flex-basis: 100%;
  }
  nav.main-nav li.has-dropdown.is-open > ul.dropdown {
    display: flex;
  }
  nav.main-nav ul.dropdown li a {
    padding: 11px var(--gutter) 11px calc(var(--gutter) + 12px);
    font-size: 13px;
    color: var(--navy);
    border-bottom: 1px solid #efefef;
  }
  nav.main-nav ul.dropdown li:last-child a {
    border-bottom: none;
  }
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 540px)
════════════════════════════════════════ */
@media (max-width: 540px) {
  .worship-box      { width: 100%; }
  .worship-box-wrap { margin-top: -32px; }

  .events-grid      { grid-template-columns: 1fr; }
  .quick-links      { grid-template-columns: repeat(2, 1fr); }
  .quick-link-tile  { min-height: 160px; }

  .footer-columns   { grid-template-columns: 1fr; }
  .newsletter-btn   { max-width: 100%; }
}

/* ════════════════════════════════════════
   FORMS (community subpages)
════════════════════════════════════════ */
.subpage-content form {
  margin-top: 32px;
}
.form-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.form-field label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-field .required { color: var(--red); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 10px 14px;
  border-radius: 2px;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400 !important;
  color: var(--navy);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  flex-shrink: 0;
}

/* Blockquote */
.subpage-content blockquote {
  border-left: 4px solid var(--red);
  margin: 28px 0;
  padding: 16px 24px;
  background: var(--cream);
}
.subpage-content blockquote p {
  font-style: italic;
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--navy);
  margin: 0;
}

/* Multiple .subpage-btn on one line */
.subpage-content p > .subpage-btn + .subpage-btn {
  margin-left: 12px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
