/* Peace AG Church — site styles
   Mobile-first: base rules target phones; min-width queries layer on
   tablet (640px), desktop (960px) and wide (1024px / 1100px) layouts. */

:root {
  --blue: #1A4BAA;
  --red: #D8261E;
  --red-dark: #B01E17;
  --navy: #0E2A63;
  --navy-2: #1C3C80;
  --footer: #0B2257;
  --ink: #13203F;
  --muted: #4A5675;
  --text-2: #3A4666;
  --soft: #F3F6FC;
  --tint: #EAF0FB;
  --border: #E3E8F2;
  --input: #8A97B5;
  --ph: #E4EAF6;
  --ph-line: #A8B6D6;
  --on-navy: #D6E0F5;
  --on-navy-eyebrow: #A9C2F5;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter: 20px;
  --section: 64px;
  --header-h: 72px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --section: 88px; }
}

@media (min-width: 960px) {
  :root { --section: 112px; }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

a { color: var(--blue); }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--blue);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #ffffff; }

/* ---------- Layout ---------- */

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 1040px; }

.section { padding-block: var(--section); }
.section--soft { background: var(--soft); }
.section--flush-top { padding-top: 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--sm { gap: 8px; }
.stack--lg { gap: 20px; }
.stack--xl { gap: 32px; }

@media (min-width: 960px) {
  .stack--xl { gap: 48px; }
}

.split { display: grid; gap: 40px; align-items: center; }
.split--start { align-items: start; }
.split--stretch { align-items: stretch; }

@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  /* A split whose photo is hidden falls back to a single readable column */
  .split:has(> [hidden]) { grid-template-columns: minmax(0, 760px); }
  .split--wide-gap { gap: 72px; }
  .split--welcome { gap: 64px; }
}

.grid { display: grid; gap: 16px; }

@media (min-width: 640px) {
  .grid { gap: 24px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.grid--tight { gap: 12px; }
@media (min-width: 640px) { .grid--tight { gap: 16px; } }

/* Large phones: two people per row (grid--4 takes over from 640px) */
@media (min-width: 480px) and (max-width: 639px) {
  .grid--people { grid-template-columns: repeat(2, 1fr); }
}

.grid--gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) {
  .grid--gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1100px) {
  .grid--gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Typography ---------- */

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
}
.eyebrow--light { color: var(--on-navy-eyebrow); letter-spacing: 0.18em; }
.eyebrow--pale { color: #C7D7F8; }

.display {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.08;
}

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.12;
  max-width: 820px;
}

.h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.18;
}

.lead { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.lead--light { color: var(--on-navy); line-height: 1.6; max-width: 640px; }
.muted { color: var(--muted); }

.signature {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: var(--blue);
}

.link-arrow {
  display: inline-block;
  align-self: flex-start;
  padding-block: 12px;
  font-size: 16px;
  font-weight: 700;
}

@media (min-width: 640px) {
  .display { font-size: 48px; }
  .page-title { font-size: 44px; }
  .h2 { font-size: 38px; line-height: 1.15; }
  .lead { font-size: 18px; }
  .lead--light { font-size: 19px; }
  .signature { font-size: 24px; }
}

@media (min-width: 960px) {
  .display { font-size: 64px; line-height: 1.05; }
  .page-title { font-size: 56px; line-height: 1.1; }
  .h2 { font-size: 44px; }
  .h2--sm { font-size: 40px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--red { background: var(--red); color: #ffffff; }
.btn--red:hover { background: var(--red-dark); color: #ffffff; }

.btn--blue { background: var(--blue); color: #ffffff; }
.btn--blue:hover { background: var(--navy); color: #ffffff; }

.btn--outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--outline:hover { background: var(--blue); color: #ffffff; }

.btn--outline-light { border-color: #ffffff; color: #ffffff; background: transparent; }
.btn--outline-light:hover { background: #ffffff; color: var(--navy); }

.btn--white { background: #ffffff; color: var(--red-dark); }
.btn--white:hover { background: #FFE9E7; color: var(--red-dark); }

.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }

.btn--text { padding-inline: 4px; color: var(--blue); }

/* Phones: primary actions span the full width for easy tapping */
.btn-row { display: flex; flex-direction: column; gap: 12px; }
.btn-row .btn, .btn--block { width: 100%; }

@media (min-width: 640px) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .btn-row .btn, .btn--block { width: auto; }
  .btn--block { align-self: flex-start; }
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: var(--header-h);
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 48px;
  overflow: hidden;
}
.brand__mark img {
  position: absolute;
  width: 161px;
  height: 161px;
  left: -56px;
  top: -37px;
  max-width: none;
}

.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue);
}
.brand__tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 640px) {
  .brand { gap: 12px; }
  .brand__name { font-size: 22px; }
  .brand__tag { font-size: 12px; }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}
.js .nav-toggle { display: inline-flex; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Phones & tablets: nav is a full-width panel under the brand row */
.site-nav {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
}
.js .site-nav { display: none; }
.js .site-header.is-open .site-nav { display: flex; }

.site-nav a {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover { background: var(--soft); color: var(--ink); }
.site-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--blue);
  background: var(--tint);
}
.site-nav .nav-cta {
  margin-top: 8px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  background: var(--red);
}
.site-nav .nav-cta:hover { background: var(--red-dark); color: #ffffff; }

@media (min-width: 1024px) {
  .site-header__inner { flex-wrap: nowrap; padding-block: 14px; }
  .js .nav-toggle { display: none; }
  .site-nav,
  .js .site-nav {
    display: flex;
    flex-direction: row;
    flex-basis: auto;
    align-items: center;
    gap: 4px;
    padding: 0;
  }
  .site-nav a { padding: 10px 14px; border-radius: 8px; font-size: 15px; }
  .site-nav .nav-cta { margin: 0 0 0 8px; padding: 12px 18px; border-radius: 999px; }
}

/* ---------- Photo placeholders ---------- */

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px dashed var(--ph-line);
  border-radius: 16px;
  background: var(--ph);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.ph--dark { background: var(--navy-2); border-color: #4E6FB5; color: #C3D3F3; }
.ph--landscape { aspect-ratio: 4 / 3; }
.ph--square { aspect-ratio: 1 / 1; }
.ph--portrait { aspect-ratio: 4 / 5; }
.ph--video { aspect-ratio: 16 / 9; border-radius: 14px; }
.ph--photo { aspect-ratio: 4 / 3; border-radius: 12px; }

@media (min-width: 640px) {
  .ph { border-radius: 20px; font-size: 15px; }
  .ph--video, .ph--photo { border-radius: 14px; font-size: 14px; }
}

/* Desktop: fixed heights from the approved design */
@media (min-width: 960px) {
  .ph--h520 { aspect-ratio: auto; height: 520px; }
  .ph--h460 { aspect-ratio: auto; height: 460px; }
  .ph--h380 { aspect-ratio: auto; height: 380px; }
}

/* ---------- Home: hero ---------- */

.hero {
  background: var(--navy);
  color: #ffffff;
  padding-block: 48px 56px;
}

.hero__copy { display: flex; flex-direction: column; gap: 20px; }
/* Phones and tablets: the photo slideshow leads, above "Welcome home" */
.hero .hero-slides { order: -1; }
@media (min-width: 960px) {
  .hero .hero-slides { order: 0; }
}

/* "A place of ___" stays on one line on every phone, so the layout never jumps */
.hero-rotate {
  font-size: min(40px, 10.5vw);
  white-space: nowrap;
}
.hero-rotate__cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--on-navy-eyebrow);
  animation: hero-blink 1s steps(1) infinite;
}
@keyframes hero-blink { 50% { opacity: 0; } }

@media (min-width: 640px) {
  .hero-rotate { font-size: 48px; }
}
@media (min-width: 960px) {
  .hero-rotate { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rotate__cursor { display: none; }
}

.hero blockquote {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #2D4C8F;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: #E8EEFA;
}
.hero cite {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-style: normal;
  color: var(--on-navy-eyebrow);
}

/* Banner slideshow: photos stack in one frame and cross-fade */
.hero-slides {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--navy-2);
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero__img.is-active { opacity: 1; }

.hero-slides__dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  display: flex;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(8, 16, 36, 0.45);
  transform: translateX(-50%);
}
/* 28px tap target around a small visible dot */
.hero-slides__dots button {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hero-slides__dots button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
  transition: width 0.2s, background-color 0.2s;
}
.hero-slides__dots button[aria-current="true"]::after { width: 20px; background: #ffffff; }

@media (min-width: 640px) {
  .hero { padding-block: 72px; }
  .hero-slides { border-radius: 20px; }
  .hero__copy { gap: 24px; }
  .hero blockquote { font-size: 20px; }
}

@media (min-width: 960px) {
  .hero { padding-block: 88px; }
  .hero-slides { aspect-ratio: auto; height: 520px; }
}

/* ---------- Content photos ---------- */

.section-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: var(--ph);
}

.section-img--square { aspect-ratio: 1 / 1; }
.section-img--portrait { aspect-ratio: 4 / 5; border-radius: 16px; }
/* Keep faces in frame when a photo is cropped */
.section-img--face { object-position: 60% 25%; }

@media (min-width: 640px) {
  .section-img { border-radius: 20px; }
  .section-img--portrait { border-radius: 16px; }
}

@media (min-width: 960px) {
  .section-img--h460 { aspect-ratio: auto; height: 460px; }
  .section-img--h380 { aspect-ratio: auto; height: 380px; }
}

/* ---------- Home: service-times strip ---------- */

.times { background: var(--soft); }

.times__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #DCE3F1;
  border-inline: 1px solid #DCE3F1;
}

.times__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 16px;
  background: var(--soft);
}
.times__day {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
}
.times__name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.times__when { font-size: 15px; color: var(--muted); }
.times__item a { font-size: 15px; font-weight: 500; }

@media (min-width: 640px) {
  .times__item { padding: 28px; }
  .times__day { font-size: 13px; }
  .times__name { font-size: 20px; }
  .times__when, .times__item a { font-size: 16px; }
}

@media (min-width: 960px) {
  .times__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Home: pastor profile ---------- */

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 12px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 42, 99, 0.06);
}
.photo-card .section-img { border-radius: 12px; }
.photo-card__caption { display: flex; flex-direction: column; gap: 2px; padding-inline: 6px; }
.photo-card__name { font-size: 18px; font-weight: 700; }
.photo-card__role { font-size: 15px; font-weight: 700; color: var(--red); }

@media (min-width: 640px) {
  .photo-card { padding: 16px 16px 20px; border-radius: 24px; }
  .photo-card .section-img { border-radius: 14px; }
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}
.profile-card__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-block: 1px solid var(--border);
  list-style: none;
}
.stats li { display: flex; flex-direction: column; gap: 2px; }
.stats strong {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.1;
  color: var(--red);
}
.stats span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.btn__note { margin-left: 6px; font-weight: 500; opacity: 0.85; }

@media (min-width: 640px) {
  .profile-card { padding: 24px; }
  .profile-card__title { font-size: 22px; }
  .stats strong { font-size: 30px; }
  .stats span { font-size: 12px; }
}

/* ---------- Section headings ---------- */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
  margin-bottom: 32px;
}
.section-head--wide { max-width: 720px; }

.section-head--row {
  max-width: none;
  gap: 20px;
  align-items: flex-start;
}
.section-head--row > .stack { max-width: 640px; }

@media (min-width: 640px) {
  .section-head--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
  }
}

@media (min-width: 960px) {
  .section-head { margin-bottom: 48px; }
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}
.card--lg { border-radius: 20px; }
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.card .card__meta { font-size: 15px; font-weight: 700; color: var(--ink); }

@media (min-width: 640px) {
  .card { padding: 32px; gap: 14px; }
  .card h3 { font-size: 21px; }
  .card--lg h3 { font-size: 22px; }
}

/* Clickable service box (home page): icon, text and chevron in one row */
.svc {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.svc:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 20px rgba(14, 42, 99, 0.08);
  color: var(--ink);
}
.svc__body { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.svc__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.svc__meta { font-size: 14px; font-weight: 700; color: var(--red); }
.svc__desc { font-size: 15px; line-height: 1.55; color: var(--muted); }
.svc__arrow { flex-shrink: 0; align-self: center; color: var(--blue); }

@media (min-width: 640px) {
  .svc { padding: 24px; gap: 16px; }
  .svc__title { font-size: 19px; }
}

/* Highlight the service a visitor jumped to from the home page */
.card:target,
.feature-card:target { box-shadow: 0 0 0 3px var(--red); }
.schedule__row:target { background: #FFF4F3; box-shadow: inset 4px 0 0 var(--red); }

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--blue);
}
.icon-tile--sm { width: 44px; height: 44px; }

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  border-radius: 20px;
}
.feature-card--blue { background: var(--blue); color: #ffffff; }
.feature-card--soft { background: var(--soft); }
.feature-card__quote { font-family: var(--serif); font-size: 24px; line-height: 1.35; }
.feature-card h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.feature-card--blue p { font-size: 16px; line-height: 1.65; color: #E3EBFB; }

@media (min-width: 640px) {
  .feature-card { padding: 40px; gap: 18px; }
  .feature-card__quote { font-size: 30px; }
  .feature-card h3 { font-size: 36px; }
  .feature-card--blue p { font-size: 17px; }
}

@media (min-width: 960px) {
  .feature-card--pad-lg { padding: 48px; }
  .feature-card--span { grid-row: span 4; }
}

/* ---------- Call-to-action banners ---------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 24px;
  border-radius: 20px;
}
.cta--red { background: var(--red); color: #ffffff; }
.cta--red p { color: #FFE9E7; }
.cta--soft { background: var(--soft); }
.cta--soft p { color: var(--text-2); }

.cta__copy { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.cta__title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.cta__copy p { font-size: 17px; line-height: 1.6; }
.cta .btn { width: 100%; padding-inline: 28px; }

@media (min-width: 640px) {
  .cta { padding: 48px; border-radius: 24px; }
  .cta__title { font-size: 32px; }
  .cta__copy p { font-size: 18px; }
  .cta .btn { width: auto; }
}

@media (min-width: 960px) {
  .cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 56px;
  }
  .cta__title { font-size: 36px; }
}

/* ---------- Inner-page banner ---------- */

.page-hero {
  background: var(--navy);
  color: #ffffff;
  padding-block: 48px;
}
.page-hero .container { display: flex; flex-direction: column; gap: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #4E6FB5;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
}
.chips a:hover { background: var(--navy-2); color: #ffffff; }

@media (min-width: 640px) {
  .page-hero { padding-block: 64px; }
  .chips { gap: 10px; padding-top: 12px; }
}

@media (min-width: 960px) {
  .page-hero { padding-block: 80px; }
}

/* ---------- About ---------- */

.num-list { display: flex; flex-direction: column; gap: 16px; padding: 0; list-style: none; }
.num-list li { display: flex; gap: 14px; font-size: 17px; line-height: 1.55; }
.num-list .num { min-width: 22px; font-weight: 700; color: var(--blue); }

@media (min-width: 640px) {
  .num-list li { font-size: 18px; }
}

.truths { padding: 0; list-style: none; }
.truth {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}
.truth__n {
  min-width: 30px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
}
.truth__t { font-size: 16px; line-height: 1.5; }

@media (min-width: 640px) {
  .truth { padding: 22px 24px; }
}

.verse {
  max-width: 720px;
  margin: 32px auto 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--navy);
}
.verse cite {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  color: var(--red);
}

@media (min-width: 640px) {
  .verse { font-size: 24px; margin-top: 48px; }
}

/* Organisation chart: a single vertical flow on phones; the three
   leadership teams sit side by side from 960px */
.org {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 960px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}
.org > li {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 28px;
}
.org > li:first-child { margin-top: 0; }
.org > li + li::before {
  content: "";
  position: absolute;
  top: -28px;
  left: calc(50% - 1px);
  width: 2px;
  height: 28px;
  background: #B9C5DF;
}

.org__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 440px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}
.org__node--lead { border-color: var(--navy); background: var(--navy); color: #ffffff; }
.org__node--pastor { border-color: var(--blue); background: var(--blue); color: #ffffff; }
.org__node--team { border-top-color: var(--red); }
.org__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.org__desc { font-size: 14px; line-height: 1.5; color: var(--muted); }

.org__branch {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  padding: 0;
  list-style: none;
}
.org__branch .org__node { max-width: none; height: 100%; }

@media (min-width: 960px) {
  .org__branch { max-width: none; grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.person { display: flex; flex-direction: column; gap: 16px; }
.person h3 { font-size: 21px; font-weight: 700; }
.person p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.role { font-size: 15px; font-weight: 700; color: var(--red); }

/* ---------- Services ---------- */

.times-list { display: flex; flex-direction: column; padding-top: 8px; }
.times-list > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 16px 0;
  border-top: 1px solid #3A66C0;
  font-size: 16px;
}
.times-list > div:last-child { border-bottom: 1px solid #3A66C0; }
.times-list dt { font-weight: 700; }

@media (min-width: 640px) {
  .times-list > div { font-size: 17px; }
}

.schedule {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
}
.schedule__row {
  display: grid;
  gap: 4px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.schedule__row:last-child { border-bottom: 0; }
.schedule__day {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
}
.schedule__name { font-size: 17px; font-weight: 700; }
.schedule__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-size: 15px;
  color: var(--muted);
}

@media (min-width: 640px) {
  .schedule__row { padding: 24px 28px; }
}

@media (min-width: 960px) {
  .schedule__row {
    grid-template-columns: 200px 1.4fr 1fr 1fr;
    align-items: center;
    gap: 16px;
    padding: 28px 32px;
  }
  .schedule__day { font-size: 24px; }
  .schedule__name { font-size: 18px; }
  .schedule__meta { display: contents; font-size: 16px; }
}

/* ---------- Ministries ---------- */

.m-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
}
.m-card .ph { height: 180px; border: 0; border-radius: 0; }
.m-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
  padding: 24px;
}
.m-card h2 { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.2; }
.m-card p { font-size: 16px; line-height: 1.65; color: var(--muted); }
.m-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

@media (min-width: 640px) {
  .m-card .ph { height: 200px; }
  .m-card__body { padding: 32px; }
  .m-card h2 { font-size: 28px; }
}

/* Compact ministry card: icon beside text keeps the list short on phones */
.ministry {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}
.ministry__body { display: flex; flex-direction: column; gap: 6px; }
.ministry h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.ministry p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.ministry .ministry__meta { font-size: 14px; font-weight: 700; color: var(--ink); }

@media (min-width: 640px) {
  .ministry { padding: 24px; }
}

/* ---------- Media ---------- */

.sermon-feature {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: var(--soft);
}
.sermon-feature__body { display: flex; flex-direction: column; gap: 12px; padding: 4px 8px 12px; }
.sermon-feature h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.sermon-feature .lead { font-size: 16px; line-height: 1.65; }

.video {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--navy);
}
.video { position: relative; overflow: hidden; }
.video img,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.play {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.play:hover { background: var(--red-dark); }

.more-videos__title { font-size: 20px; font-weight: 700; }

/* Instagram follow panel (Media page) */
.ig-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 24px;
  border: 1px solid #F3DDEB;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFF6EE 0%, #FDEDF5 50%, #F1ECFC 100%);
}
.ig-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF 80%, #515BD4);
  color: #ffffff;
}
.ig-panel__copy { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.ig-panel__copy p:last-child { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.ig-panel__handle {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ig-panel .btn { width: 100%; }

.btn--ig { background: linear-gradient(45deg, #C13584, #833AB4); color: #ffffff; }
.btn--ig:hover { background: linear-gradient(45deg, #A62C71, #6E2F99); color: #ffffff; }

@media (min-width: 640px) {
  .ig-panel { padding: 40px; border-radius: 24px; }
  .ig-panel__handle { font-size: 30px; }
  .ig-panel .btn { width: auto; }
}

@media (min-width: 960px) {
  .ig-panel { flex-direction: row; align-items: center; gap: 28px; padding: 48px; }
  .ig-panel__copy { flex: 1; max-width: none; }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.video-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--ph);
}
.video-card__title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.video-card__date { font-size: 14px; color: var(--muted); }
.video-card:hover .video-card__title { color: var(--blue); }

@media (min-width: 640px) {
  .sermon-feature { padding: 24px; border-radius: 24px; }
  .sermon-feature h3 { font-size: 34px; }
  .sermon-feature .lead { font-size: 17px; }
  .video { border-radius: 16px; }
  .play { width: 76px; height: 76px; }
}

@media (min-width: 960px) {
  .sermon-feature { grid-template-columns: 1fr 1fr; gap: 40px; padding: 32px; }
  .sermon-feature__body { gap: 14px; padding: 0; }
}

.sermon { display: flex; flex-direction: column; gap: 10px; }
.sermon h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.sermon p { font-size: 15px; color: var(--muted); }

@media (min-width: 640px) {
  .sermon { gap: 12px; }
  .sermon h3 { font-size: 20px; }
}

/* Phones: album filter scrolls sideways instead of wrapping */
.filters {
  display: flex;
  gap: 8px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }

.chip-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #C9D3E8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.chip-btn[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
}

@media (min-width: 640px) {
  .filters { flex-wrap: wrap; margin-inline: 0; padding: 0; overflow: visible; }
}

.event {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.event .btn { grid-column: 1 / -1; width: 100%; }
.event h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.event p { font-size: 15px; color: var(--muted); }

.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
}
.date-tile__d { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1; }
.date-tile__m {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

@media (min-width: 640px) {
  .event { grid-template-columns: auto 1fr auto; gap: 28px; padding: 28px; border-radius: 20px; }
  .event .btn { grid-column: auto; width: auto; }
  .event h3 { font-size: 22px; }
  .event p { font-size: 16px; }
  .date-tile { width: 96px; height: 96px; border-radius: 16px; }
  .date-tile__d { font-size: 34px; }
  .date-tile__m { font-size: 13px; }
}

/* Gallery tiles: uniform 4:3 crops; the full photo opens in the viewer */
.photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--ph);
  cursor: zoom-in;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.photo:hover img { transform: scale(1.04); }
.photo__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 42, 99, 0.82);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .photo { border-radius: 14px; }
  .photo__tag { font-size: 12px; }
}

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 16, 36, 0.96);
  color: #ffffff;
}
.lightbox::backdrop { background: rgba(8, 16, 36, 0.9); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 64px 12px 24px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__figure figcaption { max-width: 640px; font-size: 15px; text-align: center; color: #D6E0F5; }
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
/* Phones: arrows sit at the bottom corners (swipe also works) */
.lightbox__nav { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (min-width: 960px) {
  .lightbox__nav { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }
  .lightbox__figure { padding: 48px 96px; }
  .lightbox__figure img { max-height: calc(100dvh - 140px); }
}

/* ---------- Contact ---------- */

.info-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.info-card h3 { font-size: 18px; font-weight: 700; }
.info-card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.info-card a { font-size: 16px; overflow-wrap: anywhere; }
.info-card .muted { font-size: 15px; }

@media (min-width: 640px) {
  .info-card { padding: 24px; }
}

.map {
  display: block;
  flex-grow: 1;
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--ph);
}

@media (min-width: 640px) {
  .map { border-radius: 20px; }
}

@media (min-width: 960px) {
  .map { min-height: 420px; }
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.form-panel--navy { border-color: var(--navy); background: var(--navy); color: #ffffff; }
.form-panel h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1.2; }
.form-panel__intro { font-size: 16px; line-height: 1.6; color: var(--muted); }
.form-panel--navy .form-panel__intro { color: var(--on-navy); }

@media (min-width: 640px) {
  .form-panel { padding: 40px; border-radius: 24px; }
  .form-panel h2 { font-size: 34px; }
}

.forms { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) {
  .forms { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 700; }
.optional { font-weight: 400; color: #C3D3F3; }

/* 16px inputs stop iOS Safari zooming in on focus */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 14px 16px;
  border: 1px solid var(--input);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.field textarea { resize: vertical; }
.form-panel--navy .field input,
.form-panel--navy .field textarea { border-color: #6F8BC7; }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 15px;
  color: #E3EBFB;
  cursor: pointer;
}
.check input { flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--red); }

.form-note { margin-top: -6px; font-size: 14px; color: var(--muted); }
.form-panel--navy .form-note { color: #C3D3F3; }

.notice {
  padding: 20px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--navy);
  font-size: 16px;
  font-weight: 500;
}
.notice--dark { background: var(--navy-2); color: #ffffff; }

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

.site-footer { background: var(--footer); color: var(--on-navy); }

.site-footer__grid {
  display: grid;
  gap: 36px;
  padding-block: 56px 40px;
}

.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-col h2 {
  margin-bottom: 6px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
}
.footer-col p { line-height: 1.6; }
.footer-col a {
  align-self: flex-start;
  padding-block: 4px;
  color: var(--on-navy);
  text-decoration: none;
}
.footer-col a:hover { color: #ffffff; text-decoration: underline; }

/* Social icons: round 44px buttons (comfortable tap size) */
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.social .social__link,
.footer-col .social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #2A4686;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.social .social__link:hover,
.footer-col .social__link:hover { background: #ffffff; color: var(--navy); text-decoration: none; }

.social--light .social__link { border-color: var(--border); background: var(--tint); color: var(--blue); }
.social--light .social__link:hover { background: var(--blue); color: #ffffff; }

/* WhatsApp quick-chat button, fixed bottom-right on every page */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  font-weight: 700;
}
.wa-float:hover { background: #1EBE5A; color: #ffffff; }
.wa-float__label { display: none; }

@media (min-width: 960px) {
  .wa-float { right: 24px; bottom: 24px; width: auto; padding: 0 22px 0 16px; }
  .wa-float__label { display: inline; }
}

.footer-logo {
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
}
.footer-logo img { width: 100%; height: 100%; }

.site-footer__bottom { border-top: 1px solid #1E3A78; }
.site-footer__bottom .container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Extra bottom space so the floating WhatsApp button never covers this line */
  padding-block: 20px 96px;
  font-size: 14px;
  color: #A9B9DD;
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; padding-top: 64px; }
  .footer-logo { width: 112px; height: 112px; }
  .site-footer__bottom .container { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
}

@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: repeat(4, 1fr); }
}
