/* ==========================================================================
   Freie Bibelgemeinde Delmenhorst – Stylesheet
   ========================================================================== */

/* Schriften lokal gehostet (DSGVO: keine Verbindung zu Google Fonts) */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/lato-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-700-normal.woff2") format("woff2");
}

:root {
  --primary: #047aed;          /* Markenblau (Flächen, Icons) */
  --primary-strong: #0560bd;   /* Blau für Text/Buttons auf Weiß (Kontrast ≥ 4.5:1) */
  --primary-soft: #e8f2fd;
  --dark: #002240;
  --dark-overlay: rgba(0, 34, 64, 0.78);
  --light: #f4f6f9;
  --text: #1f2933;
  --muted: #52606d;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(0, 34, 64, 0.1);
  --max: 1100px;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1,
h2 {
  font-weight: 300;
}

h1,
h2,
h3,
summary {
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

p {
  margin: 0 0 1em;
}

p,
dd,
li {
  text-wrap: pretty;
}

/* Silbentrennung für lange deutsche Wörter auf schmalen Bildschirmen */
@media (max-width: 800px) {
  p,
  dd {
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
  }
}

a {
  color: var(--primary-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--dark);
}

:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  background: var(--white);
  color: var(--dark);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
}

.skip-link:focus {
  top: 8px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 300;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.55rem);
  line-height: 1.2;
}

.brand:hover {
  color: var(--white);
}

.brand img {
  width: 32px;
  height: 32px;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.main-nav a[aria-current="page"] {
  background: var(--primary);
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }
  .site-header .container {
    flex-direction: column;
    padding-block: 12px;
  }
  .main-nav a {
    padding: 8px 12px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary-strong);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-outline-light {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--dark);
}

.btn-light {
  background: var(--white);
  color: var(--dark);
}

.btn-light:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero (Startseite) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  background: #5d95c4;
}

.hero picture,
.hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero picture img {
  object-fit: cover;
  object-position: 30% center;
}

.hero .container {
  display: flex;
  justify-content: flex-end;
  padding-block: 48px;
}

.hero-panel {
  max-width: 520px;
  background: var(--dark-overlay);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}

.hero-panel p {
  font-size: 1.15rem;
}

@media (max-width: 640px) {
  .event {
    padding: 22px 16px;
  }
  .hero {
    /* sichtbare Höhe abzüglich Kopfzeile (ca. 108px), Kasten mittig */
    min-height: calc(100vh - 108px);
    min-height: calc(100svh - 108px);
  }
  .hero .container {
    justify-content: center;
    padding-block: 24px;
  }
  .hero-panel {
    text-align: center;
    padding: 24px 20px;
  }
  .hero-panel h1 {
    margin-bottom: 0.4em;
  }
  .hero-panel p {
    font-size: 1.05rem;
  }
  .hero .btn {
    width: 100%;
    padding-inline: 16px;
  }
  .hero .btn-row {
    justify-content: center;
  }
}

/* ---------- Sektionen ---------- */
.section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section-light {
  background: var(--light);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(28px, 4vw, 48px);
}

.section-head p {
  color: var(--muted);
}

/* ---------- Termine ---------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
  border-top: 4px solid var(--primary);
}

.event .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--dark);
}

.event h3 {
  margin-bottom: 8px;
}

.event p {
  margin: 0;
  color: var(--muted);
}

.event .time {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.event-featured {
  max-width: 420px;
  margin: 0 auto 40px;
  border-top-color: var(--dark);
  padding: 36px 24px;
}

.event-featured .icon {
  width: 64px;
  height: 64px;
}

.event-featured .time {
  font-size: 1.5rem;
}

.events-note {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
}

/* ---------- Besuchen / Karte ---------- */
.visit {
  background: var(--primary-strong);
  color: var(--white);
}

.visit a:not(.btn) {
  color: var(--white);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.visit address {
  font-style: normal;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .visit-grid {
    grid-template-columns: 1fr;
  }
}

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 34, 64, 0.88), rgba(0, 34, 64, 0.88)),
    repeating-linear-gradient(45deg, #0b3a66 0 12px, #0a3459 12px 24px);
  font-size: 0.95rem;
}

.map-consent .icon {
  width: 40px;
  height: 40px;
}

.map-consent p {
  max-width: 420px;
  margin: 0;
}

.map-consent label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.map-consent input {
  width: 18px;
  height: 18px;
}

/* ---------- Seitenkopf (Unterseiten) ---------- */
.page-head {
  background: var(--primary-strong);
  color: var(--white);
  padding-block: clamp(36px, 6vw, 72px);
}

.page-head .lead {
  font-size: 1.2rem;
  max-width: 720px;
  margin: 0;
  opacity: 0.95;
}

/* ---------- Unser Glaube ---------- */
.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.split picture {
  position: sticky;
  top: 96px;
  margin-top: 0.5em;
}

.split img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split picture {
    position: static;
    margin-top: 0;
  }
  .split img {
    max-width: 420px;
    margin-inline: auto;
  }
}

.name-list {
  margin: 0;
}

.name-list dt {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dark);
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  line-height: 1.3;
  margin-bottom: 0.35em;
}

.name-list dd {
  margin: 0 0 1.5em;
  padding-left: 16px;
  max-width: 62ch;
}

.name-list dd:last-child {
  margin-bottom: 0;
}

/* Akkordeon (native <details>, ohne JavaScript, tastaturbedienbar) */
.accordion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  align-items: start;
}

.accordion details {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  list-style: none;
}

/* Glaubensgrundlage: Begriffe in Großbuchstaben (nur Darstellung) */
.accordion-caps summary {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (max-width: 400px) {
  .accordion summary {
    font-size: 1rem;
    padding: 16px;
  }
  .accordion .content {
    padding: 0 16px 16px;
  }
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}

.accordion summary:hover {
  color: var(--primary-strong);
}

.accordion .content {
  padding: 0 20px 18px;
}

.accordion .content p:last-child {
  margin-bottom: 0;
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  border-top: 4px solid var(--primary);
}

.contact-card > .icon {
  width: 40px;
  height: 40px;
  color: var(--primary-strong);
  margin-bottom: 14px;
}

.contact-card p {
  color: var(--muted);
  flex: 1;
}

.contact-card .value {
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.contact-card .btn {
  align-self: flex-start;
  max-width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}

/* ---------- Rechtstexte ---------- */
.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 1.8em;
}

.prose h3 {
  margin-top: 1.4em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose address {
  font-style: normal;
  margin-bottom: 1em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #d9e2ec;
  padding-block: 48px 24px;
  font-size: 0.98rem;
}

.site-footer a {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.footer-title {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--white);
  margin: 0 0 8px;
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 32px;
}

.footer-contact a:hover {
  text-decoration: underline;
  color: var(--white);
}

.footer-contact .icon {
  width: 22px;
  height: 22px;
  color: #6cb4ff;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-bottom a {
  display: inline-block;
  padding: 6px 4px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 ---------- */
.notfound {
  text-align: center;
}

.notfound .btn-row {
  justify-content: center;
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Druck (z. B. Terminübersicht drucken) ---------- */
@media print {
  .site-header,
  .skip-link,
  .hero picture,
  .visit .map,
  .btn,
  .btn-row {
    display: none !important;
  }
  .hero,
  .page-head,
  .visit {
    background: none !important;
    color: #000 !important;
    min-height: 0;
  }
  .hero-panel {
    background: none;
    padding: 0;
  }
  .event,
  .contact-card,
  .accordion details {
    box-shadow: none;
    border: 1px solid #999;
    break-inside: avoid;
  }
  .accordion details:not([open]) .content {
    display: block;
  }
  .site-footer {
    background: none;
    color: #000;
  }
  .site-footer a {
    color: #000;
  }
}

/* Überschrift, die wie h3 aussieht (semantisch h2) */
.h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.02em;
}

/* FAQ: einspaltig, schmaler */
.accordion-single {
  grid-template-columns: 1fr;
  max-width: 820px;
  margin-inline: auto;
}

/* Kontakt-Überschriften in Großbuchstaben (nur Darstellung) */
.contact-card .h3 {
  text-transform: uppercase;
}

/* Hinweis unter einer Termin-Karte (z. B. gemeinsames Mittagessen) */
.event .event-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dde3ea;
  color: var(--text);
}

.event .event-note strong {
  display: block;
  color: var(--dark);
}
