/*
Theme Name: Chelan Berean Baptist
Theme URI: https://chelanbereanbaptist.com
Author: Manson Bay Digital
Author URI: https://mansonbaydigital.com
Description: Custom theme for Berean Baptist Church, Chelan, WA. Built from the v1 "Classic Reverent" mockup.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: chelan-berean
*/

:root {
  /* Global colors */
  --navy: #1b2a41;        /* Primary */
  --navy-deep: #12203a;   /* Footer / dark sections */
  --cream: #f7f3ec;       /* Light section background */
  --paper: #ffffff;
  --gold: #b8963e;        /* Accent */
  --gold-soft: #d7bf7a;
  --ink: #23272e;         /* Body text */
  --ink-soft: #5b6270;    /* Muted text */
  --line: #e6dfd2;

  /* Typography */
  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1180px;          /* Content width */
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* ---- Layout primitives -------------------------- */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #e9edf3; }
.section--navy h2, .section--navy h3 { color: #fff; }
.row {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: var(--cols, repeat(2, 1fr)); }  /* --cols set inline for custom ratios; mobile rule below overrides */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.narrow { max-width: 760px; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.rule {
  width: 56px; height: 2px; background: var(--gold);
  margin: 14px 0 22px;
}
.center .rule { margin-inline: auto; }

/* ---- Buttons ----------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all .2s ease;
}
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #a3842f; border-color: #a3842f; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn + .btn { margin-left: 12px; }

/* ---- Header --------------------- */
.topbar {
  background: var(--navy-deep);
  color: #cfd6e2;
  font-size: .85rem;
}
.topbar .row {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 38px; gap: 16px;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar span + span { margin-left: 22px; }

.header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header .row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.brand strong {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 700; color: var(--navy);
  line-height: 1;
}
.brand small {
  display: block; font-family: var(--font-body);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 4px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; color: var(--navy);
  font-weight: 500; font-size: .95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { border-color: var(--gold); }
.nav .btn { padding: 11px 22px; border-bottom: 2px solid var(--gold); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.8rem; color: var(--navy); }

/* ---- Hero ----------------------------------- */
.hero {
  position: relative; min-height: 88vh;
  display: grid; place-items: center; text-align: center;
  color: #fff;
  background: url("assets/img/mountains-valley.jpg") center/cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,32,58,.55) 0%, rgba(18,32,58,.75) 100%);
}
.hero .row { position: relative; padding: 120px 0; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero p { font-size: 1.25rem; max-width: 640px; margin: 0 auto 34px; color: #e9edf3; }

/* ---- Service-times strip ------------------- */
.times {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  margin-top: -64px; position: relative; z-index: 2;
}
.times .row {
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(18,32,58,.14);
  border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  overflow: hidden;
}
.time {
  padding: 28px 22px; text-align: center;
  border-right: 1px solid var(--line);
}
.time:last-child { border-right: 0; }
.time .day {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.time .when { font-family: var(--font-head); font-size: 2rem; color: var(--navy); line-height: 1.1; margin: 6px 0 4px; }
.time .what { font-size: .9rem; color: var(--ink-soft); }

/* ---- Welcome ------------------------- */
.welcome-img {
  border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: 0 20px 50px rgba(18,32,58,.18);
}
.welcome-img img { height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.welcome-img::after {
  content: ""; position: absolute; inset: 18px;
  border: 1px solid rgba(255,255,255,.55); border-radius: 4px; pointer-events: none;
}
blockquote.verse {
  margin: 28px 0 0; padding: 22px 26px;
  border-left: 3px solid var(--gold);
  background: var(--cream);
  font-family: var(--font-head); font-size: 1.3rem; line-height: 1.45; color: var(--navy);
}
blockquote.verse cite { display: block; font-family: var(--font-body); font-style: normal; font-size: .85rem; color: var(--ink-soft); margin-top: 8px; letter-spacing: .08em; }

/* ---- Cards ----------------------------- */
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(18,32,58,.12); }
.card img { aspect-ratio: 3/2; object-fit: cover; }
.card .body { padding: 26px 26px 28px; flex: 1; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card .more { text-decoration: none; font-weight: 600; color: var(--gold); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }

/* ---- Feature band --------------------- */
.band {
  position: relative; color: #fff; text-align: center;
  background: url("assets/img/open-bible.jpg") center/cover fixed no-repeat;
}
.band::before { content: ""; position: absolute; inset: 0; background: rgba(18,32,58,.78); }
.band .row { position: relative; padding: 110px 0; }
.band h2 { color: #fff; }
.band p { max-width: 680px; margin: 0 auto 30px; font-size: 1.15rem; color: #e9edf3; }

/* ---- Map / visit block ---------------------------------------------- */
.visit { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.visit .info { padding: 48px; background: var(--paper); }
.visit .map { min-height: 380px; background: #dfe4ea; }
.visit .map iframe { width: 100%; height: 100%; border: 0; min-height: 380px; }
.addr { font-size: 1.1rem; line-height: 1.5; }
.addr strong { display: block; color: var(--navy); }

/* ---- Footer --------------------- */
.footer { background: var(--navy-deep); color: #b9c2d0; font-size: .95rem; }
.footer .row { padding: 64px 0 40px; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.footer a { color: #e9edf3; text-decoration: none; }
.footer a:hover { color: var(--gold-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer .brand strong { color: #fff; }
.footer .brand small { color: #9aa5b8; }
.footer .about { margin-top: 16px; }
.footer .bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0; font-size: .82rem; color: #8c97ab;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---- Inner page header --------------- */
.page-hero {
  position: relative; color: #fff; text-align: center;
  background: var(--navy) url("assets/img/mountains-sunrise.jpg") center/cover no-repeat;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(18,32,58,.7); }
.page-hero .row { position: relative; padding: 96px 0 84px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: #d7dde8; font-size: 1.15rem; max-width: 640px; margin: 14px auto 0; }

/* ---- Belief list ---------- */
.beliefs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
.belief { padding: 26px 0; border-top: 1px solid var(--line); }
.belief h3 { font-size: 1.35rem; margin-bottom: 6px; }
.belief p { color: var(--ink-soft); font-size: .98rem; margin: 0 0 6px; }
.belief .ref { font-size: .82rem; letter-spacing: .06em; color: var(--gold); font-weight: 600; }

/* ---- Alternating rows (ministries) ---------------------------------- */
.alt { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.alt:last-child { border-bottom: 0; }
.alt img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; box-shadow: 0 16px 40px rgba(18,32,58,.14); }
.alt:nth-child(even) img { order: 2; }
.alt .meta { font-size: .9rem; color: var(--ink-soft); margin-top: 10px; }

/* ---- Steps (salvation page) ----------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 26px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--gold);
  line-height: 1;
}
.step h3 { margin-bottom: 6px; }
.step .verse-inline { font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); margin: 8px 0 4px; }
.step .ref { font-size: .82rem; letter-spacing: .06em; color: var(--gold); font-weight: 600; }

/* ---- Forms (Contact Form module / GiveWP) --------------------------- */
.form { display: grid; gap: 18px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 1rem;
  border: 1px solid #d5cdbd; border-radius: var(--radius); background: #fff;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.amounts button { padding: 14px; border: 1px solid #d5cdbd; background: #fff; border-radius: var(--radius); font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; }
.amounts button.on, .amounts button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.freq { display: flex; gap: 10px; }
.freq label { flex: 1; text-align: center; padding: 12px; border: 1px solid #d5cdbd; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.freq input { display: none; }
.freq input:checked + span { color: var(--gold); }
.notice { font-size: .85rem; color: var(--ink-soft); background: var(--cream); padding: 14px 16px; border-radius: var(--radius); border-left: 3px solid var(--gold); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }

/* ---- Schedule table ------------------------------------------------- */
table.sched { width: 100%; border-collapse: collapse; }
table.sched th, table.sched td { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--line); }
table.sched th { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
table.sched td:first-child { font-family: var(--font-head); font-size: 1.3rem; color: var(--navy); }
table.sched td.t { font-weight: 600; white-space: nowrap; }


/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .times .row { grid-template-columns: repeat(3, 1fr); }
  .time:nth-child(3) { border-right: 0; }
  .time:nth-child(n+4) { border-top: 1px solid var(--line); }
  .visit { grid-template-columns: 1fr; }
  .beliefs { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { display: none; }
  .nav { display: none; position: absolute; top: 84px; left: 0; right: 0; flex-direction: column; background: var(--paper); padding: 16px 20px 24px; border-bottom: 1px solid var(--line); gap: 14px; align-items: flex-start; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { min-height: 70vh; }
  .hero .row { padding: 80px 0; }
  .btn + .btn { margin-left: 0; margin-top: 12px; }
  .hero .btn, .band .btn { display: block; max-width: 280px; margin-inline: auto; }
  .times { margin-top: 0; }
  .times .row { grid-template-columns: 1fr 1fr; width: 100%; border-radius: 0; box-shadow: none; }
  .time:nth-child(3) { border-right: 1px solid var(--line); }
  .time:nth-child(even) { border-right: 0; }
  .time:nth-child(n+3) { border-top: 1px solid var(--line); }
  .alt { grid-template-columns: 1fr; gap: 24px; }
  .alt:nth-child(even) img { order: 0; }
  .form .two { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .visit .info, .panel { padding: 28px 22px; }
  .step { grid-template-columns: 44px 1fr; padding: 20px; gap: 14px; }
}

/* ---- WordPress additions ------------------------------------------- */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-toggle[aria-expanded="true"] { color: var(--gold); }
.form .honey { position: absolute; left: -9999px; }
.form-msg { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .95rem; }
.form-msg--ok { background: #eef6ee; border-left: 3px solid #4f8a4f; color: #2d5a2d; }
.form-msg--err { background: #fbeeee; border-left: 3px solid #b04a4a; color: #7a2e2e; }
.form .btn { border: 0; cursor: pointer; justify-self: start; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); }
.alignwide, .alignfull { max-width: 100%; }
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } .admin-bar .nav { top: 130px; } }
/* WordPress adds width/height attributes; keep the mockup's fluid sizing. */
.card img, .alt img, .welcome-img img { width: 100%; height: auto; }
.welcome-img img { height: 100%; }
