/* ==========================================================================
   Gemeinde Gottes Weil am Rhein – zentrales Stylesheet
   --------------------------------------------------------------------------
   Alle Farben, Schriftgrößen und Abstände sind unten als CSS-Variablen
   definiert. Änderungen am Farbschema bitte NUR dort vornehmen – sie wirken
   sich automatisch auf die ganze Website aus.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design-Variablen (zentrale Stellschrauben)
   -------------------------------------------------------------------------- */
:root {
  /* Farben – Farbwelt „Tiefblau klassisch": Marineblau mit Goldakzent */
  --farbe-primaer: #24406e;        /* Marineblau – Header, Links, Akzente */
  --farbe-primaer-dunkel: #16294a; /* dunklere Variante für Hover/Footer */
  --farbe-akzent: #c1972e;         /* warmes Gold – Hervorhebungen */
  --farbe-akzent-dunkel: #93711c;  /* dunklere Gold-Variante */
  --farbe-blau: #3c6db0;           /* helleres Blau – Buttons, Infobox-Streifen */
  --farbe-blau-dunkel: #2b5390;    /* Button-Hover */
  --farbe-text: #2b2b2b;           /* Fließtext (hoher Kontrast) */
  --farbe-text-hell: #f5f2ec;      /* Text auf dunklem Grund */
  --farbe-hintergrund: #ffffff;    /* Seitenhintergrund */
  --farbe-hintergrund-sanft: #f2f4f8; /* leicht getönte Flächen (Kacheln, Zeiten) */
  --farbe-rand: #d3dae5;           /* dezente Rahmen/Linien */
  --farbe-fehler: #a4282d;         /* Fehlermeldungen im Formular */
  --farbe-erfolg: #2e6b34;         /* Erfolgsmeldungen */

  /* Typografie: Systemschriften – keine externen Font-Server, kein Download */
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --schrift-serif: Georgia, "Times New Roman", serif; /* für Bibelverse */

  /* Layout */
  --inhalt-breite: 68rem;   /* maximale Inhaltsbreite */
  --abstand: 1.25rem;       /* Grundabstand */
}

/* --------------------------------------------------------------------------
   2. Grundlagen / Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;               /* etwas größer – gut lesbar, auch für ältere Besucher */
  line-height: 1.65;
  color: var(--farbe-text);
  background-color: var(--farbe-hintergrund);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--farbe-primaer-dunkel);
  margin: 0 0 0.75em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; margin-top: 2em; }
h3 { font-size: 1.2rem; margin-top: 1.5em; }

p { margin: 0 0 1em; }

a {
  color: var(--farbe-primaer);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--farbe-akzent-dunkel);
}

/* Deutlich sichtbarer Tastatur-Fokus (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--farbe-akzent);
  outline-offset: 2px;
}

/* Sprunglink „Zum Inhalt" – erscheint nur bei Tastaturbedienung */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--farbe-primaer-dunkel);
  color: var(--farbe-text-hell);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
  color: var(--farbe-text-hell);
}

/* --------------------------------------------------------------------------
   3. Wiederkehrende Bausteine
   -------------------------------------------------------------------------- */
.inhalt {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: 0 var(--abstand);
}

main {
  padding: 2rem 0 3.5rem;
}

.button {
  display: inline-block;
  background: var(--farbe-blau);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.button:hover,
.button:focus {
  background: var(--farbe-blau-dunkel);
  color: #ffffff;
}

.hinweis-box {
  background: var(--farbe-hintergrund-sanft);
  border-left: 4px solid var(--farbe-blau);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation (mobile-first, Hamburger-Menü)
   -------------------------------------------------------------------------- */
.seiten-header {
  background: var(--farbe-primaer);
  color: var(--farbe-text-hell);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.header-leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem var(--abstand);
  max-width: var(--inhalt-breite);
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--farbe-text-hell);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.logo-link img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.logo-link:hover,
.logo-link:focus {
  color: #ffffff;
}

/* Hamburger-Knopf – nur auf schmalen Bildschirmen sichtbar */
.menue-knopf {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  padding: 9px 8px;
  cursor: pointer;
}

.menue-knopf .balken {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--farbe-text-hell);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* X-Symbol, wenn das Menü offen ist */
.menue-knopf[aria-expanded="true"] .balken:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menue-knopf[aria-expanded="true"] .balken:nth-child(2) {
  opacity: 0;
}
.menue-knopf[aria-expanded="true"] .balken:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hauptnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hauptnav a {
  display: block;
  color: var(--farbe-text-hell);
  text-decoration: none;
  padding: 0.85rem var(--abstand);
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hauptnav a:hover,
.hauptnav a:focus {
  background: var(--farbe-primaer-dunkel);
  color: #ffffff;
}

/* Aktuelle Seite in der Navigation hervorheben */
.hauptnav a[aria-current="page"] {
  background: var(--farbe-primaer-dunkel);
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--farbe-akzent);
}

/* Mobil: Menü ist standardmäßig zugeklappt */
.hauptnav {
  display: none;
  width: 100%;
}

.hauptnav.offen {
  display: block;
}

/* Header bricht mobil in zwei Zeilen um (Leiste + aufgeklapptes Menü) */
.header-leiste {
  flex-wrap: wrap;
}

/* Ab Tablet-Breite: Menü immer sichtbar, horizontal, kein Hamburger */
@media (min-width: 800px) {
  .menue-knopf {
    display: none;
  }

  .hauptnav {
    display: block;
    width: auto;
  }

  .hauptnav ul {
    display: flex;
    gap: 0.25rem;
  }

  .hauptnav a {
    border-top: none;
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
  }

  .hauptnav a[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--farbe-akzent);
  }
}

/* --------------------------------------------------------------------------
   5. Hero-Bereich (Startseite)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  color: var(--farbe-text-hell);
  background: var(--farbe-primaer-dunkel);
  overflow: hidden;
}

.hero-bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45; /* Bild abgedunkelt, damit der Text gut lesbar bleibt */
}

.hero-inhalt {
  position: relative;
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: 4.5rem var(--abstand);
  text-align: center;
}

.hero-vers {
  font-family: var(--schrift-serif);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.5;
  max-width: 38rem;
  margin: 0 auto 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-vers-stelle {
  display: block;
  font-family: var(--schrift);
  font-style: normal;
  font-size: 1rem;
  margin-top: 0.75rem;
  opacity: 0.9;
}

@media (min-width: 800px) {
  .hero-inhalt { padding: 6.5rem var(--abstand); }
  .hero-vers { font-size: 1.75rem; }
}

/* --------------------------------------------------------------------------
   6. Gottesdienstzeiten-Kacheln
   -------------------------------------------------------------------------- */
.zeiten {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .zeiten { grid-template-columns: 1fr 1fr; }
}

.zeit-kachel {
  background: var(--farbe-hintergrund-sanft);
  border: 1px solid var(--farbe-rand);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  text-align: center;
}

.zeit-kachel h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.zeit-kachel .uhrzeit {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--farbe-primaer);
  display: block;
}

/* --------------------------------------------------------------------------
   7. Archiv (Predigten-Audio)
   -------------------------------------------------------------------------- */
.archiv-jahr {
  border: 1px solid var(--farbe-rand);
  border-radius: 8px;
  margin: 0 0 0.85rem;
  background: var(--farbe-hintergrund-sanft);
}

.archiv-jahr summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.9rem 1.25rem;
  color: var(--farbe-primaer-dunkel);
}

.archiv-jahr ul {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem 1rem;
}

.archiv-jahr li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--farbe-rand);
}

.archiv-titel {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

.archiv-jahr audio {
  width: 100%;
  max-width: 32rem;
}

.archiv-download {
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   8. Formulare (Anmeldung Jubiläum)
   -------------------------------------------------------------------------- */
.formular {
  max-width: 34rem;
}

.feld {
  margin-bottom: 1.15rem;
}

.feld label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.feld input[type="text"],
.feld input[type="email"],
.feld input[type="tel"],
.feld input[type="number"],
.feld select,
.feld textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #8a8a8a;
  border-radius: 6px;
  background: #ffffff;
  color: var(--farbe-text);
}

.feld-hinweis {
  font-size: 0.9rem;
  color: #555555;
  margin-top: 0.25rem;
}

.feld-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.feld-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.feld-checkbox label {
  font-weight: 400;
}

.pflicht {
  color: var(--farbe-fehler);
}

/* Honeypot-Feld: für Menschen unsichtbar, Bots füllen es trotzdem aus.
   Absichtlich NICHT display:none, da manche Bots das erkennen. */
.hp-feld {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.formular-fehler {
  background: #f9e8e8;
  border-left: 4px solid var(--farbe-fehler);
  color: #6e1b1f;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.seiten-footer {
  background: var(--farbe-primaer-dunkel);
  color: var(--farbe-text-hell);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}

.footer-spalten {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: 0 var(--abstand);
}

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

.seiten-footer h2 {
  color: var(--farbe-text-hell);
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.seiten-footer p,
.seiten-footer li {
  font-size: 0.95rem;
}

.seiten-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seiten-footer li {
  margin-bottom: 0.4rem;
}

.seiten-footer a {
  color: var(--farbe-text-hell);
}

.seiten-footer a:hover,
.seiten-footer a:focus {
  color: #ffffff;
  text-decoration-thickness: 2px;
}

.footer-schluss {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.85;
  margin-top: 2rem;
  padding: 1.25rem var(--abstand) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   10. Sonstiges
   -------------------------------------------------------------------------- */
/* Kontakt-/Adressblöcke */
address {
  font-style: normal;
  line-height: 1.7;
}

/* Rechtstexte: etwas schmalere Zeilen für bessere Lesbarkeit */
.rechtstext {
  max-width: 46rem;
}

/* TODO-Markierungen im sichtbaren Text – auffällig, damit nichts vergessen wird.
   Vor dem Livegang sollten keine gelben Markierungen mehr auf der Seite sein! */
.todo {
  background: #fff3bf;
  border: 1px dashed #b08900;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-weight: 600;
}

/* Reduzierte Bewegung respektieren (Barrierefreiheit) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
