/* CAP Hallenbad Gräfenberg – Gestaltung */
:root {
  --gruen: #2f8a55;
  --gruen-dunkel: #1f6b3f;
  --gruen-hell: #a8d5ba;
  --gruen-zart: #eaf6ef;
  --blau: #095bb1;
  --text: #1d2a24;
  --leise: #55655c;
  --linie: #d5e6dc;
  --weiss: #ffffff;
  --hinter: #f7faf8;
  --radius: 18px;
  --breite: 1200px;
  --schatten: 0 10px 30px rgba(20, 70, 50, .10);
  /* Welle als Übergang (Farbe = Seitenhintergrund) */
  --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23f1f8f4' d='M0 48c120-22 240-34 360-30 150 5 240 40 390 42 150 2 270-32 420-38 110-4 200 10 270 22V80H0z'/%3E%3C/svg%3E");
  --welle-fuss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath fill='%231f6b3f' d='M0 30c160 22 320 30 480 22S800 12 960 10s320 14 480 26V60H0z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f1f8f4;
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--blau); }
h1, h2, h3 { line-height: 1.2; color: var(--gruen-dunkel); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
p { margin: 0 0 1em; }
.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }
.versteckt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopf ---------- */
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 20; }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.marke img { height: 46px; width: auto; }
.marke span { font-weight: 700; line-height: 1.15; font-size: 1.02rem; white-space: nowrap; }
.marke small { display: block; font-weight: 500; color: var(--leise); font-size: .82rem; }
.menue-knopf { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--gruen-zart); }
.nav a[aria-current="page"] { background: var(--gruen); color: #fff; }

@media (max-width: 980px) {
  .menue-knopf {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 14px;
    border: 1px solid var(--linie); border-radius: 999px; font-weight: 600; background: var(--weiss); color: var(--text);
  }
  .menue-knopf::before { content: "☰"; font-size: 1.1rem; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--weiss); border-bottom: 1px solid var(--linie); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  #menue:checked ~ .nav { display: block; }
  #menue:checked ~ .menue-knopf::before { content: "✕"; }
}

/* ---------- Hinweise aus der Verwaltung ---------- */
.hinweis-banner { background: var(--gruen-zart); border-bottom: 1px solid var(--gruen-hell); color: var(--gruen-dunkel); font-weight: 600; }
.hinweis-banner .huelle { display: flex; gap: 10px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; white-space: pre-line; }
.hinweis-banner.wichtig { background: #fdecea; border-bottom-color: #f3b9b0; color: #9b2f22; }
.hinweis-symbol { flex: none; font-size: 1.1rem; line-height: 1.4; }
.zusatz { font-weight: 400; color: var(--leise); font-size: .85em; }

/* ---------- Bühne (Startseite) ---------- */
.buehne { position: relative; color: #fff; background: #23493a center/cover no-repeat; overflow: hidden; }
.buehne::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14,70,45,.78) 0%, rgba(9,91,177,.35) 55%, rgba(0,0,0,.05) 100%); }
.buehne::after, .seitenkopf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(30px, 5vw, 70px);
  background: var(--welle) bottom/100% 100% no-repeat; pointer-events: none;
}
.buehne .huelle { position: relative; z-index: 1; padding-top: clamp(90px, 16vw, 190px); padding-bottom: clamp(90px, 10vw, 130px); }
.buehne h1 { color: #fff; max-width: 14em; text-shadow: 0 2px 14px rgba(0,0,0,.30); font-size: clamp(2.1rem, 5vw, 3.4rem); }
.buehne p { font-size: 1.2rem; max-width: 32em; text-shadow: 0 1px 8px rgba(0,0,0,.30); }

/* Seitenkopf der Unterseiten: Foto mit grün-blauem Verlauf */
.seitenkopf {
  position: relative; color: #fff; overflow: hidden;
  background-color: var(--gruen-dunkel);
  background-image: linear-gradient(105deg, rgba(20,95,55,.93) 0%, rgba(20,95,55,.78) 45%, rgba(9,91,177,.45) 100%), var(--kopfbild, linear-gradient(120deg, #2f8a55, #095bb1));
  background-size: cover; background-position: center var(--kopfpos, 40%);
}
.seitenkopf .huelle { position: relative; z-index: 1; padding-top: clamp(44px, 7vw, 84px); padding-bottom: clamp(60px, 8vw, 104px); }
.seitenkopf h1 { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.seitenkopf p { color: #eaf6ef; font-size: 1.15rem; margin: 0; max-width: 40em; }

/* Farbige Abschnitte im Wechsel */
main > .abschnitt.band { background: linear-gradient(180deg, #e2f2e8 0%, #dcefe8 100%); }
main > .abschnitt.band + .abschnitt { padding-top: 44px; }

/* Vorteile-Leiste (Startseite) */
.vorteile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .vorteile { grid-template-columns: repeat(2, 1fr); } }
.vorteil { text-align: center; padding: 22px 14px; background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); }
.vorteil .kreis { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; background: linear-gradient(135deg, #d6f0e0, #cfe5f6); }
.vorteil b { display: block; color: var(--gruen-dunkel); font-size: 1.05rem; }
.vorteil span { color: var(--leise); font-size: .93rem; }

/* ---------- Knöpfe ---------- */
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.knopf {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: var(--gruen); color: #fff; text-decoration: none; font-weight: 600; border: 2px solid var(--gruen);
  font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
}
.knopf:hover { background: var(--gruen-dunkel); border-color: var(--gruen-dunkel); }
.knopf.hell { background: rgba(255,255,255,.95); color: var(--gruen-dunkel); border-color: transparent; }
.knopf.rahmen { background: transparent; color: var(--gruen-dunkel); border-color: var(--gruen); }
.knopf.rahmen:hover { background: var(--gruen-zart); }

/* ---------- Inhalt ---------- */
main { display: block; }
.abschnitt { padding: 36px 0; }
.abschnitt > .huelle > :first-child { margin-top: 0; }
.zwei { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: start; }
.zwei.umgekehrt { grid-template-columns: 1fr 1.3fr; }
@media (max-width: 820px) { .zwei, .zwei.umgekehrt { grid-template-columns: 1fr; gap: 20px; } }
.bild { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--gruen-zart); box-shadow: var(--schatten); position: relative; }
.bild.hoch { aspect-ratio: 3 / 4; max-height: 640px; width: 100%; }
@media (max-width: 820px) { .bild.hoch { aspect-ratio: 4 / 5; } }
.bild img { width: 100%; height: 100%; object-fit: cover; }
.bild::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); pointer-events: none; }
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; box-shadow: 0 4px 14px rgba(20,70,50,.05); }
.karte > :first-child { margin-top: 0; }
.karte > :last-child { margin-bottom: 0; }
.hervor { background: var(--gruen-zart); border-color: var(--gruen-hell); }
.hinweis-box { border-left: 5px solid var(--gruen); background: var(--weiss); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }
.liste-haken { list-style: none; padding: 0; margin: 0 0 1em; }
.liste-haken li { padding-left: 1.7em; position: relative; margin: .3em 0; }
.liste-haken li::before { content: "✓"; position: absolute; left: 0; color: var(--gruen); font-weight: 700; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .kacheln { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kacheln { grid-template-columns: 1fr; } }
.kachel { background: var(--weiss); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; box-shadow: var(--schatten); }
.kachel:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20,70,50,.18); }
.kachel .foto { overflow: hidden; aspect-ratio: 3 / 2; }
.kachel img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.kachel:hover img { transform: scale(1.05); }
.kachel > div:last-child { border-top: 4px solid var(--gruen-hell); }
.kachel div { padding: 16px 18px 18px; }
.kachel h3 { margin: 0 0 4px; }
.kachel p { margin: 0; color: var(--leise); font-size: .95rem; }
.kachel .mehr { display: inline-block; margin-top: 10px; color: var(--gruen); font-weight: 600; }

/* Infoleiste */
.infoleiste { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -70px; position: relative; z-index: 2; }
.nw { white-space: nowrap; }
@media (max-width: 820px) { .infoleiste { grid-template-columns: 1fr; margin-top: 20px; } }
.infoleiste .karte { box-shadow: 0 8px 24px rgba(20,60,40,.10); }
.infoleiste h3 { margin: 0 0 6px; font-size: 1.05rem; }
.infoleiste p { margin: 0; }

/* Kurszeiten */
.kurszeiten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.kurszeiten h3 { margin: 0 0 10px; }
.zeiten { width: 100%; border-collapse: collapse; }
.zeiten th, .zeiten td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.zeiten th { width: 7.2em; font-weight: 600; color: var(--leise); }
.zeiten tr:last-child th, .zeiten tr:last-child td { border-bottom: 0; }
.uhr { display: inline-block; background: var(--gruen-zart); border-radius: 999px; padding: 1px 10px; margin: 2px 4px 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Service-Kacheln */
.service { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .service { grid-template-columns: 1fr; } }
.service h3 { margin-top: 0; }
.staffeln { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .staffeln { grid-template-columns: repeat(2, 1fr); } }
.staffeln div { background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; }
.staffeln b { display: block; color: var(--gruen-dunkel); }

/* Formular */
.formular label { display: block; font-weight: 600; margin: 14px 0 5px; }
.formular input, .formular select, .formular textarea {
  width: 100%; padding: 12px 14px; font: inherit; border: 1px solid #c4d6cb; border-radius: 10px; background: #fff; color: var(--text);
}
.formular textarea { min-height: 140px; resize: vertical; }
.formular input:focus, .formular select:focus, .formular textarea:focus, .knopf:focus-visible, a:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.formular .zustimmung { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.formular .zustimmung input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--gruen); }
.formular .reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .formular .reihe { grid-template-columns: 1fr; } }
.formular .falle { position: absolute; left: -9999px; }
.meldung { border-radius: 12px; padding: 14px 16px; margin: 14px 0 0; }
.meldung.ok { background: #e3f4ea; color: #17633a; }
.meldung.fehler { background: #fbe9e6; color: #9b2f22; }
.pflicht { color: var(--leise); font-size: .9rem; }

/* Kontakt-Knöpfe */
.kontaktwege { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .kontaktwege { grid-template-columns: 1fr; } }
.kontaktweg { display: flex; gap: 14px; align-items: center; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text); }
.kontaktweg:hover { border-color: var(--gruen); background: var(--gruen-zart); }
.kontaktweg .symbol { width: 46px; height: 46px; border-radius: 50%; background: var(--gruen); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.kontaktweg b { display: block; }
.kontaktweg span { color: var(--leise); font-size: .95rem; word-break: break-word; }

/* Rechtstexte */
.rechtstext { max-width: 820px; }
.rechtstext h2 { font-size: 1.3rem; }
.rechtstext h3 { font-size: 1.08rem; }
.entwurf { background: #fff7e0; border: 1px solid #f0d58a; border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; }

/* ---------- Fuß ---------- */
.fuss { background: var(--gruen-dunkel); color: #e6f3eb; margin-top: 72px; position: relative; }
.fuss::before { content: ""; position: absolute; left: 0; right: 0; top: clamp(-40px, -3vw, -24px); height: clamp(24px, 3vw, 40px); background: var(--welle-fuss) top/100% 100% no-repeat; }
.fuss a { color: #fff; }
.fuss .huelle { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; padding-top: 36px; padding-bottom: 28px; }
@media (max-width: 820px) { .fuss .huelle { grid-template-columns: 1fr; } }
.fuss h3 { color: #fff; margin: 0 0 8px; font-size: 1.05rem; }
.fuss p, .fuss ul { margin: 0 0 .6em; }
.fuss ul { list-style: none; padding: 0; }
.fuss li { margin: 4px 0; }
.fuss .unten { border-top: 1px solid rgba(255,255,255,.18); }
.fuss .unten .huelle { display: block; padding-top: 14px; padding-bottom: 18px; font-size: .9rem; color: #bcdcc8; }
