/* =========================================================
   TSV Schwabmünchen – Abteilung Badminton
   Ein gemeinsames Stylesheet für alle Seiten.
   Farben und Abstände nur hier oben ändern.
   ========================================================= */

:root {
  --rot: #C32B2A;          /* Vereinsrot (aus der alten Seite) */
  --rot-dunkel: #97201F;
  --tinte: #1E2633;        /* Text */
  --grau: #5B6573;         /* Nebentext */
  --linie: #D3D9DF;        /* Linien, Rahmen */
  --flaeche: #F1F4F6;      /* helle Hintergrundflächen */
  --weiss: #FFFFFF;

  --schrift: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --breite: 68rem;
  --rand: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinte);
  background: var(--weiss);
}

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

a { color: var(--rot); text-underline-offset: .18em; }
a:hover { color: var(--rot-dunkel); }

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

.inhalt {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* ---------- Überschriften: kräftig und kursiv wie das Vereinslogo ---------- */

h1, h2, h3 {
  font-style: italic;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 65ch; }

/* ---------- Kopfbereich ---------- */

.kopf {
  border-bottom: 1px solid var(--linie);
  background: var(--weiss);
}
.kopf .inhalt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.marke {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--tinte);
}
.marke svg { width: 3.2rem; height: auto; flex: none; }
.marke-text { display: flex; flex-direction: column; line-height: 1.15; }
.marke-verein { font-weight: 800; font-style: italic; font-size: 1.05rem; }
.marke-abt { font-style: italic; color: var(--grau); font-size: .95rem; }
.marke:hover { color: var(--tinte); }

.menue ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
}
.menue a {
  display: inline-block;
  padding: .35rem 0;
  color: var(--tinte);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.menue a:hover { border-bottom-color: var(--linie); color: var(--tinte); }
.menue a[aria-current="page"] { border-bottom-color: var(--rot); }
@media (max-width: 30rem) {
  .menue ul { gap: .25rem .9rem; }
  .menue a { font-size: .95rem; }
}

/* ---------- Startseite: Bühne mit Flugbahnen ---------- */

.buehne {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--linie);
}
.flugbahnen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.flugbahnen path { fill: none; stroke-linecap: round; }
.bahn-rot   { stroke: var(--rot); stroke-width: 5; }
.bahn-dunkel{ stroke: var(--tinte); stroke-width: 4; }
.bahn-grau  { stroke: #C9CED4; stroke-width: 6; }

@media (prefers-reduced-motion: no-preference) {
  .flugbahnen path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: flug 1.6s cubic-bezier(.3,.6,.3,1) forwards;
  }
  .flugbahnen .bahn-dunkel { animation-delay: .15s; }
  .flugbahnen .bahn-rot { animation-delay: .3s; animation-duration: 1.9s; }
}
@keyframes flug { to { stroke-dashoffset: 0; } }

.buehne .inhalt { position: relative; }
@media (max-width: 47rem) { .flugbahnen { display: none; } }
.buehne h1 { max-width: 14ch; }
.buehne .einleitung { font-size: 1.2rem; max-width: 36ch; color: var(--tinte); }

.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.knopf {
  display: inline-block;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--rot);
}
.knopf-voll { background: var(--rot); color: var(--weiss); }
.knopf-voll:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: var(--weiss); }
.knopf-rand { background: var(--weiss); color: var(--rot); }
.knopf-rand:hover { background: var(--flaeche); }

/* ---------- Abschnitte ---------- */

.abschnitt { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.abschnitt-flaeche { background: var(--flaeche); }
.seitenkopf { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 1rem; }
.seitenkopf p { font-size: 1.15rem; color: var(--grau); }

/* Gruppen auf der Startseite: getrennt durch Linien wie Spielfeldlinien */
.gruppen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.5rem;
  border-top: 2px solid var(--tinte);
}
.gruppe { padding: 1.25rem 1.5rem 1.25rem 0; }
.gruppe + .gruppe { border-left: 1px solid var(--linie); padding-left: 1.5rem; }
.gruppe h3 { color: var(--rot); }
.gruppe p { color: var(--grau); margin-bottom: .5em; }
@media (max-width: 47rem) {
  .gruppe + .gruppe { border-left: 0; padding-left: 0; border-top: 1px solid var(--linie); }
}

.zweispaltig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 47rem) { .zweispaltig { grid-template-columns: 1fr; } }

.foto { margin: 0; }
.foto img { border-radius: 6px; width: 100%; }
.foto img + img { margin-top: .75rem; }
.bildquelle { font-size: .8rem; }
.bildquelle a { color: inherit; }
.foto figcaption { font-size: .9rem; color: var(--grau); margin-top: .5rem; }

/* Hinweis-Kasten (Aktuelles, Ferien) */
.hinweis {
  border-left: 5px solid var(--rot);
  background: var(--weiss);
  padding: 1.1rem 1.4rem;
  margin: 1rem 0;
  max-width: 48rem;
}
.hinweis h3 { margin-bottom: .3em; }
.hinweis p:last-child { margin-bottom: 0; }

/* Mehrere Hinweise nebeneinander (Startseite: Aktuelles) */
.hinweise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  max-width: 48rem;
}
.hinweise .hinweis { margin: 0; max-width: none; background: var(--flaeche); }
.hinweise .hinweis h3 { font-size: 1.15rem; }

/* ---------- News (Startseite) ---------- */

.news-einleitung { color: var(--grau); }
.meldung { max-width: 48rem; padding: 1.75rem 0; border-top: 1px solid var(--linie); }
.news > .meldung:first-child { border-top: 2px solid var(--tinte); }
.meldung h2, .meldung h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-bottom: .4em; }
.quelle { margin-top: .9rem; font-size: .85rem; color: var(--grau); }
.quelle a { color: var(--grau); }
.quellen { max-width: 48rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--tinte); font-size: .95rem; color: var(--grau); }
.quellen h2 { font-size: 1.3rem; color: var(--tinte); }
.quellen ul { padding-left: 1.2rem; }
.news-teaser { max-width: 48rem; border-left: 5px solid var(--rot); background: var(--flaeche); padding: 1.2rem 1.4rem; }
.news-teaser .knoepfe { margin: 1rem 0 0; }
.meldung p:last-child { margin-bottom: 0; }
.meldung-meta {
  margin: 0 0 .4rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--grau);
}
.meldung-meta time { color: var(--rot); font-weight: 700; }
.fotoreihe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 36rem;
  margin-top: 1.5rem;
}
@media (max-width: 30rem) { .fotoreihe { grid-template-columns: 1fr; max-width: 20rem; } }

.aeltere { max-width: 48rem; border-top: 1px solid var(--linie); }
.aeltere summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 700;
  color: var(--rot);
}
.aeltere[open] summary { border-bottom: 1px solid var(--linie); }
.aeltere .meldung:first-of-type { border-top: 0; }

/* ---------- Trainingsplan ---------- */

.plan { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 2px solid var(--tinte); }
.termin {
  display: grid;
  grid-template-columns: 9rem 9rem 1fr;
  gap: .25rem 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--linie);
}
.termin-tag {
  font-style: italic;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--rot);
}
.termin-zeit { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: .2rem; }
.termin-was h3 { font-style: normal; font-weight: 700; font-size: 1.1rem; margin: .15rem 0 .2rem; }
.termin-was p { margin: 0; color: var(--grau); }
.termin-was .ort { color: var(--tinte); }
@media (max-width: 40rem) {
  .termin { grid-template-columns: 1fr; }
  .termin-zeit { padding-top: 0; }
}

/* Hallen */
.hallen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem 2rem;
  margin-top: 1rem;
}
.halle { border-top: 2px solid var(--tinte); padding-top: 1rem; }
.halle address { font-style: normal; margin-bottom: .5rem; }

/* ---------- Spielbetrieb ---------- */

.ligen { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 2px solid var(--tinte); }
.ligen li { border-bottom: 1px solid var(--linie); }
.ligen a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--tinte);
  font-weight: 700;
  font-size: 1.15rem;
}
.ligen a span { color: var(--rot); font-weight: 600; font-size: 1rem; white-space: nowrap; align-self: flex-end; }
.ligen small { display: block; color: var(--grau); font-weight: 600; font-size: .85rem; }
.ligen .liga { padding: 1rem 0; font-weight: 700; font-size: 1.15rem; }
.ligen a:hover span { text-decoration: underline; }

/* ---------- Fragen ---------- */

.fragen { border-top: 2px solid var(--tinte); max-width: 48rem; }
.fragen details { border-bottom: 1px solid var(--linie); }
.fragen summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700;
  font-size: 1.15rem;
  position: relative;
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: .8rem;
  font-size: 1.6rem;
  color: var(--rot);
  font-weight: 400;
}
.fragen details[open] summary::after { content: "–"; }
.fragen details > div { padding: 0 0 1.2rem; }

/* ---------- Kontakt ---------- */

.person { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 2rem; align-items: start; }
.person img { border-radius: 6px; }
.person dl { margin: 1rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.person dt { color: var(--grau); }
.person dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .person { grid-template-columns: 1fr; } .person img { max-width: 14rem; } }

.fehlerseite { padding-bottom: clamp(3rem, 8vw, 6rem); }
.seitenkopf .fehlercode { font-weight: 700; color: var(--rot); letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin-bottom: .5rem; }

/* ---------- Rechtstexte ---------- */

.rechtstext h2 { font-size: 1.3rem; margin-top: 2rem; font-style: normal; font-weight: 700; }
.rechtstext { max-width: 48rem; }

/* ---------- Fußbereich ---------- */

.fuss {
  margin-top: 2rem;
  background: var(--tinte);
  color: #D9DEE4;
  padding: 2.5rem 0;
  font-size: .95rem;
}
.fuss .inhalt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.fuss p { margin: 0; }
.fuss strong { color: var(--weiss); font-style: italic; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.fuss a { color: var(--weiss); }
.fuss a:hover { color: #FFD2D1; }
