/* Keystone Bible Chapel — site theme
   Palette sampled from images/kbcheader5.jpg:
   haze #bdcdf5 / #cdd7fa, Keystone script #2f6bd9,
   BIBLE CHAPEL navy #121c4d, verse #22335c, right steel #88a6be,
   glass gold #f7e952, glass red #dd2434.
   UX patterns follow USWDS. Do not reintroduce fall-harvest colors. */
:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --nav-bg: #e2ebf7;
  --text: #121c4d;
  --muted: #5a7390;
  --brand: #2f6bd9;
  --brand-hover: #1c4db8;
  --brand-soft: #8aa0d6;
  --haze: #c5d3f2;
  --gold: #e2d04a;
  --live: #c51e32;
  --live-hover: #9e1828;
  --footer: #121c4d;
  --footer-text: #dce6f5;
  --on-brand: #ffffff;
  --shadow: rgba(18, 28, 77, 0.14);
  --max-prose: 40rem;
  --max-wide: 70rem;
  --tap: 2.75rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --font: "Public Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Public Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
}

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

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

.site-header {
  background: var(--haze);
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--brand);
  color: var(--on-brand);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

.site-banner {
  display: block;
  background: var(--haze);
  line-height: 0;
}

.site-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--haze);
}

.nav-toggle {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  margin: 0;
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--haze);
}

.site-nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}

.site-nav-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 1rem 0.5rem;
}

.site-nav.is-open .site-nav-list {
  display: block;
}

.site-nav-list > li > a,
.site-nav-list > li > button {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  width: 100%;
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.site-nav-list > li > a:hover,
.site-nav-list > li > button:hover,
.site-nav-list a.is-current {
  color: var(--brand);
  background: var(--haze);
}

.has-sub > ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem 0.75rem;
  background: var(--surface);
}

.has-sub.is-open > ul {
  display: block;
}

.has-sub > ul a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.4rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.has-sub > ul a:hover {
  color: var(--brand);
}

.site-main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.prose {
  max-width: none;
}

.home-intro {
  margin-bottom: 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.page-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand);
  margin: 0 0 1rem;
}

.sunday-feature,
.conference-banner,
.live-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--haze);
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 1.25rem 0;
}

.sunday-feature {
  position: relative;
}

.sunday-feature img {
  display: block;
  width: 100%;
  height: 16rem;
  object-fit: cover;
}

.conference-banner img {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
}

.contact-photo {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
}

.conference-banner {
  position: relative;
}

.sunday-feature-body,
.conference-banner-body,
.live-card,
.contact-card {
  padding: 1rem 1.1rem 1.2rem;
  text-align: center;
}

.sunday-feature-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(18, 28, 77, 0.2), rgba(18, 28, 77, 0.62));
  color: var(--on-brand);
}

.sunday-feature-body h2,
.sunday-feature-body .speaker {
  color: var(--on-brand);
  text-shadow: 0 1px 2px rgba(18, 28, 77, 0.45);
}

.sunday-feature-body .btn-secondary {
  background: transparent;
  color: var(--on-brand);
  border-color: var(--on-brand);
}

.sunday-feature-body .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-brand);
  border-color: var(--on-brand);
}

.sunday-feature h2,
.conference-banner h2,
.live-card h1 {
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  color: var(--brand);
}

.speaker,
.muted {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.4rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: var(--on-brand);
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--brand-soft);
}

.btn-secondary:hover {
  background: var(--nav-bg);
  color: var(--brand-hover);
  border-color: var(--brand);
}

.btn-live {
  background: var(--live);
  color: var(--on-brand);
}

.btn-live:hover {
  background: var(--live-hover);
  color: var(--on-brand);
}

.schedule {
  display: grid;
  gap: 1.25rem;
  margin: 1rem 0 0;
  text-align: center;
}

.schedule h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--brand);
}

.schedule ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule li {
  margin: 0.2rem 0;
}

.note {
  font-style: italic;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.accommodations {
  text-align: center;
  margin: 1.5rem 0 0;
}

.accommodations p {
  margin: 0.35rem 0;
}

.accommodations .contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 2rem;
  align-items: start;
}

.accommodations .contact-card {
  min-width: 0;
}

@media (max-width: 700px) {
  .accommodations .contact-grid {
    grid-template-columns: 1fr;
  }
}

.map-embed {
  width: 100%;
  min-height: 16rem;
  border: 0;
  border-radius: 0.5rem;
}

.contact-layout {
  display: grid;
  gap: 1rem;
}

.site-footer {
  background: var(--footer);
  color: var(--footer-text);
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
    display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: var(--footer-text);
}

.verse {
  font-style: italic;
  font-size: 0.95rem;
  max-width: 40rem;
  margin: 0 auto 0.75rem;
}

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

  .site-nav-list {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 1rem;
  }

  .site-nav-list > li {
    position: relative;
  }

  .site-nav-list > li > a,
  .site-nav-list > li > button {
    width: auto;
    padding: 0.7rem 0.85rem;
  }

  .has-sub > ul {
    position: absolute;
    z-index: 20;
    min-width: 13rem;
    padding: 0.35rem 0;
    border: 1px solid var(--haze);
    box-shadow: 0 6px 16px var(--shadow);
  }

  .has-sub:hover > ul,
  .has-sub:focus-within > ul,
  .has-sub.is-open > ul {
    display: block;
  }

  .schedule {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .sunday-feature img {
    height: 18rem;
  }

  .conference-banner img {
    max-height: 8.5rem;
  }

  .conference-banner-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  }

  .filter-bar {
    flex-wrap: nowrap;
  }

  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  width: 100%;
  margin: 0 0 var(--space-3);
}

.filter-bar > div {
  flex: 1 1 14rem;
  min-width: 0;
}

.filter-bar label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.filter-bar input,
.filter-bar select {
  display: block;
  width: 100%;
  max-width: none;
  min-height: var(--tap);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--brand-soft);
  border-radius: 0.25rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 var(--space-3);
}

.year-nav a,
.year-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--haze);
  border-radius: 0.25rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.year-nav a.is-current,
.year-nav span.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.usa-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.usa-table th,
.usa-table td {
  text-align: left;
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid var(--haze);
  vertical-align: middle;
}

.usa-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.usa-table .actions {
  justify-content: flex-start;
}

.sermon-status {
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

details.usa-accordion {
  background: var(--surface);
  border: 1px solid var(--haze);
  border-radius: 0.35rem;
  margin: 0 0 var(--space-2);
  padding: 0.25rem 0.9rem 0.7rem;
}

details.usa-accordion > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  min-height: var(--tap);
  display: flex;
  align-items: center;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: var(--space-3) 0;
}

.photo-grid img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  border-radius: 0.25rem;
}

.link-grid {
  display: grid;
  gap: var(--space-3);
}

.link-grid h2 {
  font-size: 1rem;
  color: var(--brand);
  margin: 0 0 0.5rem;
}

.link-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-grid li {
  margin: 0.35rem 0;
}

.meeting-block {
  margin: 0 0 var(--space-3);
}

.meeting-block h2 {
  font-size: 1.05rem;
  color: var(--brand);
  margin: 0 0 0.35rem;
}

audio.sermon-audio {
  width: 100%;
  max-width: 22rem;
  margin-top: 0.35rem;
}
