:root {
  --blau: #4083f2;
  --blau-dunkel: #2f66c9;
  --blau-hell: #eaf1fe;
  --gruen: #9edc44;
  --gruen-dunkel: #588a1c;
  --gruen-hell: #f1f9e6;
  --gold: #d9a300;
  --gold-dunkel: #8a5a00;
  --gold-hell: #fdf0d5;
  --grau-hell: #eef0f3;
  --text: #1c2333;
  --text-mild: #5a6472;
  --rand: #e3e7ee;
  --hintergrund: #f7f8fb;
  --karte: #ffffff;
  --radius: 14px;
  --schatten: 0 8px 24px rgba(28, 35, 51, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--hintergrund);
  line-height: 1.55;
}

a { color: var(--blau-dunkel); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / Navigation */

header.site {
  background: var(--karte);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  display: flex;
  align-items: center;
  /* flex-start statt space-between: nav.site (Desktop) bzw.
     .konto-button-mobil (Mobile) trägt margin-left:auto und schiebt sich
     damit selbst plus alles danach an den rechten Rand, während die
     Marke links bleibt - beides bereits in genau der richtigen
     DOM-Reihenfolge (siehe HTML), bewusst OHNE CSS "order": eine frühere
     Fassung nutzte "order" zum Umsortieren, das zeigte sich auf einem
     echten iPhone (Safari) als unzuverlässig - der Button verschwand
     dort komplett, obwohl derselbe Code in anderen Browsern korrekt
     aussah (2026-09-29). Diese Fassung kommt ganz ohne "order" aus. */
  justify-content: flex-start;
  padding: 14px 20px;
  /* Breiter als .wrap (960px): Marke + alle 6 Navigationspunkte brauchen
     mehr Platz, seit der Markenname "...am See" enthält - sonst rutscht
     "Kontakt" als letzter Punkt in eine zweite Zeile. */
  max-width: 1120px;
  margin: 0 auto;
  gap: 16px;
}

/* Runder Konto-/Mitgliederbereich-Button oben rechts (statt eines
   Navigationspunkts) - zwei Instanzen im HTML (konto-button-desktop nach
   der Nav, konto-button-mobil vor dem Menü-Button), hier nur per Media
   Query ein-/ausgeblendet statt umsortiert (siehe Kommentar oben). */
.konto-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blau-hell);
  color: var(--blau-dunkel);
}
.konto-button:hover { background: var(--blau); color: #fff; text-decoration: none; }
.konto-button svg { width: 18px; height: 18px; }
.konto-button-mobil { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
  min-width: 0;
}

.brand .logo-mark {
  height: 38px;
  width: auto;
}

/* Mitgliederbereich: .brand ist dort ein <div> mit zwei eigenen <a> drin
   (Logo -> normale Website, Text -> Mitgliederbereich-Startseite), statt
   wie auf der öffentlichen Seite ein einzelner Link - ohne das würden die
   Kind-Links die normale blaue Linkfarbe statt der Markenfarbe zeigen. */
.brand a {
  color: inherit;
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: flex-end;
  margin-left: auto;
}

nav.site a {
  color: var(--text-mild);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

nav.site a:hover,
nav.site a.aktiv {
  background: var(--blau-hell);
  color: var(--blau-dunkel);
  text-decoration: none;
}

.menu-toggle,
.mitglieder-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  /* Marke + alle 6 Navigationspunkte brauchen zusammen knapp 960px - erst
     ab hier ist zuverlässig Platz für eine einzeilige Navigation. Darunter
     lieber sauber aufs Hamburger-Menü wechseln, statt einzelne Punkte
     (z.B. "Kontakt") in eine zweite Zeile umbrechen zu lassen. */
  .menu-toggle { display: inline-flex; }
  /* Hier tauschen die beiden Konto-Button-Instanzen die Sichtbarkeit:
     die Desktop-Instanz (nach der Nav) verschwindet, die Mobile-Instanz
     (vor dem Menü-Button, bereits an der richtigen Stelle im HTML)
     erscheint und übernimmt das margin-left: auto. */
  .konto-button-desktop { display: none; }
  .konto-button-mobil { display: inline-flex; margin-left: auto; }
  nav.site {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 20px 14px;
    margin-left: 0;
  }
  nav.site.offen { display: flex; }
  .site-header-inner { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  /* "Kath. Jungschar Neusiedl am See" ist länger als der alte Kurzname -
     auf sehr schmalen Geräten lieber zweizeilig als abgeschnitten. */
  .brand {
    font-size: 0.95rem;
    white-space: normal;
    line-height: 1.2;
  }
  .brand .logo-mark { height: 32px; }
}

/* Hero */

.hero {
  /* Reihenfolge/Richtung an das Logo angelehnt: grüner Kreis links, blauer
     Kreis rechts. */
  background: linear-gradient(120deg, var(--gruen-dunkel) 0%, var(--blau) 55%, var(--blau-dunkel) 100%);
  color: #fff;
  padding: 48px 0;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  font-weight: 800;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 640px;
}

/* Main content */

main { padding: 36px 0 64px; }

h1.titel {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 20px;
}

.btn-abo {
  display: inline-block;
  background: var(--blau-dunkel);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 999px;
  margin: -8px 0 20px;
}
.btn-abo:hover { background: var(--blau); text-decoration: none; }

.monats-titel {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--blau-dunkel);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blau-hell);
}

.monats-titel:first-child { margin-top: 0; }

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 20px 22px;
  margin-bottom: 18px;
}

/* Spezial-Jungscharstunden: goldener Akzentrand, siehe .badge-spezial */
.karte-spezial {
  border-left: 4px solid var(--gold);
  padding-left: 18px;
}

.karte h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blau-dunkel);
  background: var(--blau-hell);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge-spezial {
  color: var(--gold-dunkel);
  background: var(--gold-hell);
}

.badge-entfallen {
  color: var(--text-mild);
  background: var(--grau-hell);
}

.badge-anmeldung {
  color: var(--blau-dunkel);
  background: var(--blau-hell);
}

.titel-entfallen {
  text-decoration: line-through;
}

.meta {
  color: var(--text-mild);
  font-size: 0.88rem;
  margin: 2px 0 10px;
}

.leer {
  color: var(--text-mild);
  padding: 30px 0;
  text-align: center;
}

.fehler {
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

/* Team-Raster */

.team-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.team-karte { text-align: left; }

.team-foto {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--blau-hell);
  margin-bottom: 10px;
}

.team-foto-platzhalter {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--blau-hell);
  color: var(--blau-dunkel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.team-name { font-weight: 700; font-size: 1.02rem; }
.team-rolle {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gruen-dunkel);
  background: var(--gruen-hell);
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  margin: 4px 0 8px;
}
.team-rolle.leitung {
  color: var(--blau-dunkel);
  background: var(--blau-hell);
}
.team-info-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--blau-dunkel);
  margin-top: 8px;
}
.team-info { font-size: 0.85rem; color: var(--text-mild); margin: 1px 0 2px; }
.team-quali { font-size: 0.8rem; color: var(--text-mild); margin: 1px 0 2px; }

/* Kalender */

.termin-datum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  background: var(--gruen-hell);
  color: var(--gruen-dunkel);
  border-radius: 10px;
  padding: 8px 6px;
  font-weight: 800;
  line-height: 1.1;
}
.termin-datum .tag { font-size: 1.25rem; }
.termin-datum .monat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }

.termin-zeile { display: flex; gap: 16px; align-items: flex-start; }
.termin-inhalt { flex: 1; }

.anhaenge { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.anhaenge a {
  font-size: 0.85rem;
  background: var(--blau-hell);
  color: var(--blau-dunkel);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}

/* .termin-bild-wrap ist das eigentliche Flex-Kind (Klick-Fläche für die
   Vollbild-Ansicht); .termin-bild selbst bekommt nie eine größere Box als
   sein tatsächlicher, seitenverhältnis-treuer Inhalt - dadurch liegt
   border-radius immer exakt am sichtbaren Bildrand an, egal ob Quer- oder
   Hochformat (bei einer festen Box + object-fit hätte ein schmäler
   dargestelltes Hochformat-/Plakatbild unrunde, weil "leere" Ecken gehabt). */
.termin-bild-wrap { flex-shrink: 0; }

.termin-bild {
  display: block;
  width: auto;
  height: auto;
  max-width: 150px;
  max-height: 150px;
  border-radius: 10px;
}

@media (max-width: 640px) {
  /* Auf Smartphone-Breite wirkt das Titelbild rechts neben dem Text zu
     gequetscht - hier stattdessen über Datum/Text, in voller Breite.
     .termin-zeile bleibt derselbe Flex-Container, nur order/flex-basis
     ändern sich: kein Umbau der HTML-Reihenfolge nötig, und ohne Titelbild
     (die meisten Termine) hat diese Regel schlicht kein passendes Element
     und bleibt wirkungslos. */
  .termin-zeile { flex-wrap: wrap; }
  .termin-bild-wrap { order: -1; flex-basis: 100%; }
  .termin-bild {
    /* Kein festes Seitenverhältnis - stattdessen nur eine Maximalhöhe wie
       bei .beitrag-bild: Querformat-Fotos zeigen ihr natürliches
       Verhältnis in voller Breite, ein hohes Bild (Plakat) wird ab hier
       automatisch schmäler statt beschnitten und dabei zentriert. */
    max-width: 100%;
    max-height: 320px;
    margin: 0 auto;
  }
}

/* Beiträge */

.beitrag-bild {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.beitrag-inhalt :is(h1, h2, h3) { margin-top: 1.4em; }
.beitrag-inhalt p { margin: 0.9em 0; }
.beitrag-inhalt img { border-radius: 10px; margin: 12px 0; }

/* Galerie */

.galerie-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.galerie-bild-wrap { position: relative; }
.galerie-bild {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.galerie-caption {
  font-size: 0.82rem;
  color: var(--text-mild);
  margin-top: 6px;
}

/* Kontakt */

.kontakt-liste { list-style: none; padding: 0; margin: 0; }
.kontakt-liste li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rand);
  display: flex;
  gap: 10px;
}
.kontakt-liste li:last-child { border-bottom: none; }
.kontakt-liste .label { color: var(--text-mild); min-width: 110px; }

/* Footer */

footer.site {
  border-top: 1px solid var(--rand);
  padding: 22px 0;
  color: var(--text-mild);
  font-size: 0.85rem;
  text-align: center;
}
.footer-links {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.footer-links a { color: var(--text-mild); }
.footer-links a:hover { color: var(--blau-dunkel); text-decoration: underline; }
.footer-seelsorgeraum {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--text-mild);
}
.footer-seelsorgeraum img { height: 24px; width: auto; }
.footer-seelsorgeraum:hover { color: var(--blau-dunkel); text-decoration: underline; }

/* Mitgliederbereich (mitglieder/*.html) - eigenes, schlankes Layout ohne
   die öffentliche Kern-Navigation, siehe js/mitglieder.js */

.mitglieder-header {
  background: var(--karte);
  border-bottom: 1px solid var(--rand);
}
.mitglieder-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* flex-wrap bleibt als Sicherheitsnetz (z.B. starker Zoom/sehr schmale
     Geräte) - der eigentliche Mechanismus für "passt nicht mehr
     nebeneinander" ist aber jetzt das Hamburger-Menü unten (analog zu
     nav.site/.menu-toggle oben), nicht mehr das Umbrechen der Nav in eine
     eigene Zeile. */
  flex-wrap: wrap;
  row-gap: 6px;
  padding: 14px 20px;
  /* Breiter als der Seiteninhalt (meist 420-640px), damit Marke + Nav +
     Aktionen auf typischer Desktop-Breite in eine Zeile passen (gemessen:
     ca. 750px nötig) - analog dazu, dass header.site (1120px) ebenfalls
     breiter ist als sein eigener Seiteninhalt (.wrap, 960px). */
  max-width: 820px;
  margin: 0 auto;
  gap: 16px;
}
.mitglieder-header .brand { font-weight: 800; font-size: 1.05rem; color: var(--text); }

/* Interne Navigation zwischen den eingeloggten Seiten (Umfragen / Fotos /
   Anwesenheit melden) - nur auf Seiten, die eine aktive Session
   voraussetzen, siehe HTML. Springt unterhalb von 760px wie nav.site ins
   Hamburger-Menü (.mitglieder-menu-toggle, siehe Media Query unten und
   initMitgliederMenu() in js/mitglieder.js für das Auf-/Zuklappen). */
.mitglieder-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mitglieder-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mild);
}
.mitglieder-nav a:hover { color: var(--blau-dunkel); text-decoration: none; }
.mitglieder-nav a.aktiv { color: var(--blau-dunkel); }

/* "Zur Website" + "Abmelden" sind beide Verlassen-Aktionen (zurück zur
   öffentlichen Seite bzw. ganz ausloggen) - bewusst als eigene Gruppe
   rechts, räumlich getrennt von den Seiten-Buttons oben statt direkt
   daneben, und bewusst NICHT Teil des Hamburger-Menüs (vergleichbar mit
   dem Konto-Button bei header.site, der ebenfalls immer sichtbar bleibt).
   margin-left: auto statt nur justify-content: space-between auf
   .mitglieder-header-inner, weil Aktionen bei schmaler Breite auf eine
   eigene Zeile rutscht (Nav ist dann als Hamburger-Button eingeklappt) -
   würde space-between es dort als einziges/letztes Element nach LINKS
   ziehen statt rechtsbündig zu halten; margin-left: auto wirkt dagegen
   auch auf der eigenen Zeile. */
.mitglieder-aktionen {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-left: auto;
}
.mitglieder-aktionen a {
  font-size: 0.85rem;
  color: var(--text-mild);
}
.mitglieder-aktionen a:hover { color: var(--blau-dunkel); text-decoration: none; }

@media (max-width: 760px) {
  /* Marke + Nav + Aktionen brauchen zusammen ca. 750px (siehe Kommentar
     bei .mitglieder-header-inner) - darunter die Seiten-Auswahl (Umfragen
     / Fotos / Anwesenheit melden) sauber ins Hamburger-Menü, genau wie
     bei der öffentlichen Website. "Zur Website" + "Abmelden" bleiben
     davon unberührt immer sichtbar. */
  .mitglieder-menu-toggle { display: inline-flex; }
  .mitglieder-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 8px 0 4px;
  }
  .mitglieder-nav.offen { display: flex; }
}

.formular-wrap {
  max-width: 420px;
  margin: 48px auto;
  padding: 0 20px;
}

.formular { display: flex; flex-direction: column; gap: 16px; }

.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-weight: 600; font-size: 0.9rem; }
.feld input[type="text"],
.feld input[type="email"],
.feld input[type="password"],
.feld input[type="number"],
.feld input[type="date"],
.feld input[type="time"],
.feld textarea,
.feld select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: var(--karte);
  color: var(--text);
}
.feld textarea { resize: vertical; min-height: 70px; }

.checkbox-zeile { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; }
.checkbox-zeile input { margin-top: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blau-dunkel);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.btn:hover { background: var(--blau); }
.btn:disabled { background: var(--rand); color: var(--text-mild); cursor: not-allowed; }

.btn-sekundaer {
  background: none;
  color: var(--blau-dunkel);
  border: 1px solid var(--rand);
}
.btn-sekundaer:hover { background: var(--blau-hell); }

.btn-gefahr { background: #b3261e; }
.btn-gefahr:hover { background: #8f1e18; }

.hinweis {
  font-size: 0.88rem;
  color: var(--text-mild);
  background: var(--blau-hell);
  border-radius: 10px;
  padding: 10px 14px;
}

.erfolg {
  color: var(--gruen-dunkel);
  background: var(--gruen-hell);
  border: 1px solid var(--gruen);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.formular-fusszeile {
  font-size: 0.88rem;
  color: var(--text-mild);
  text-align: center;
}

/* Ja/Nein/Wenn-es-sein-muss-Auswahl (Segmented-Control-Optik, analog zur
   App-Ansicht UmfrageDetailView.swift) */
.antwort-segmented {
  display: inline-flex;
  border: 1px solid var(--rand);
  border-radius: 999px;
  overflow: hidden;
}
.antwort-segmented button {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  background: var(--karte);
  color: var(--text-mild);
  cursor: pointer;
}
.antwort-segmented button + button { border-left: 1px solid var(--rand); }
.antwort-segmented button.aktiv {
  background: var(--blau-dunkel);
  color: #fff;
}
.antwort-segmented button:disabled { cursor: not-allowed; opacity: 0.6; }

/* Umfragen-Liste/-Detail */

.umfragen-liste { list-style: none; padding: 0; margin: 0; }
.umfragen-liste li { border-bottom: 1px solid var(--rand); }
.umfragen-liste li:last-child { border-bottom: none; }
.umfragen-liste a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  color: var(--text);
}
.umfragen-liste a:hover { text-decoration: none; background: var(--hintergrund); }

.umfrage-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--rand);
}
.umfrage-option:last-child { border-bottom: none; }

.umfrage-ergebnis { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 0.82rem; color: var(--text-mild); width: 100%; }
.umfrage-ergebnis strong { color: var(--text); }
