@import url('predigt.css');

/* 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: clip; }
.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; }

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

/* ───── 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;
}
.gh-article-header:has(.page-title) {
  padding: 40px 0 8px;
}

.welcome h1,
.gh-content h1,
.site-content h1,
.page-title {
  font-size: 28px;
  font-weight: 300;
  color: var(--petrol-dark);
  letter-spacing: 0.04em;
  margin: 0;
  padding-top: 16px;
  padding-bottom: 8px;
  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 {
  text-transform: uppercase;
  font-weight: 400;
  display: block;
  margin-bottom: 15px;
  color: #d9b26a;
  font-size: 18px;
}
.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: 15px 10px 7px;
  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: 6px 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,
  .page-title { 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 .art-image { aspect-ratio: 4/5; }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    padding: 19px 22px 9px;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 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: 380px; }

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

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

  .article {
    grid-template-columns: 1fr 260px;
    padding: 36px 40px;
    gap: 36px;
  }
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    padding: 23px 38px 11px;
    gap: 40px;
  }

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

/* ───── Cookie-Banner ───── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg, #fff);
  border-top: 1px solid var(--border, #e5e1d8);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.cookie-banner-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #6b6b6b);
  flex: 1 1 260px;
  line-height: 1.45;
}

.cookie-banner-text a {
  color: var(--link, #8a6fb0);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-btn {
  flex-shrink: 0;
  border: 0;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--ocker, #c89a54);
  color: #fff;
  border-radius: 2px;
  transition: opacity .15s;
}

.cookie-banner-btn:hover { opacity: 0.88; }
.cookie-banner-btn:active { transform: translateY(1px); }

/* ───── 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;
  }
}

@supports selector(a:has(b)) {
  a[href*=".pdf"]:not(:has(img))::before {
    font: var(--fa-font-regular);
    content: "\f1c1";
    display: inline-block;
    margin-right: 0.4em;
    font-size: 1.1em;
    color: #B80000;
    vertical-align: middle;
    flex-shrink: 0;
  }
}

@media (min-width: 1201px) {
  .home-template .site-inner  { max-width: 1700px; }
  .home-template .site-canvas { max-width: 1400px; }
}

/* Bild-Ausrichtung & Textumfluss */
figure.img-wrap { display: block; margin: 0; padding: 0; }
figure.img-align-left   { margin-right: auto; }
figure.img-align-center { margin-left: auto; margin-right: auto; width: fit-content; }
figure.img-align-right  { margin-left: auto; }
figure.img-float-left  { float: left;  margin: 0.25em 1.5em 1em 0; }
figure.img-float-right { float: right; margin: 0.25em 0 1em 1.5em; }
@media (max-width: 600px) {
  figure.img-float-left,
  figure.img-float-right { float: none; margin-left: auto; margin-right: auto; }
}

ul li::marker {
  color: #DAA520;
  font-size: 0.75em;
}

/* ───── Markdown-Tabellen ───── */
.site-content table,
.gh-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93em;
  margin: 1.5em 0;
  overflow-x: auto;
  display: block;
}

.site-content thead,
.gh-content thead {
  background: var(--petrol-dark);
  color: #fff;
}

.site-content th,
.gh-content th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.site-content td,
.gh-content td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.site-content tbody tr:nth-child(even),
.gh-content tbody tr:nth-child(even) {
  background: var(--bg-muted);
}

.site-content tbody tr:hover,
.gh-content tbody tr:hover {
  background: var(--bg-card);
}

@media (max-width: 600px) {
  .site-content table,
  .gh-content table {
    font-size: 0.85em;
  }
  .site-content th,
  .gh-content th,
  .site-content td,
  .gh-content td {
    padding: 7px 10px;
  }
}

/* ───── Mehrspalten-Layout ───── */
.cols {
  display: grid;
  gap: 2rem;
  margin: 1.5em 0;
}
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.col > *:first-child { margin-top: 0; }
.col > *:last-child  { margin-bottom: 0; }

@media (max-width: 700px) {
  .cols-2,
  .cols-3 { grid-template-columns: 1fr; }
}

/* ───── Typografie-Abstände Inhaltsbereich ───── */
.site-content h2,
.gh-content h2 {
  text-transform: uppercase;
  font-weight: 400;
  display: block;
  margin-top: 32px;
  margin-bottom: 15px;
  color: #d9b26a;
  font-size: 18px;
}
.site-content h3,
.gh-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}
.site-content h4,
.gh-content h4 {
  margin-top: 18px;
  margin-bottom: 6px;
}
.site-content h5,
.gh-content h5 {
  margin-top: 14px;
  margin-bottom: 4px;
}
.site-content h6,
.gh-content h6 {
  margin-top: 12px;
  margin-bottom: 4px;
}
.site-content p,
.gh-content p {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.65;
  white-space: pre-line;
}