/* ==========================================================
   TSC 88 Wörth/Isar – Stylesheet
   Farben zentral über CSS-Variablen anpassbar.
   Farbschema abgeleitet vom Luftbild: Aschenrot + Grün.
   ========================================================== */

:root {
  --farbe-primaer: #1e5aa8;      /* Vereinsblau */
  --farbe-primaer-dunkel: #164a8c;
  --farbe-akzent: #2d6cb5;       /* helleres Blau (Hero-Hintergrund) */
  --farbe-dunkel: #1b2430;       /* dunkles Nachtblau (Footer, Text) */
  --farbe-hell: #f5f8fc;         /* kühles Weiß */
  --farbe-grau: #64707f;
  --farbe-linie: #dde5ef;
  --breite-max: 1080px;
  --radius: 8px;
}

/* Lokale Systemschriften – keine externen Fonts (DSGVO) */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--farbe-dunkel);
  background: var(--farbe-hell);
  line-height: 1.6;
}

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

a { color: var(--farbe-primaer); }
a:hover { color: var(--farbe-primaer-dunkel); }

.container {
  max-width: var(--breite-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--farbe-primaer);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--farbe-dunkel);
}

.brand img { height: 56px; width: auto; }

.brand-text { line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; display: block; white-space: nowrap; }
.brand-text span { font-size: 0.8rem; color: var(--farbe-grau); }

/* Hamburger (reines CSS, kein JavaScript nötig) */
.nav-toggle { display: none; }

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.6rem;
  line-height: 1;
  user-select: none;
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--farbe-dunkel);
  font-weight: 600;
  border-radius: var(--radius);
}

.main-nav a:hover { background: var(--farbe-hell); color: var(--farbe-primaer); }
.main-nav a.aktiv { background: var(--farbe-primaer); color: #fff; }

/* Ab dieser Breite passen die 8 Menüpunkte nicht mehr in eine Zeile -> Hamburger-Menü */
@media (max-width: 1080px) {
  .nav-toggle-label { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 3px solid var(--farbe-primaer);
    display: none;
  }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding: 0.5rem 1rem 1rem; }
}

/* ---------- Hero (Startseite) ---------- */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(rgba(20, 35, 60, 0.45), rgba(20, 35, 60, 0.6)),
    var(--farbe-akzent);
}

.hero img.hero-bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero { overflow: hidden; z-index: 0; }

.hero-inner {
  max-width: var(--breite-max);
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.hero p { font-size: 1.15rem; max-width: 34rem; }

.hero .knopf { margin-top: 1.5rem; }

/* ---------- Buttons ---------- */
.knopf {
  display: inline-block;
  background: var(--farbe-primaer);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.knopf:hover { background: var(--farbe-primaer-dunkel); color: #fff; }

/* ---------- Abschnitte ---------- */
.abschnitt { padding: 3rem 0; }
.abschnitt-alt { background: #fff; }

.abschnitt h2 {
  font-size: 1.7rem;
  margin-bottom: 1.25rem;
  border-left: 5px solid var(--farbe-primaer);
  padding-left: 0.75rem;
}

.abschnitt h3 { margin: 1.25rem 0 0.5rem; }
.abschnitt p + p { margin-top: 0.75rem; }

/* Kartenraster (Abteilungen, Berichte) */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.karte {
  background: #fff;
  border: 1px solid var(--farbe-linie);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.abschnitt-alt .karte { background: var(--farbe-hell); }

.karte h3 { margin-top: 0; color: var(--farbe-primaer); }
.karte .datum { color: var(--farbe-grau); font-size: 0.9rem; }

/* ---------- Terminliste ---------- */
.terminliste { list-style: none; margin-top: 1.5rem; }

.terminliste li {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--farbe-linie);
}

.termin-datum {
  flex: 0 0 auto;
  background: var(--farbe-primaer);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  min-width: 4.5rem;
  align-self: flex-start;
}

.termin-datum .tag { display: block; font-size: 1.4rem; line-height: 1.1; }
.termin-datum .monat { display: block; font-size: 0.8rem; text-transform: uppercase; }

.termin-info h3 { margin: 0 0 0.25rem; }
.termin-info p { color: var(--farbe-grau); }

/* ---------- Formular ---------- */
.formular { max-width: 40rem; }

.formular label { display: block; font-weight: 600; margin: 1rem 0 0.25rem; }

.formular input,
.formular textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--farbe-linie);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}

.formular input:focus,
.formular textarea:focus {
  outline: 2px solid var(--farbe-primaer);
  border-color: transparent;
}

.formular .knopf { margin-top: 1.25rem; }

/* Honeypot-Feld unsichtbar (nicht display:none – Bots erkennen das) */
.hp-feld {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.hinweis-erfolg,
.hinweis-fehler {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.hinweis-erfolg { background: #e5efe3; border: 1px solid #3a6b35; }
.hinweis-fehler { background: #f6e3dd; border: 1px solid #a94b2d; }

/* ---------- Tabellen (z. B. Trainingszeiten) ---------- */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--farbe-linie);
}

th { background: var(--farbe-dunkel); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--farbe-dunkel);
  color: #d8d5cf;
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.95rem;
}

.footer-spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.site-footer h4 { color: #fff; margin-bottom: 0.5rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin: 0.3rem 0; }

.footer-unten {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #3a4034;
  text-align: center;
  color: #a5a29b;
  font-size: 0.85rem;
}

/* ---------- Platzhalter-Markierung (vor Livegang entfernen) ---------- */
.platzhalter { background: #fff3cd; padding: 0 0.2rem; }

/* ---------- Eigene Symbole ---------- */
.icon-eisstock { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; }

/* ---------- Schwebendes Menü (public/js/menue.js) ----------
   Ein runder Knopf unten rechts öffnet einen Bogen aus Menüpunkten (Vorbild Root Index).
   Nur aktiv, wenn das Script läuft (Klasse .menue-unten am <html>), sonst bleibt die Navigation oben. */
.menue-unten .main-nav,
.menue-unten .nav-toggle-label { display: none !important; }
.menue-unten .site-footer { padding-bottom: 5.5rem; }

.menue-knopf {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 210;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--farbe-primaer); color: #fff;
  box-shadow: 0 8px 22px rgba(10, 30, 60, 0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: transform .15s ease, background .15s ease;
}
.menue-knopf:active { transform: scale(.94); }
.menue-knopf:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--farbe-primaer); }
.menue-strich { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, opacity .2s ease; }
.menue-knopf.offen .menue-strich:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menue-knopf.offen .menue-strich:nth-child(2) { opacity: 0; }
.menue-knopf.offen .menue-strich:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menue-bogen { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.menue-bogen.offen { pointer-events: auto; }
.menue-hintergrund { position: absolute; inset: 0; background: rgba(10, 20, 35, .45); opacity: 0; transition: opacity .18s ease; }
.menue-bogen.offen .menue-hintergrund { opacity: 1; }

.menue-punkt {
  position: fixed; display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 9px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: var(--farbe-dunkel); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid var(--farbe-linie); box-shadow: 0 6px 18px rgba(10, 25, 45, .3);
  opacity: 0; transform: translate(0, 0) scale(.35); transform-origin: right bottom;
  transition: transform .26s cubic-bezier(.2, .9, .3, 1.2), opacity .18s ease;
}
.menue-bogen.offen .menue-punkt { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
.menue-punkt:hover, .menue-punkt:focus-visible { border-color: var(--farbe-primaer); color: var(--farbe-primaer); outline: none; }
.menue-punkt.aktiv { background: var(--farbe-primaer); color: #fff; border-color: var(--farbe-primaer); }
.menue-icon { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--farbe-hell); color: var(--farbe-primaer); flex: 0 0 30px; }
.menue-punkt.aktiv .menue-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.menue-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Gruppen (aus der Fußzeile, z. B. „Rechtliches“) öffnen einen Unterbogen links daneben */
button.menue-punkt { font: inherit; font-weight: 600; cursor: pointer; }
.menue-pfeil { margin-left: 2px; font-size: 1.2rem; line-height: 1; color: var(--farbe-grau); transition: transform .2s ease; }
.menue-gruppe.offen { border-color: var(--farbe-primaer); box-shadow: 0 0 0 2px var(--farbe-primaer), 0 6px 18px rgba(10, 25, 45, .3); }
.menue-gruppe.offen .menue-pfeil { transform: rotate(180deg); color: var(--farbe-primaer); }
.menue-gruppe.aktiv-gruppe .menue-icon { background: var(--farbe-primaer); color: #fff; }
.menue-bogen.offen .menue-unterpunkt { opacity: 0; transform: scale(.35); pointer-events: none; }
.menue-bogen.offen .menue-unterpunkt.sichtbar { opacity: 1; transform: scale(1); pointer-events: auto; }
.menue-unterpunkt { transform-origin: right center; }

@media (prefers-reduced-motion: reduce) {
  .menue-punkt, .menue-hintergrund, .menue-strich, .menue-pfeil { transition: none; }
}

/* ---------- Bild groß anzeigen (public/js/menue.js) ---------- */
.leuchtkasten { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; margin: auto; inset: 0; position: fixed; }
.leuchtkasten::backdrop { background: rgba(10, 15, 25, .85); }
.leuchtkasten img { display: block; max-width: 96vw; max-height: 90vh; border-radius: 8px; }
.leuchtkasten-zu { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: #fff; color: var(--farbe-dunkel); font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.35); }

/* ---------- Termine als Karussell (Startseite) ---------- */
.karussell-reihe { margin-top: 1.25rem; }
.karussell-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.karussell-kopf h3 { margin: 0; font-size: 1.05rem; }
.karussell-pfeile { display: none; gap: .3rem; }
@media (hover: hover) { .karussell-pfeile { display: flex; } }
.karussell-pfeile button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--farbe-linie); background: #fff; cursor: pointer; font-size: 1rem; }
.karussell { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .6rem .1rem .8rem; scrollbar-width: thin; }
.tk { flex: 0 0 11.5rem; scroll-snap-align: start; background: #fff; border: 1px solid var(--farbe-linie); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.tk-bild { display: block; height: 8.5rem; background: var(--farbe-hell); }
.tk-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tk-ohne { display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--farbe-primaer); }
.tk-ohne .tk-tag { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.tk-ohne .tk-monat { text-transform: uppercase; font-size: .85rem; font-weight: 600; }
.tk-text { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem .2rem; text-decoration: none; color: inherit; }
.tk-text strong { font-size: .95rem; line-height: 1.25; }
.tk-text:hover strong { color: var(--farbe-primaer); text-decoration: underline; }
.tk-datum { font-size: .8rem; font-weight: 600; color: var(--farbe-primaer); }
.tk-zeit { font-size: .8rem; color: var(--farbe-grau); }
.tk-marken { padding: .2rem .7rem .6rem; display: flex; gap: .3rem; flex-wrap: wrap; margin-top: auto; }

/* Kleines Bild in der Terminliste */
.termin-bild { margin-left: auto; flex: 0 0 auto; }
.termin-bild img { width: 64px; height: 84px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--farbe-linie); display: block; }
