/* Mt Zion House of Prayer — site styles
   Page format is inspired by our mother church, Gospel Haven (photo hero, big tiles,
   photo + text rows, gray footer). The look is our own: brick red from our building,
   serif headings that match the MtZion logo.
   Colors live here at the top. Change a color once and it updates everywhere. */
:root {
  --red: #9c3f2b;          /* buttons and accents: brick red, from the church building */
  --red-dark: #7a2f1f;
  --text: #5c5c5c;            /* body text */
  --heading: #262626;
  --nav: #3a3a3b;
  --gray: #ebe8e4;         /* gray bands, footer (a touch warm) */
  --gray-light: #f4f2ef;
  --line: #d4d4d4;
  --white: #fff;
  --wrap: 1080px;
  --font: "Source Sans 3", Arial, sans-serif;
  --display: "Marcellus", Georgia, serif;   /* headings: echoes the logo lettering */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 500 17px/1.7 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { color: var(--heading); font-family: var(--display); font-weight: 400; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
strong { color: var(--heading); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--white); box-shadow: 0 1px 0 rgba(0,0,0,.08); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.logo img { height: 58px; width: auto; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--nav); text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); }
/* Beliefs dropdown */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-parent::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-sub { display: none; position: absolute; top: 100%; left: -16px; padding-top: 14px; z-index: 20; }
.nav-sub::before { content: ""; position: absolute; inset: 14px 0 0; background: var(--white); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.12); z-index: -1; }
.nav-sub a { display: block; white-space: nowrap; padding: 11px 18px; text-transform: none; font-size: 15px; letter-spacing: 0; }
.nav-sub a:first-child { padding-top: 14px; } .nav-sub a:last-child { padding-bottom: 14px; }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 30px; height: 3px; background: var(--nav); margin: 6px 0; border-radius: 2px; }

/* Photo hero */
.hero { position: relative; background: #555 url("../images/church.jpg") center 70% / cover no-repeat; color: var(--white); text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.hero .wrap { position: relative; padding-top: 170px; padding-bottom: 170px; }
.hero h1 { color: var(--white); margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hero p { color: #f2f2f2; font-size: 1.15rem; margin: .6em 0 0; }
.hero.small .wrap { padding-top: 90px; padding-bottom: 90px; }

/* Buttons */
.btn { display: inline-block; background: var(--red); color: var(--white); text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: .03em; padding: 10px 24px; border-radius: 3px; border: 0; cursor: pointer; font-family: var(--font); }
.btn:hover { background: var(--red-dark); color: var(--white); }
.btn.outline { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn.outline:hover { background: var(--red); color: var(--white); }

/* Sections */
section { padding: 64px 0; }
.intro { text-align: center; max-width: 760px; margin: 0 auto; }
.intro p { font-size: 1.1rem; }
.gray { background: var(--gray); }

/* Big rounded tiles (Listen / Bulletin / Visit) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--gray-light); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 14px; padding: 44px 20px; text-decoration: none; color: var(--heading); font-family: var(--display); font-size: 1.5rem; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); color: var(--red); }
.tile svg { width: 56px; height: 56px; color: var(--red); }

/* Photo + text rows */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.row img, .row .map { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.map { border: 0; display: block; }

/* Inner page content */
.content { max-width: 820px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.card { background: var(--gray-light); border-radius: 12px; padding: 26px; }
.card h3 { margin-bottom: .3em; }
.meta { color: #888; font-size: .92rem; }

/* Sermon + bulletin lists */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.filters input, .filters select { font: inherit; font-size: 1rem; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--heading); }
.filters input { flex: 1 1 240px; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sermon { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; }
.sermon h3 { font-size: 1.1rem; margin: 0; }
.sermon audio { grid-column: 1 / -1; width: 100%; height: 40px; margin-top: 8px; }
.play { font: 700 14px var(--font); text-transform: uppercase; background: transparent; color: var(--red); border: 2px solid var(--red); border-radius: 3px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.play:hover { background: var(--red); color: var(--white); }
.more { text-align: center; margin-top: 24px; }
.empty { color: #888; font-style: italic; padding: 20px 0; }

.year { margin-top: 36px; }
.year:first-child { margin-top: 0; }
.bulletins { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.bulletins a { display: block; background: var(--gray-light); border-radius: 4px; padding: 10px 14px; text-decoration: none; color: var(--heading); font-weight: 600; }
.bulletins a:hover { background: var(--red); color: var(--white); }

/* "Listen on" podcast links (shown once data/podcast.json has the addresses) */
.listen-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.listen-links .label { font-weight: 600; color: var(--heading); margin-right: 2px; }
.listen-links a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--heading); text-decoration: none; font-weight: 600; font-size: .95rem; }
.listen-links a:hover { border-color: var(--red); color: var(--red); }
.listen-links svg { width: 18px; height: 18px; flex: none; }
.hero-links { justify-content: center; margin-top: 18px; }
.hero-links .label { color: #fff; }
.hero-links a { background: rgba(255,255,255,.95); }

/* Long documents: Statement of Faith, Constitution */
.doc { max-width: 780px; }
.doc .lead { font-size: 1.1rem; color: var(--heading); }
.doc h2 { margin-top: 1.6em; }
.doc h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin-bottom: .5em; }
.faith { list-style: none; counter-reset: faith; padding-left: 0 !important; }
.faith > li { counter-increment: faith; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); margin: 0; }
.faith > li::before { content: counter(faith); position: absolute; left: 0; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--gray-light); color: var(--red); font-family: var(--display); font-size: 1.15rem; display: grid; place-items: center; }
.faith p { margin: 0; }
.faith .refs { margin-top: 4px; font-size: .9rem; color: #888; font-style: italic; }
.toc { background: var(--gray-light); border-radius: 12px; padding: 22px 26px; margin-bottom: 12px; }
.toc h2 { margin: 0 0 .4em; font-size: 1.3rem; }
.toc ol { margin: 0 0 .6em; columns: 2; column-gap: 28px; }
.toc a { text-decoration: none; }
.article { padding: 0; scroll-margin-top: 100px; }
.doc-next { margin-top: 36px; padding: 24px 26px; background: var(--gray-light); border-radius: 12px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* Bulletin (order of service) */
.bulletin { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 14px; padding: 28px 32px; max-width: 680px; }
.bulletin header { margin-bottom: 10px; }
.bulletin .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--red); margin: 0; }
.bulletin h2 { margin: .1em 0 .3em; }
.bulletin h3 { font-size: 1.15rem; margin: 22px 0 6px; }
.bulletin h3 span { font-family: var(--font); font-size: .9rem; color: #888; margin-left: 6px; }
.bulletin dl { margin: 0; }
.bl-row { display: grid; grid-template-columns: 210px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gray-light); }
.bl-row dt { color: #888; font-weight: 600; font-size: .95rem; }
.bl-row dd { margin: 0; color: var(--heading); font-weight: 600; }
.bl-solo { grid-template-columns: 1fr; }
.bl-next { margin-top: 26px; padding: 18px 22px; background: var(--gray-light); border-radius: 10px; }
.bl-next h3 { margin-top: 0; }
.bl-next .bl-row { border-color: var(--line); }
.bl-sub { margin: 12px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: #888; }
.bl-past-h { margin-top: 44px; font-size: 1.4rem; }
.bl-past { border-bottom: 1px solid var(--line); max-width: 680px; }
.bl-past summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--heading); }
.bl-past .bulletin { margin-bottom: 18px; }
@media (max-width: 600px) { .bulletin { padding: 22px 18px; } .bl-row { grid-template-columns: 1fr; gap: 2px; } }

/* Footer */
.site-footer { background: var(--gray); padding: 56px 0 24px; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.site-footer h4 { font-size: 1.15rem; margin-bottom: .5em; }
.site-footer .fine { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; font-size: .85rem; color: #888; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 72px; }
  .logo img { height: 46px; }
  .menu-btn { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; gap: 0; box-shadow: 0 8px 16px rgba(0,0,0,.08); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 20px; border-top: 1px solid var(--gray-light); }
  .nav-group { display: block; }
  .nav-parent::after { display: none; }
  .nav-sub { display: block; position: static; padding: 0; }
  .nav-sub::before { display: none; }
  .nav-sub a, .nav-sub a:first-child, .nav-sub a:last-child { padding: 12px 20px 12px 40px; font-weight: 600; text-transform: none; color: #666; }
  .hero .wrap { padding-top: 100px; padding-bottom: 100px; }
  .hero.small .wrap { padding-top: 60px; padding-bottom: 60px; }
  section { padding: 44px 0; }
  /* On phones the tiles become full-width bars, like Gospel Haven's mobile site */
  .tiles { grid-template-columns: 1fr; gap: 0; }
  .wrap.tiles { padding: 0; max-width: none; }   /* full-width bars without spilling past the screen */
  .tile { flex-direction: row; justify-content: flex-start; gap: 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 32px; font-size: 1.5rem; }
  .tile:first-child { border-top: 1px solid var(--line); }
  .tile svg { width: 40px; height: 40px; }
  .row { grid-template-columns: 1fr; gap: 24px; }
  .row.flip > :first-child { order: 2; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 20px; }
  .sermon { grid-template-columns: 1fr; }
  .play { justify-self: start; }
}
