/* 波士頓生命河靈糧堂 — style.css
   Colors come from the church banner: deep sea blue and a gold cross. */

:root {
  --navy: #0b2a47;
  --blue: #14507e;
  --sea: #2b86b5;
  --mist: #e9f1f7;
  --gold: #d4a437;
  --gold-dark: #a97f1c;
  --cream: #fbf8f2;
  --paper: #ffffff;
  --ink: #1c2631;
  --muted: #566372;
  --line: #e5dece;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 42, 71, 0.08);
  --maxw: 1080px;
  --font-sans: "Segoe UI", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; }
body { font-variant-numeric: lining-nums; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 32px, 760px); }
.center { text-align: center; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.logo { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-head); font-size: 0.98rem; font-weight: 700; }
.brand-text small { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted); }

.nav ul { display: none; list-style: none; margin: 0; padding: 0; }
.nav ul.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream); border-bottom: 1px solid var(--line);
  padding: 8px 16px 16px; box-shadow: var(--shadow);
}
.nav li a { display: block; padding: 10px 4px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav li a:hover { color: var(--blue); }
.menu-btn {
  font: inherit; font-weight: 600; cursor: pointer; color: var(--navy);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.lang button {
  font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  border: 0; background: transparent; color: var(--muted); padding: 6px 12px; min-width: 44px;
}
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.nav li a, .lang button, .menu-btn { white-space: nowrap; }
.site-header .wrap { width: min(100% - 32px, 1240px); }
.brand-text { max-width: 230px; }

@media (min-width: 1240px) {
  .menu-btn { display: none; }
  .nav ul { display: flex; gap: 2px; }
  .nav li a { padding: 8px 9px; font-size: 0.95rem; border-radius: 8px; }
  .nav li a:hover { background: var(--mist); }
}

/* Hero */
.hero {
  color: #fff;
  text-align: center;
  padding: clamp(56px, 12vw, 128px) 0 clamp(48px, 9vw, 104px);
  background:
    linear-gradient(180deg, rgba(8, 30, 52, 0.50), rgba(8, 30, 52, 0.78)),
    url("images/hero.jpg") center / cover no-repeat,
    linear-gradient(160deg, #0b2a47 0%, #14507e 55%, #2b86b5 100%);
}
.hero-logo {
  width: clamp(88px, 16vw, 116px); height: auto; margin: 0 auto 14px; display: block;
  background: #fff; border-radius: 50%; padding: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.kicker { margin: 0; letter-spacing: 0.1em; text-transform: uppercase; font-size: 1rem; font-weight: 600; opacity: 0.92; }
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5.4vw, 3.2rem);
  line-height: 1.3; margin: 10px auto 8px; max-width: 18em; font-weight: 800;
}
.hero-sub { font-size: clamp(1.05rem, 2.6vw, 1.3rem); margin: 0 0 28px; opacity: 0.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 560px) {
  .hero-actions .btn { width: min(100%, 320px); text-align: center; }
}

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #261a00; }
.btn-gold:hover { background: #e2b64d; color: #261a00; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--blue); color: #fff; }

/* Live strip */
.live-strip { background: var(--mist); border-block: 1px solid #d3e2ee; }
.live-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.live-inner h2 { margin: 0 0 4px; font-size: 1.2rem; color: var(--navy); }
.live-inner p { margin: 0; max-width: 56ch; color: var(--muted); }

/* Sections */
.section { padding: clamp(44px, 8vw, 88px) 0; }
.section.alt { background: #f3eee3; }
.section-title {
  font-family: var(--font-head); color: var(--navy);
  font-size: clamp(1.5rem, 4.4vw, 2.1rem); line-height: 1.35;
  margin: 0 0 24px; position: relative; padding-bottom: 14px;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px;
  border-radius: 2px; background: var(--gold);
}
.section-sub { margin: -8px 0 28px; color: var(--muted); font-size: 1.08rem; }
.sub-title { font-family: var(--font-head); color: var(--navy); margin: 40px 0 16px; font-size: 1.25rem; }
.lead { font-size: 1.1rem; }
.prose p { margin: 0 0 1.1em; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--navy); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* This week */
.week dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 16px; }
.week dt { color: var(--muted); font-weight: 600; }
.week dd { margin: 0; }
.week h3 { margin-top: 20px; }
.week ul { margin: 0; padding-left: 1.2em; }
.week li { margin: 4px 0; }
.updated { margin: 18px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Times */
.times-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.time-card .time { font-family: var(--font-head); font-size: 1.5rem; color: var(--blue); font-weight: 700; margin: 0; }
.time-card .note { margin: 4px 0 0; color: var(--muted); }

/* Vision */
.vision-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.vision-card { margin: 0; padding: 0; overflow: hidden; }
.vision-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--mist); }
.vision-card figcaption { padding: 12px 16px 14px; text-align: center; font-family: var(--font-head); font-weight: 700; color: var(--navy); }

/* Events */
.event { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.event img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: var(--mist); }
.event-body { padding: 16px 20px 20px; }
.event .date { margin: 0 0 4px; font-size: 0.9rem; font-weight: 700; color: var(--gold-dark); }
.event h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 1.1rem; line-height: 1.5; }
.event p { margin: 0 0 8px; color: var(--muted); }
.event .meta { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.event-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.event.past { opacity: 0.92; }

/* Video */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-frame iframe, .video-frame .video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { cursor: pointer; padding: 0; border: 0; background: #0b2a47 center / cover no-repeat; }
.play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  background: rgba(11, 42, 71, 0.85); border-radius: 50%;
}
.play::after {
  content: ""; position: absolute; left: 26px; top: 19px;
  border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent;
}
.video:hover .play { background: var(--gold); }
.video-card figcaption { margin-top: 8px; font-weight: 600; }
.video-card { margin: 0; }
#videos-featured-wrap, #videos-highlights-wrap { margin-bottom: 48px; }

/* Giving */
.give { background: linear-gradient(180deg, var(--cream), #f6efe0); }
.verse { margin: 0 0 14px; padding: 4px 0 4px 18px; border-left: 4px solid var(--gold); }
.verse p { margin: 0; font-family: var(--font-head); }
.verse cite { display: block; margin-top: 2px; font-style: normal; font-size: 0.9rem; color: var(--muted); }
.give-grid { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.give-grid .card { display: flex; flex-direction: column; gap: 6px; }
.give-grid .note { font-size: 0.93rem; color: var(--muted); margin: 6px 0 0; }
.kv { margin: 0; }
.kv b { color: var(--navy); }
address { font-style: normal; }

/* Contact */
.contact-row { display: grid; grid-template-columns: 5.5em 1fr; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-of-type { border-bottom: 0; }
.contact-row dt { color: var(--muted); font-weight: 600; }
.contact-row dd { margin: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Upcoming events: large cards so the poster text is readable */
#events-upcoming { grid-template-columns: 1fr; }
@media (min-width: 800px) {
  #events-upcoming .event { flex-direction: row; align-items: stretch; }
  #events-upcoming .event img { width: 58%; flex: none; }
  #events-upcoming .event-body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
  #events-upcoming .event h3 { font-size: 1.4rem; }
  #events-upcoming .event .date { font-size: 1rem; }
}

/* Narrow phones: keep the language buttons inside the screen */
@media (max-width: 560px) {
  .bar { gap: 8px; }
  .lang, .nav { flex: none; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-text { max-width: none; min-width: 0; }
  .brand-text strong { font-size: 0.85rem; }
  .brand-text small { display: none; }
  .logo { width: 34px; height: 34px; }
  .menu-btn { padding: 6px 10px; font-size: 0.9rem; }
  .kicker { font-size: 0.85rem; letter-spacing: 0.06em; }
  .lang button { padding: 6px 9px; min-width: 38px; font-size: 0.85rem; }
}

/* Footer */
.site-footer { background: var(--navy); color: #cfdbe7; padding: 28px 0; text-align: center; font-size: 0.95rem; }
.site-footer p { margin: 0; }
.site-footer .bible-notice { margin-top: 10px; font-size: 0.8rem; opacity: 0.8; }
.noscript { padding: 20px; text-align: center; background: #fff3cd; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Past events: cards keep their own height */
#events-past { align-items: start; }

/* Statement of faith */
.faith-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.faith-item h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); }
.faith-item p { margin: 0 0 8px; line-height: 1.8; }
.faith-item .faith-lead { margin: 0 0 6px; font-weight: 700; font-size: 0.9rem; color: var(--gold-dark); }
.faith-item:first-child { grid-column: 1 / -1; }
.faith-source { margin: 20px 0 0; font-size: 0.95rem; }
