/* ==========================================================================
   ROMC — Rehoboth Outreach Ministries for Christ
   Brand palette (supplied): Royal Blue #022984 · Bright Red #F10301 ·
   Gold #EA9A04 · Light Gold #FAC125 · Black #000 · White #FFF
   Colour roles: navy = structure & text accents · red = main action only
   (shade #C81004 keeps AA with white at small sizes) · gold = detail on
   navy · light gold = warm tints · black = body text · white = ground.
   No gradients, no shadows — depth comes from blocks, borders and type.
   ========================================================================== */

:root {
  --navy: #022984;
  --navy-deep: #011d61;
  --red: #f10301;
  --red-action: #c81004;
  --red-action-dark: #a00d03;
  --gold: #ea9a04;
  --light-gold: #fac125;
  --gold-dark: #7a5200;
  --ink: #141414;
  --paper: #ffffff;
  --tint: #fdf6e3;
  --line: #e3dcc8;
  --line-strong: #c9c0a3;
  --focus-on-light: #022984;
  --focus-on-dark: #fac125;

  /* Image slots — one variable per aspect so real photos drop in cleanly */
  --ar-hero: 4 / 5;
  --ar-arch: 4 / 5;
  --ar-video: 16 / 9;
  --ar-card: 4 / 3;
  --ar-portrait: 4 / 5;
  --ar-map: 2 / 1;

  --font: "Merriweather", Georgia, "Times New Roman", serif;
  --max: 72rem;
  --narrow: 44rem;

  /* Corner radius scale — soft but never bubbly.
     Cards 6px → 8px, buttons 5px → 6px, badges/chips 3px (fixed). */
  --r-card: 6px;
  --r-btn: 5px;
  --r-chip: 3px;
}

/* ---------- Fonts (self-hosted variable files, display: swap) ----------- */

@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("/static/fonts/merriweather-italic.woff2") format("woff2");
}

/* ------------------------------- Reset ---------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17px — readable for older members */
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;              /* clip doesn't create a scroll container — keeps the sticky header working */
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; max-width: 75ch; }
a { color: var(--navy); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
ul { padding-left: 1.2rem; }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Focus — navy on light surfaces, light-gold on dark blocks */
:focus-visible {
  outline: 3px solid var(--focus-on-light);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-footer :focus-visible,
.section-navy :focus-visible, .hero :focus-visible, .live-banner :focus-visible,
.panel-live :focus-visible, .duo-panel.panel-gold :focus-visible .btn-navy,
.lightbox :focus-visible { outline-color: var(--focus-on-dark); }

/* ------------------------------ Utilities ------------------------------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 1rem; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100%; left: .75rem; z-index: 200;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: .5rem; }
.hint { font-size: .9rem; color: #4a463c; }
.center .hint, .section-navy .hint { color: inherit; opacity: .85; }

.tag-private {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .1rem .45rem; border-radius: var(--r-chip);
  vertical-align: middle; background: var(--navy); color: #fff;
}

.notice {
  border: 1px solid var(--line); background: var(--tint); border-radius: var(--r-card);
  padding: .9rem 1.1rem; margin: 0 0 1.25rem; font-size: .95rem;
}

/* ------------------------------- Buttons -------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6rem 1.4rem; border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border-radius: var(--r-btn); text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-lg { min-height: 52px; padding: .8rem 1.8rem; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .3rem .9rem; font-size: .85rem; }

.btn-action { background: var(--red-action); color: #fff; border-color: var(--red-action); }
.btn-action:hover { background: var(--red-action-dark); border-color: var(--red-action-dark); }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: var(--light-gold); border-color: var(--light-gold); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

/* Button rows: mobile-first — every button shares one line, equal widths,
   shorter height, text never wraps. Primary action gets a wider share. */
.btn-row { display: flex; flex-wrap: nowrap; gap: .45rem; margin-top: 1.25rem; }
.btn-row .btn {
  flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden;
  min-height: 42px; padding: .55rem .4rem;
  font-size: clamp(.72rem, 3.4vw, .95rem); border-radius: var(--r-btn);
}
.btn-row .btn-action { flex: 1.35 1 0; }
.btn-row .btn:only-child { flex: 0 0 auto; padding: .6rem 1.4rem; }
.center-row { justify-content: center; }

/* --------------------------- Signature motif -----------------------------
   The gold ring + arch, drawn from the logo ring and the arched entrance
   on the building render. Reused for image frames, the mandate mark and
   empty states — no photography required.                                 */

.ring-mark {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  border: 3px solid var(--gold); position: relative;
}
.ring-mark::after {
  content: ""; position: absolute; left: 50%; top: 54%;
  width: 34%; height: 42%; transform: translate(-50%, -50%);
  border: 3px solid var(--gold); border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.ring-mark-lg { width: 88px; height: 88px; }

.arch-frame {
  border: 3px solid var(--gold); border-radius: 999px 999px 0 0;
  padding: 10px; background: var(--paper);
}
.arch-frame .img-arch {
  border-radius: 989px 989px 0 0;
  aspect-ratio: var(--ar-arch); object-fit: cover; width: 100%;
}
.ring-frame { position: relative; display: block; border: 3px solid var(--gold); border-radius: var(--r-card); padding: 8px; background: var(--paper); }
.ring-frame .img-video { border-radius: 3px; }

.img-video { aspect-ratio: var(--ar-video); object-fit: cover; width: 100%; }
.img-card { aspect-ratio: var(--ar-card); object-fit: cover; width: 100%; }
.img-portrait { aspect-ratio: var(--ar-portrait); object-fit: cover; width: 100%; }
.img-map { aspect-ratio: var(--ar-map); object-fit: cover; width: 100%; border: 1px solid var(--line); }
.media-caption { font-size: .85rem; color: #4a463c; margin-top: .6rem; }

/* ------------------------------- Header --------------------------------- */

.site-header {
  background: var(--paper); color: var(--ink);
  border-bottom: 4px solid var(--gold);
  position: sticky; top: 0; z-index: 170;
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; gap: 1rem; min-height: 72px; position: relative;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand-logo {
  display: block; height: auto; max-height: 48px; width: auto; max-width: min(58vw, 260px);
  object-fit: contain;
}
@media (min-width: 48rem) { .brand-logo { max-height: 54px; } }

.nav-toggle {
  width: 48px; height: 48px; border: 2px solid var(--navy); border-radius: var(--r-btn);
  background: transparent; display: grid; place-items: center; padding: 0;
}
.nav-toggle:hover { background: var(--tint); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2.5px; background: var(--navy); position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; top: 72px; left: 0; right: 0;
  background: var(--paper); z-index: 100;
  border-top: 1px solid var(--line); box-shadow: 0 12px 16px -8px rgba(1, 29, 97, .18);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { border-top: 1px solid var(--line); }
.site-nav li:first-child { border-top: 0; }
.site-nav a {
  display: block; padding: .9rem 1.25rem; color: var(--navy); text-decoration: none;
  font-weight: 700; font-size: 1rem; min-height: 48px;
}
.site-nav a:hover { background: var(--tint); }
.site-nav a[aria-current="page"] { border-left: 4px solid var(--gold); }
.nav-actions { display: flex; gap: .6rem; padding: 1rem 1.25rem 1.4rem; flex-wrap: wrap; }
.nav-actions .btn { flex: 1; }

.live-banner {
  background: var(--navy-deep); color: #fff; text-align: center;
  padding: .45rem 1rem; font-size: .95rem;
}
.live-banner a { color: #fff; font-weight: 700; }
.live-dot {
  display: inline-block; width: .6em; height: .6em; border-radius: 50%;
  background: var(--red); margin-right: .4em;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* --------------------------- Flash & banners ---------------------------- */

.flash { padding: .9rem 0; font-size: .98rem; }
.flash-ok { background: var(--tint); border-bottom: 1px solid var(--line); }
.flash-ok strong { color: var(--gold-dark); }
.flash-err { background: #fbe7e6; color: var(--red-action-dark); border-bottom: 1px solid var(--line); }
.flash-err strong { color: var(--red-action-dark); }

/* -------------------------------- Hero ---------------------------------- */

.hero { background: linear-gradient(180deg, rgba(2,20,70,.82) 0%, rgba(2,30,95,.66) 48%, rgba(2,41,132,.55) 100%), url("../images/sanctuary-vision.jpg") 57% 55%/cover no-repeat, var(--navy); color: #fff; padding: 2.5rem 0 3rem; }
.hero h1 { color: #fff; font-size: 2.1rem; }
.hero .lede { color: #e8ecf9; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-dark); margin-bottom: .4rem;
}
.hero .eyebrow, .eyebrow-gold { color: var(--gold); }
.lede { font-size: 1.12rem; text-wrap: pretty; }
.hero h1 { max-width: 16ch; }
.page-hero h1 { max-width: 20ch; }
.hero-grid { display: grid; gap: 2.5rem; }
.hero-media .arch-frame { max-width: 26rem; margin: 0 auto; }
.hero-credit { text-align: center; color: var(--light-gold); font-style: italic; margin-top: .8rem; }

/* Scripture block — reused site-wide */
.scripture-block { margin: 1.5rem 0; }
.scripture-ring {
  width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--gold);
  position: relative; margin-bottom: .9rem;
}
.scripture-ring::after {
  content: ""; position: absolute; left: 50%; top: 54%; transform: translate(-50%,-50%);
  width: 36%; height: 44%; border: 2.5px solid var(--gold); border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.scripture-text { font-style: italic; font-size: 1.1rem; margin: 0 0 .5rem; max-width: 60ch; }
.scripture-ref { font-size: .9rem; font-weight: 700; }
.scripture-tr { font-weight: 400; }
.scripture-note { display: block; font-weight: 400; font-size: .82rem; opacity: .85; margin-top: .2rem; }
.hero .scripture-ref { color: var(--light-gold); }
.section-tint .scripture-ref, .scripture-ref { color: var(--gold-dark); }
.section-tint .scripture-text { color: var(--ink); }
.wrap-narrow.center .scripture-block .scripture-ring, .center .scripture-ring { margin-left: auto; margin-right: auto; }

/* Service times strip */
.times-strip { background: var(--light-gold); color: var(--ink); padding: 1.4rem 0; }
.times-grid { display: grid; gap: 1rem; align-items: center; }
.times-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.times-next { margin: 0; font-size: 1.05rem; }
.times-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.times-list li { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .95rem; }
.times-list strong { min-width: 5.5rem; }
.times-list span { color: #3d3413; }

/* ------------------------------ Sections -------------------------------- */

.section { padding: 3rem 0; }
.section-tint { background: var(--tint); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head { padding: 2.5rem 0 1.5rem; }
.page-head .lede { color: #33302a; }
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 4.5rem 0 3.5rem; background: var(--navy);
}
.ph-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(2, 41, 132, 0.82);
}
.page-hero h1 { color: #fff; }
.page-hero .lede { color: #e8ecf9; }
.page-hero .eyebrow { color: var(--light-gold); }
.page-hero .btn-red { box-shadow: none; }

.split { display: grid; gap: 2rem; align-items: center; }
.duo { display: grid; gap: 1.5rem; }
.duo-panel { padding: 1.75rem; border-radius: var(--r-card); }
.panel-live { background: var(--navy); color: #fff; }
.panel-live h2 { color: #fff; }
.panel-visit { background: var(--paper); border: 2px solid var(--gold); }
.panel-paper { background: var(--paper); border: 1px solid var(--line); }
.section-tint .panel-paper { border-color: var(--line-strong); }
.panel-gold { background: var(--light-gold); color: var(--ink); }
.panel-gold h2 { color: var(--ink); }

/* Mandate block — the signature moment */
.mandate-text {
  font-size: 1.35rem; font-style: italic; font-weight: 400;
  margin: 0 auto .75rem; max-width: 38ch; color: var(--navy);
}
.mandate-note { font-size: .85rem; color: var(--gold-dark); }
.mandate-sub { font-weight: 900; font-size: 1.2rem; color: var(--navy); letter-spacing: .04em; }

/* Cards & grids */
.card-grid { display: grid; gap: 1.25rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.card:has(> a.card-media):hover { border-color: var(--line-strong); }
.card-media { position: relative; display: block; }
.card-media img { border-bottom: 1px solid var(--line); }
.card-badge {
  position: absolute; bottom: .5rem; left: .5rem; background: var(--navy);
  color: #fff; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: var(--r-chip);
}
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card-meta { font-size: .85rem; color: #4a463c; margin-bottom: .3rem; }
.card-title { font-size: 1.15rem; margin-bottom: .25rem; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-sub { font-size: .9rem; color: #4a463c; }
.card-flag {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; background: var(--light-gold); color: var(--ink);
  padding: .1rem .55rem; border-radius: var(--r-chip); margin-bottom: .4rem;
}
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 64px; height: 64px; border-radius: 50%; background: var(--red-action);
  border: 3px solid #fff;
}
.play-badge::after {
  content: ""; position: absolute; left: 24px; top: 18px;
  border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent;
}

/* Home photo strip */
.photo-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.photo-strip li { position: relative; overflow: hidden; }
.photo-strip img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.photo-strip span { position: absolute; left: 0; right: 0; bottom: 0; padding: .45rem .8rem; font-size: .85rem; font-weight: 700; color: #fff; background: rgba(2, 41, 132, .85); }
@media (min-width: 56rem) { .photo-strip { grid-template-columns: repeat(4, 1fr); } }

/* Reviews marquee — single looping line */
.reviews-section { padding-bottom: 3rem; }
.reviews-marquee { overflow: hidden; }
.review-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1rem; width: max-content;
  animation: review-loop 110s linear infinite;
}
.reviews-marquee:hover .review-track,
.reviews-marquee:focus-within .review-track { animation-play-state: paused; }
@keyframes review-loop { to { transform: translateX(-50%); } }
.review-card {
  flex: 0 0 auto; width: 18rem; margin: 0 0 .5rem; padding: 1.1rem 1.2rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card);
}
.review-stars { color: var(--gold); font-size: 1rem; letter-spacing: .1em; margin: 0 0 .5rem; }
.review-text { font-size: .95rem; margin: 0 0 .75rem; }
.review-who { margin: 0; font-size: .9rem; color: #33302a; }
.review-service {
  display: inline-block; margin-top: .4rem; padding: .15rem .6rem;
  font-size: .75rem; font-weight: 700; color: var(--navy);
  border: 1px solid var(--gold); border-radius: var(--r-chip);
}
@media (prefers-reduced-motion: reduce) {
  .review-track { animation: none; width: auto; flex-wrap: nowrap; }
  .reviews-marquee { overflow-x: auto; }
}

/* Ministry tiles + rows */
.ministry-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ministry-tile { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--paper); }
.ministry-tile img { display: block; }
.ministry-tile-name { display: block; padding: .9rem 1rem .2rem; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.ministry-tile-more { display: block; padding: 0 1rem .9rem; font-size: .85rem; color: var(--red-action-dark); font-weight: 700; }
.ministry-tile:hover { border-color: var(--navy); }
.ministry-list { display: grid; gap: 3rem; }
.ministry-row { display: grid; gap: 1.5rem; align-items: center; }
.ministry-row img { border: 1px solid var(--line); }

/* Leaders */
.leader-grid { display: grid; gap: 1.5rem; }
.leader-photo { background: var(--tint); }

/* Timeline */
.timeline { border-left: 2px solid var(--line); padding-left: 1.5rem; display: grid; gap: 2rem; margin: 1.5rem 0; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: calc(-1.5rem - 5px); top: .45rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.timeline-year { font-weight: 900; color: var(--navy); font-size: 1.1rem; margin-bottom: .25rem; }

/* Testimonies */
.testimony-quote { font-size: 1.3rem; font-style: italic; margin: 0 auto 1rem; max-width: 46ch; }
.testimony-who { font-weight: 700; color: var(--light-gold); }
.testimony-grid { display: grid; gap: 1.25rem; }
.testimony-card { padding: 1.5rem; margin: 0; }
.testimony-card p { font-size: 1.05rem; font-style: italic; }
.testimony-card footer { font-size: .9rem; font-weight: 700; color: var(--navy); }
.testimony-featured { background: var(--tint); border-color: var(--line-strong); }

/* ------------------------------- Events --------------------------------- */

.event-list { display: grid; gap: 0; }
.event-row { display: grid; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.event-date {
  width: 88px; min-height: 88px; background: var(--navy); color: #fff;
  display: grid; place-content: center; text-align: center; border-radius: var(--r-card); padding: .5rem;
}
.event-day { font-size: 1.7rem; font-weight: 900; line-height: 1; }
.event-mon { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--light-gold); }
.event-info h2 { font-size: 1.3rem; }
.event-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-content: start; align-items: center; }
.event-actions .hint { grid-column: 1 / -1; margin: 0; }
.event-actions .btn { min-width: 0; white-space: nowrap; min-height: 42px; padding: .5rem .4rem; font-size: clamp(.72rem, 3.4vw, .85rem); border-radius: var(--r-btn); }

.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cal-nav h2 { margin: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cal-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cal-table th { background: var(--navy); color: #fff; padding: .5rem; font-size: .8rem; text-align: left; }
.cal-table td { border: 1px solid var(--line); vertical-align: top; height: 6.5rem; padding: .35rem; width: 14.28%; }
.cal-out { background: var(--tint); }
.cal-today { outline: 3px solid var(--gold); outline-offset: -3px; }
.cal-day { font-size: .8rem; font-weight: 700; color: var(--navy); }
.cal-event { display: block; font-size: .72rem; background: var(--navy); color: #fff; border-radius: var(--r-chip); padding: .15rem .4rem; margin-top: .25rem; text-decoration: none; line-height: 1.3; }
.cal-event-past { background: #7a7568; }

.prog-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.prog-table th { background: var(--navy); color: #fff; text-align: left; padding: .7rem .9rem; font-size: .9rem; }
.prog-table td { border-bottom: 1px solid var(--line); padding: .8rem .9rem; vertical-align: top; }
.prog-table tr:nth-child(even) td { background: var(--tint); }
.table-sub { font-size: .85rem; color: #4a463c; }

/* Expect list — dt/dd fact rows with hairline separators */
.expect-list { margin: 0 0 1rem; display: grid; gap: 0; }
.expect-list div { padding: .7rem 0; border-top: 1px solid var(--line); }
.expect-list div:first-child { border-top: 0; padding-top: 0; }
.expect-list dt { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .15rem; }
.expect-list dd { margin: 0; }

/* ------------------------------ Filters --------------------------------- */

.filter-bar { display: grid; gap: .9rem; margin-bottom: 1.5rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .95rem;
  border: 1.5px solid var(--navy); border-radius: var(--r-chip); color: var(--navy);
  font-size: .88rem; font-weight: 700; text-decoration: none; background: var(--paper);
}
.chip:hover { background: var(--tint); text-decoration: none; }
.chip-on { background: var(--navy); color: #fff; }
.chip-on:hover { background: var(--navy-deep); }
.result-count { font-size: .9rem; color: #4a463c; margin-bottom: 1rem; }
.view-toggle { display: flex; gap: .5rem; }

/* ------------------------------- Forms ---------------------------------- */

.form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; gap: 1.1rem; }
.field label { font-weight: 700; font-size: .95rem; color: var(--navy); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1.05rem; padding: .7rem .85rem; width: 100%;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-btn); background: var(--paper);
  color: var(--ink);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23022984' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
  padding-right: 2.6rem;
}
.field input, .field textarea { min-height: 44px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--navy); outline: 3px solid rgba(2, 41, 132, .25);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red-action); }
.field-error { color: var(--red-action-dark); font-size: .88rem; font-weight: 700; margin: 0; }
.field-check label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .95rem; color: var(--ink); }
.field-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: .2rem; flex: none; accent-color: var(--navy); }
.field-req { font-size: .82rem; color: #4a463c; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }

/* Give */
.give-step { margin-top: 2.5rem; }
.purpose-grid { display: grid; gap: 1rem; }
.purpose-card {
  display: block; border: 2px solid var(--line-strong); border-radius: var(--r-card);
  padding: 1.1rem 1.25rem; text-decoration: none; color: var(--ink); background: var(--paper);
}
.purpose-card h3 { margin-bottom: .3rem; }
.purpose-card p { margin: 0; font-size: .95rem; }
.purpose-on { border-color: var(--gold); background: var(--tint); box-shadow: inset 0 0 0 1px var(--gold); }
.method-grid { display: grid; gap: 1.25rem; }
.method-card { padding: 1.4rem; }
.method-card h3 { margin-bottom: .6rem; }
.method-steps { padding-left: 1.3rem; display: grid; gap: .5rem; margin: .75rem 0 1rem; }
.copy-val { font-weight: 900; letter-spacing: .03em; }
.copy-btn {
  font-size: .75rem; font-weight: 700; border: 1.5px solid var(--navy); color: var(--navy);
  background: var(--paper); border-radius: var(--r-chip); padding: .1rem .5rem; min-height: 30px; vertical-align: middle;
}
.copy-btn:hover { background: var(--navy); color: #fff; }
.give-safety { border: 2px solid var(--gold); background: var(--tint); padding: 1.5rem; margin-top: 2.5rem; border-radius: var(--r-card); }

/* Tappable contact tiles — one-thumb actions on the contact page */
.contact-cards { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.contact-tile {
  display: flex; align-items: center; gap: .9rem; min-height: 64px;
  padding: .8rem 1rem; border: 1.5px solid var(--navy); border-radius: var(--r-card);
  text-decoration: none; color: var(--navy); background: var(--paper);
}
.contact-tile:hover { background: var(--tint); }
.contact-tile svg { width: 26px; height: 26px; flex: none; }
.contact-tile .tile-lines { display: flex; flex-direction: column; line-height: 1.3; }
.contact-tile strong { font-size: 1.02rem; }
.contact-tile span.tile-sub { font-size: .85rem; color: #4a463c; }
.contact-tile-whatsapp { border-color: #25d366; }
.contact-tile-whatsapp svg { color: #25d366; }

/* Share row */
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.25rem; }
.share-label { font-size: .85rem; font-weight: 700; color: #4a463c; }
.share-btn {
  font-size: .82rem; font-weight: 700; padding: .35rem .8rem; min-height: 38px;
  border: 1.5px solid var(--navy); border-radius: var(--r-btn); color: var(--navy);
  background: var(--paper); text-decoration: none; display: inline-flex; align-items: center;
}
.share-btn:hover { background: var(--navy); color: #fff; }

/* Sermon / media */
.video-frame { aspect-ratio: var(--ar-video); border: 3px solid var(--gold); border-radius: var(--r-card); overflow: hidden; background: var(--ink); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.audio-card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem; }
.audio-card audio { width: 100%; margin-top: 1rem; }
.countdown { font-weight: 900; font-size: 1.25rem; color: var(--light-gold); margin: .5rem 0; }
.live-now-label { font-weight: 900; font-size: 1.2rem; color: var(--red-action-dark); }

/* Subnav (About section) */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1rem 1rem; max-width: var(--max); margin: 0 auto; }
.subnav a {
  padding: .4rem .95rem; border: 1.5px solid var(--navy); border-radius: var(--r-btn);
  color: var(--navy); font-weight: 700; font-size: .88rem; text-decoration: none; min-height: 40px;
  display: inline-flex; align-items: center;
}
.subnav a[aria-current="page"] { background: var(--navy); color: #fff; }

.breadcrumbs { padding-top: 1rem; padding-bottom: 0; font-size: .85rem; color: #4a463c; }
.breadcrumbs a { color: var(--navy); }
.breadcrumbs span[aria-hidden] { margin: 0 .4rem; color: var(--line-strong); }

/* Photo grid + lightbox */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.photo-thumb { border: 0; padding: 0; background: none; display: block; width: 100%; }
.photo-thumb img { border: 1px solid var(--line); border-radius: var(--r-card); }
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(1, 20, 66, .96);
  display: grid; place-items: center; padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox-stage { margin: 0; max-width: 56rem; }
.lightbox-stage img { max-height: 78vh; width: auto; margin: 0 auto; border: 3px solid var(--gold); }
.lightbox-stage figcaption { color: #fff; text-align: center; padding: .9rem; font-style: italic; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; width: 52px; height: 52px;
  background: var(--paper); color: var(--navy); border: 0; border-radius: 50%;
  font-size: 1.8rem; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
  background: var(--paper); color: var(--navy); border: 0; border-radius: 50%; font-size: 1.8rem;
}
.lightbox-prev { left: .6rem; }
.lightbox-next { right: .6rem; }

/* Empty / misc */
.empty-state {
  text-align: center; padding: 2.5rem 1.25rem;
  border: 2px dashed var(--line-strong); border-radius: var(--r-card); background: var(--tint);
}
.empty-state h2 { font-size: 1.2rem; }
.prose { max-width: 68ch; }
.prose p, .prose li { font-size: 1.05rem; }
.prose h2 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; }
.prose h3 { margin: 1.5rem 0 .5rem; }
.prose blockquote {
  margin: 1.2rem 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--gold); font-style: italic; color: #3d3a33;
}
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose img { border-radius: var(--r-card); margin: 1rem 0; }
.prose > p:first-of-type { font-size: 1.12rem; }
.accordion-item { border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: .75rem; background: var(--paper); }
.accordion-item summary {
  padding: 1rem 1.25rem; font-weight: 700; color: var(--navy); cursor: pointer;
  min-height: 48px; display: flex; align-items: center; gap: .6rem; list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::before {
  content: "+"; font-weight: 900; color: var(--gold); font-size: 1.3rem; flex: none; width: 1.2rem;
}
.accordion-item[open] summary::before { content: "–"; }
.accordion-body { padding: 0 1.25rem 1.25rem 3.45rem; }
.accordion-refs { font-size: .9rem; color: var(--gold-dark); font-weight: 700; }
.cta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.cta-line p { margin: 0; }

/* Posts */
.post-list { display: grid; gap: 2.5rem; }
.post-row { display: grid; gap: 1.25rem; align-items: center; }
.post-row h2 { font-size: 1.4rem; }
.post-hero { margin: 1.5rem 0; }

/* ------------------------------- Footer --------------------------------- */

.site-footer { background: var(--navy); color: #dbe1f5; margin-top: 0; border-top: 4px solid var(--gold); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; padding-top: 2.75rem; padding-bottom: 2rem; }
.footer-logo { display: block; width: 230px; height: auto; background: #fff; border-radius: var(--r-card); padding: .5rem .9rem; margin-bottom: 1rem; }
.footer-name { font-weight: 900; color: #fff; font-size: 1.1rem; margin: .9rem 0 .2rem; }
.footer-tagline { font-size: .9rem; color: var(--light-gold); font-style: italic; }
.footer-subtitle { font-size: .95rem; font-weight: 700; color: var(--gold); }
.footer-col h2 { color: var(--light-gold); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.social-row { display: flex !important; flex-wrap: wrap; gap: .75rem; margin-top: 1rem !important; }
.social-row a { font-weight: 700; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.25rem; padding-bottom: 2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .85rem;
}
.footer-base p { margin: 0; }
.footer-credit { width: 100%; font-size: .8rem; color: rgba(255,255,255,.65); }
.footer-credit a { color: var(--light-gold); font-weight: 700; text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }


/* ---------------------- Floating actions & mobile bar -------------------- */

.float-actions { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 150; display: grid; gap: .6rem; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.float-btn svg { width: 26px; height: 26px; }
.float-whatsapp { background: #25D366; color: #fff; }
.float-whatsapp:hover { background: #1EBE5B; }
.float-call { background: var(--navy); color: #fff; }
.float-contact { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 150; background: var(--navy); color: #fff; }
.page-give .float-contact { right: auto; left: 1rem; }

/* (no fixed bottom bar — removed by design) */

/* -------------------------------- Admin --------------------------------- */

.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--tint); padding: 1rem; }
.login-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 2rem; width: 100%; max-width: 24rem; text-align: center; }
.admin-body { background: var(--tint); padding-bottom: 0; }
.admin-head { background: var(--navy); color: #fff; }
.admin-head-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; padding-top: .4rem; padding-bottom: .4rem; }
.admin-brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 900; text-decoration: none; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.admin-nav a { color: #fff; text-decoration: none; font-size: .9rem; font-weight: 700; padding: .4rem .7rem; border-radius: var(--r-btn); }
.admin-nav a[aria-current="page"], .admin-nav a:hover { background: var(--navy-deep); }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.admin-user form { margin: 0; }
.admin-user .btn-ghost { color: #fff; border-color: #fff; }
.admin-user .btn-ghost:hover { background: #fff; color: var(--navy); }
.admin-main { padding-top: 1.5rem; padding-bottom: 4rem; }
.admin-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 1.5rem 0; }
.admin-card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 1.1rem; text-decoration: none; color: var(--ink);
}
.admin-card strong { display: block; font-size: 1.9rem; color: var(--navy); }
.admin-card span { font-size: .85rem; color: #4a463c; }
.admin-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.4rem; margin-bottom: 1.5rem; }
.admin-row-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-split { display: grid; gap: 1.5rem; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .92rem; }
.admin-table th { background: var(--navy); color: #fff; text-align: left; padding: .6rem .8rem; }
.admin-table td { border-bottom: 1px solid var(--line); padding: .6rem .8rem; vertical-align: top; }
.status { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--r-chip); }
.status-new { background: var(--light-gold); color: var(--ink); }
.status-contacted { background: var(--gold); color: var(--navy); }
.status-joined { background: var(--navy); color: #fff; }
.status-closed { background: #e8e4d8; color: var(--ink); }
.status-cancelled { background: #f0d5d3; color: var(--red-action-dark); }
.admin-form { max-width: 46rem; }

/* -------------------- Mobile density (<768px) ---------------------------
   All small-screen spacing overrides live in this one block:
   - container side padding, card gaps and card padding are all 6px —
     edge-to-card distance equals card-to-card distance;
   - card grids that stay readable at half width go 2-per-line;
   - single-column contexts (forms, long-form, sequential rows) get 8px. */
@media (max-width: 47.99rem) {
  .section { padding: 2.4rem 0; }
  .hero { padding: 2rem 0 2.6rem; }
  .page-hero { padding: 3rem 0 2.4rem; }
  .section-head { margin-bottom: 1.1rem; }

  /* Chip rows scroll sideways instead of stacking — thumb-friendly, edge-to-edge */
  .subnav, .filter-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .35rem; scrollbar-width: none;
  }
  .subnav::-webkit-scrollbar, .filter-chips::-webkit-scrollbar { display: none; }
  .subnav a, .filter-chips .chip { flex: none; }

  .wrap { padding-left: 6px; padding-right: 6px; }
  .wrap-narrow { padding-left: 8px; padding-right: 8px; }
  .wrap:has(.event-list), .wrap:has(.post-list), .wrap:has(.ministry-list),
  .wrap:has(.testimony-grid), .wrap:has(.form), .wrap:has(.duo),
  .wrap:has(.prog-table), .wrap:has(.cal-table), .wrap:has(.accordion),
  .wrap:has(.prose) { padding-left: 8px; padding-right: 8px; }

  .card-grid, .ministry-grid, .purpose-grid, .leader-grid,
  .photo-grid, .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .wrap:has(.method-grid) { padding-left: 8px; padding-right: 8px; }

  .card-body { padding: .55rem 6px; }
  .card-grid .card-title { font-size: .95rem; }
  .card-grid .card-meta, .card-grid .card-sub, .card-grid .card-body p { font-size: .8rem; }
  .card-grid .card-badge { font-size: .68rem; padding: .15rem .45rem; }
  .ministry-tile-name { padding: .5rem 6px .15rem; font-size: .9rem; }
  .ministry-tile-more { padding: 0 6px .5rem; font-size: .75rem; }
  .leader-card .card-body { padding: .55rem 6px; }
  .duo-panel { padding: 1rem 6px; }
  .testimony-card { padding: 1rem 6px; }
  .method-card { padding: .75rem 6px; }
  .purpose-card, .audio-card { padding: .75rem 6px; }
  .review-card { padding: .8rem 6px; }
  .post-row-copy, .ministry-row-copy { padding: 0 2px; }
  .event-row { padding: 1.1rem 2px; }
}

/* --------------------------- Breakpoints -------------------------------- */

@media (min-width: 36rem) {           /* 576px */
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .ministry-grid { grid-template-columns: repeat(2, 1fr); }
  .testimony-grid { grid-template-columns: repeat(2, 1fr); }
  .purpose-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: repeat(2, 1fr); }
  .event-row { grid-template-columns: 88px 1fr auto; align-items: start; }
  .event-actions { grid-template-columns: 1fr; }
  .event-actions .btn { min-height: 44px; padding: .6rem 1.4rem; font-size: .95rem; white-space: normal; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 48rem) {           /* 768px — tablet */
  :root { --r-card: 8px; --r-btn: 6px; }
  h1 { font-size: 2.4rem; }
  .float-actions, .float-contact { bottom: 1.25rem; }
  .hero { padding: 4rem 0 4.5rem; background: linear-gradient(100deg, rgba(2,20,70,.94) 0%, rgba(2,30,95,.90) 42%, rgba(2,41,132,.60) 72%, rgba(2,41,132,.38) 100%), url("../images/sanctuary-vision.jpg") right center/contain no-repeat, var(--navy); }
  .hero h1 { font-size: 2.7rem; }
  .times-grid { grid-template-columns: auto 1fr auto; }
  .duo { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
  .split-reverse .split-media { order: 2; }
  .post-row { grid-template-columns: 1fr 1.4fr; }
  .post-row-first { grid-template-columns: 1.2fr 1fr; }
  .ministry-row { grid-template-columns: 1fr 1.2fr; gap: 2.5rem; }
  .ministry-row-flip .ministry-row-media { order: 2; }
  .filter-bar { grid-template-columns: minmax(220px, 1fr); }
  .btn-row { flex-wrap: wrap; gap: .75rem; }
  .btn-row .btn { flex: 0 0 auto; min-height: 44px; padding: .6rem 1.4rem; font-size: .95rem; }
  .btn-row .btn-action { flex: none; }
  .btn-row .btn-lg { min-height: 52px; padding: .8rem 1.8rem; font-size: 1.05rem; }
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-split { grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 62rem) {           /* 992px — laptop */
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 1.5rem; position: static; }
  .site-nav ul { display: flex; gap: .15rem; }
  .site-nav li { border-top: 0; }
  .site-nav a { padding: .55rem .8rem; min-height: 44px; font-size: .95rem; border-radius: var(--r-btn); }
  .site-nav a[aria-current="page"] { border-left: 0; border-bottom: 3px solid var(--gold); }
  .nav-actions { padding: 0; flex-wrap: nowrap; }
  .nav-actions .btn { flex: none; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .ministry-grid { grid-template-columns: repeat(3, 1fr); }
  .leader-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 90rem) {           /* 1440px+ — wide */
  :root { --max: 76rem; }
  body { font-size: 1.125rem; }
}

/* ------------------------ Reduced motion & print ------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .live-dot { animation: none; }
}

/* Print — strip chrome, keep the message */
@media print {
  .site-header, .site-footer nav, .float-actions, .float-contact,
  .nav-toggle, .live-banner, .btn-row, .reviews-marquee { display: none !important; }
  .hero, .section { padding: 1rem 0; }
}
