/* Prototyp — Variante A responsiv
   Mobile-first CSS; JSX liefert nur Struktur + Klassennamen,
   Farben/Spacing kommen aus Tokens hier. */

:root {
  --petrol-dark: #2a5568;
  --petrol-mid: #3d7a8f;
  --petrol-light: #7cb2c2;
  --nav-dark: #3a3f4a;
  --ocker: #c89a54;
  --ocker-dark: #a67b38;
  --link: #8a6fb0;
  --bg: #ffffff;
  --bg-muted: #f7f5f0;
  --bg-card: #fbfaf6;
  --border: #e5e1d8;
  --border-muted: #eeeae0;
  --text: #2a2a2a;
  --text-muted: #6b6b6b;
  --text-faded: #9a9a9a;
}

* { box-sizing: border-box; }
img, video, iframe { max-width: 100%; }

/* ───── Layout wrappers ───── */
.site-viewport { display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
.site-outer { padding: 0 max(4vmin, 20px); }
.site-outer .site-outer { padding: 0; }
.site-inner { margin: 0 auto; max-width: var(--container-width, 1400px); width: 100%; }
.site-canvas { max-width: var(--content-width, 1100px); width: 100%; margin: 0 auto; }
.site-main { flex-grow: 1; }
.site-article { width: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: Barlow, Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ───── Header ───── */
.site-header {
  width: 100%;
}
.brand-bar {
  background: linear-gradient(90deg, var(--petrol-light) 0%, var(--petrol-mid) 45%, var(--petrol-dark) 100%);
  padding: 14px 0;
}
.brand-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-bar .brand-text {
  color: #fff;
  line-height: 1.15;
  min-width: 0;
}
.brand-bar .brand-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.85;
  font-weight: 500;
}
.brand-bar .brand-name {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 500;
  word-break: break-word;
}
.brand-bar .brand-name .brand-places {
  opacity: 0.85;
  display: block;
}

/* Nav */
.site-nav {
  background: var(--nav-dark);
  border-bottom: 2px solid var(--ocker);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: #d8dce2;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 14px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .15s, background .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  flex-shrink: 0;
}
.site-nav a.active,
.site-nav a:hover {
  color: var(--ocker);
  border-bottom-color: var(--ocker);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  margin-left: auto;
  cursor: pointer;
  padding: 8px;
}

/* ───── Hero ───── */
.hero {
  position: relative;
  height: 240px;
  overflow: hidden;
}

/* ───── Sections ───── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.welcome {
  padding: 36px 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.welcome .kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ocker);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.welcome h1,
.gh-content h1,
.site-content h1 {
  font-size: 28px;
  font-weight: 300;
  color: var(--petrol-dark);
  letter-spacing: 0.04em;
  margin: 0;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  line-height: 1.2;
}

.stack {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ───── Gemeindehaus card ───── */
.gh-card {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}
.gh-card .gh-image {
  aspect-ratio: 1/1;
  max-width: 220px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  width: 100%;
}
.gh-card .gh-motto {
  font-family: Caveat, cursive;
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.gh-card .gh-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  line-height: 1.15;
}

/* Button primary */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn-ocker {
  background: var(--ocker);
  color: #fff;
}
.btn-white {
  background: #fff;
  color: var(--ocker-dark);
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ───── Spenden bar ───── */
.donate-bar {
  background: linear-gradient(90deg, var(--ocker-dark) 0%, var(--ocker) 100%);
  color: #fff;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.donate-bar .db-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.donate-bar .db-head-text .db-kicker {
  font-size: 10px;
  opacity: 0.9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.donate-bar .db-head-text .db-title {
  font-size: 15px;
  font-weight: 600;
}
.donate-bar .db-progress {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.donate-bar .db-progress-bar {
  height: 100%;
  background: #fff;
  transition: width .6s ease;
}
.donate-bar .db-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.95;
}
.donate-bar .db-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.donate-bar .db-helpers {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.donate-bar .db-helpers .n {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.donate-bar .db-helpers .lbl {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ───── Article ───── */
.article {
  border: 1px solid var(--border);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.article .art-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ocker);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.article h2 {
  font-size: 22px;
  font-weight: 500;
  color: var(--petrol-dark);
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.article .art-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.article p {
  margin: 0 0 12px;
  line-height: 1.65;
}
.article .art-image {
  aspect-ratio: 4/3;
  background: var(--bg-muted);
  border: 1px solid var(--border-muted);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.article .art-image-badge {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.link-cap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--petrol-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 1px solid var(--petrol-dark);
  padding-bottom: 3px;
}
.link-cap.muted {
  color: var(--ocker);
  border-bottom-color: transparent;
}

/* ───── Worship + Termine grid ───── */
.twocol {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.panel {
  border: 1px solid var(--border);
  padding: 22px;
}
.panel .panel-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ocker);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.worship-item {
  margin-bottom: 14px;
}
.worship-item .w-places {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.worship-item .w-time {
  font-size: 15px;
  font-weight: 600;
}
.panel .predigt {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-muted);
}
.panel .predigt a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.termin-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-muted);
}
.termin-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.termin-row .t-when {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.termin-row .t-when .t-time {
  font-size: 11px;
}
.termin-row .t-title {
  color: var(--link);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  line-height: 1.35;
}
.termin-row .t-ort {
  font-size: 12px;
  color: var(--text-muted);
}

/* ───── Footer ───── */
.footer {
  background: var(--nav-dark);
  color: #c8ccd4;
  font-size: 13px;
  line-height: 1.6;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.footer-brand .footer-brand-text {
  color: #fff;
  line-height: 1.15;
}
.footer-brand .fb-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.8;
  font-weight: 500;
}
.footer-brand .fb-name {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.footer p.desc {
  margin: 0;
  color: #9ea4ae;
  max-width: 320px;
}
.footer-col h4 {
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.footer-col .addr {
  color: #9ea4ae;
  margin-bottom: 10px;
}
.footer-col .tel {
  color: #d8dce2;
}
.footer-col a.email {
  color: var(--ocker);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
}
.footer-col .svc-link {
  display: block;
  color: #c8ccd4;
  text-decoration: none;
  padding: 3px 0;
}
.footer-col .svc-link:hover { color: #fff; }
.footer-col .nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col .nav li a {
  display: block;
  color: #c8ccd4;
  text-decoration: none;
  padding: 3px 0;
}
.footer-col .nav li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
  color: #7d838d;
}
.footer-bottom .links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom .links a {
  color: #9ea4ae;
  text-decoration: none;
}

/* ───── Tablet ───── */
@media (min-width: 640px) {
  .brand-bar { padding: 18px 0; }
  .brand-bar-inner { gap: 14px; }
  .brand-bar .brand-kicker { font-size: 14px; }
  .brand-bar .brand-name { font-size: 16px; letter-spacing: 0.14em; }
  .brand-bar .brand-name .brand-places { display: inline; }

  .site-nav { padding: 0 24px; }
  .site-nav a { font-size: 12px; padding: 16px 16px; }

  .hero { height: 320px; }

  .welcome { padding: 48px 32px 32px; }
  .welcome h1,
  .gh-content h1,
  .site-content h1 { font-size: 36px; }

  .stack { padding: 0 32px 64px; gap: 28px; }

  .gh-card {
    grid-template-columns: 240px 1fr;
    padding: 32px;
    gap: 36px;
    align-items: center;
  }
  .gh-card .gh-image { max-width: none; }
  .gh-card .gh-title { font-size: 34px; }

  .donate-bar {
    grid-template-columns: auto 1fr auto;
    padding: 20px 24px;
    gap: 24px;
    align-items: center;
  }
  .donate-bar .db-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .article {
    grid-template-columns: 1fr 240px;
    padding: 32px;
    gap: 32px;
  }
  .article h2 { font-size: 26px; }
  .article .art-image { aspect-ratio: 4/5; }

  .twocol {
    grid-template-columns: 1fr 1.3fr;
    gap: 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    padding: 48px 32px 28px;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
  }
}

/* ───── Desktop ───── */
@media (min-width: 960px) {
  .brand-bar { padding: 18px 0; }
  .site-nav { padding: 0 48px; overflow-x: visible; }
  .site-nav a { font-size: 12px; padding: 16px 18px; }

  .hero { height: 440px; }

  .welcome { padding: 64px 48px 40px; }
  .welcome h1,
  .site-content h1 { font-size: 44px; }

  .stack { padding: 0 48px 80px; gap: 32px; }

  .article {
    grid-template-columns: 1fr 260px;
    padding: 36px 40px;
    gap: 36px;
  }
  .article h2 { font-size: 28px; }

  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    padding: 56px 48px 32px;
    gap: 40px;
  }

  .footer-bottom {
    padding: 18px 48px;
  }
}

/* ───── Lightbox ───── */
.lb-trigger {
  cursor: zoom-in;
  display: inline-block;
}

.site-content .lb-trigger {
  display: block;
  margin: 16px 0;
}

.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}

.lb-overlay:target {
  display: flex;
  animation: lb-fadein 0.18s ease;
}

@keyframes lb-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: zoom-out;
}

.lb-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lb-box picture {
  display: flex;
}

.lb-box img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  transition: background 0.15s;
  line-height: 1;
  font-style: normal;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

.lb-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 32px;
}

.lb-prev { left: 16px; padding-right: 3px; }
.lb-next { right: 16px; padding-left: 3px; }

/* ───── Bildergalerie (Thumbnail-Raster) ───── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.gallery-grid .lb-trigger {
  display: block;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
}

.gallery-grid .lb-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: block;
}

.gallery-grid .lb-trigger:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 5px;
  }
}

a[href*=".pdf"]:not(:has(img)) {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4em;
  vertical-align: middle;
}

a[href*=".pdf"]:not(:has(img))::before {
  font: var(--fa-font-regular);
  content: "\f1c1";
  flex-shrink: 0;
  font-size: 1.6em;
  color: #B80000;
}

/* ───── Predigt audio card ───── */
.predigt-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  margin-bottom: 10px;
}
.predigt-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.predigt-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.predigt-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  line-height: 1.3;
}
.predigt-bible {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.predigt-info {
  font-size: 13px;
  color: var(--text);
}
.predigt-card audio {
  width: 100%;
  height: 36px;
}
@media (min-width: 601px) {
  .predigt-card audio {
    width: 520px;
  }
}
@media (min-width: 1201px) {
  .home-template .site-inner  { max-width: 1700px; }
  .home-template .site-canvas { max-width: 1400px; }
}

@media (max-width: 600px) {
  .predigt-card {
    grid-template-columns: 1fr;
  }
}