/* AquaPlus – ein Stylesheet für alle Stadt- und Bezirksseiten.
   Layout: helle Bänder im Wechsel, ein dunkler Hero mit Faktenleiste, Tabellen als Hauptinhalt.
   Keine externen Schriften (DSGVO, Ladezeit): Systemschriften mit sorgfältigem Fallback. */
:root {
  --bg: #f4f7fa;          /* Seite: Grau mit leichtem Blaustich */
  --surface: #ffffff;     /* Karten, Tabellen */
  --soft: #e9eff5;        /* Wechselband */
  --ink: #0f2233;         /* Text */
  --muted: #4d6275;       /* Nebentext */
  --line: #d3dee8;        /* Linien */
  --deep: #0f2a40;        /* Hero, Abschlussband */
  --deep-ink: #eaf2f9;
  --deep-muted: #a9c0d4;
  --accent: #1463c4;      /* Anruf, Links */
  --accent-ink: #ffffff;
  --wa: #11804a;
  --warn-bg: #fff4d6;
  --warn-line: #e3b341;
  --todo-bg: #ffe27a;
  --todo-ink: #3d2f00;
  --z1: #bfe0f2; --z2: #7fb3d9; --z3: #3d7bb3; --range: #e2622b;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1520; --surface: #111f2c; --soft: #0f1b27; --ink: #e4edf5; --muted: #9db2c4;
    --line: #22384b; --deep: #071019; --deep-ink: #e4edf5; --deep-muted: #8fa8bd;
    --accent: #5da3f0; --accent-ink: #04121f; --wa: #33c07a;
    --warn-bg: #2b2410; --warn-line: #8a6d1c; --todo-bg: #6b5600; --todo-ink: #fff3c4;
    --z1: #1d3a52; --z2: #2c5c85; --z3: #4b86bd; --range: #ff8a52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1520; --surface: #111f2c; --soft: #0f1b27; --ink: #e4edf5; --muted: #9db2c4;
  --line: #22384b; --deep: #071019; --deep-ink: #e4edf5; --deep-muted: #8fa8bd;
  --accent: #5da3f0; --accent-ink: #04121f; --wa: #33c07a;
  --warn-bg: #2b2410; --warn-line: #8a6d1c; --todo-bg: #6b5600; --todo-ink: #fff3c4;
  --z1: #1d3a52; --z2: #2c5c85; --z3: #4b86bd; --range: #ff8a52;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-body);
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
.measure { max-width: 66ch; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.eyebrow { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
mark.todo { background: var(--todo-bg); color: var(--todo-ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* Kopf */
.topbar { background: var(--deep); color: var(--deep-muted); font-size: .82rem; }
.topbar-in { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; padding-block: 7px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fcf8e; margin-right: 8px; vertical-align: 1px; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--deep); color: var(--deep-ink); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; display: flex; flex-direction: column; }
.brand-name small { font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--muted); }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--accent); }
@media (max-width: 720px) { .nav { order: 3; width: 100%; gap: 14px; } }

.crumbs { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .85rem; }
.crumbs ol { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin: 0 8px 0 4px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .98rem; }
.btn-call { background: var(--accent); color: var(--accent-ink); }
.btn-call:hover { filter: brightness(1.08); }
.btn-wa { background: transparent; color: var(--deep-ink); border: 2px solid var(--wa); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { background: var(--deep); color: var(--deep-ink); padding-block: 48px 52px; }
.hero-slim { padding-block: 40px; }
.hero .eyebrow { color: #7fc0ff; }
.hero-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lead { margin: 0; font-size: 1.08rem; color: var(--deep-muted); max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(255,255,255,.12); border-radius: var(--r); overflow: hidden; }
.facts > div { background: var(--deep); padding: 16px 18px; }
.facts dt { font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--deep-muted); }
.facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts dd small { font-size: .9rem; color: var(--deep-muted); }
.facts .dd-text { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.facts-wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Bänder */
.band { padding-block: 56px; }
.band-soft { background: var(--soft); }
.band > .wrap { display: flex; flex-direction: column; gap: 16px; }
.band p { margin: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.two-center { align-items: center; }
.two > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.source { font-size: .82rem; color: var(--muted); }

/* Tabellen */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl caption { text-align: left; padding: 14px 16px 6px; font-weight: 700; font-family: var(--font-display); }
.tbl th, .tbl td { padding: 10px 16px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.tbl thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; }
.tbl tbody th { font-weight: 600; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.plz { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.plz { white-space: normal; }
.is-rand td { color: var(--muted); }

/* Gebäudetypen */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.type ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }

/* Härteskala */
.scale { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.scale-bar { position: relative; height: 22px; border-radius: 6px; overflow: hidden; background: var(--z3); }
.scale-bar .z, .scale-bar .range { position: absolute; top: 0; bottom: 0; }
.z1 { background: var(--z1); } .z2 { background: var(--z2); } .z3 { background: var(--z3); }
.scale-bar .z1 { left: 0; }
.scale-bar .range { background: var(--range); top: 5px; bottom: 5px; border-radius: 4px; }
.scale-ticks { position: relative; height: 1.2em; font: .78rem var(--font-mono); color: var(--muted); }
.scale-ticks span { position: absolute; transform: translateX(-50%); }
.scale-ticks span:first-child { transform: none; }
.scale-ticks span:last-child { transform: translateX(-100%); }
.scale-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k.range { background: var(--range); }

/* Notfall */
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.alerts { display: flex; flex-direction: column; gap: 14px; }
.alerts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.alert { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.alert-h { font-weight: 700; }
.alert-n { font: 700 1.25rem var(--font-mono); font-variant-numeric: tabular-nums; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style-position: outside; }
.faq details p { padding: 0 18px 16px; color: var(--muted); }

/* Bezirke & Chips */
.districts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.district { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.district:hover { border-color: var(--accent); }
.district-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.district-meta { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.district-lage { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips .chip-all { background: var(--deep); color: var(--deep-ink); border-color: var(--deep); }
h2 a { color: inherit; }

/* Abschluss */
.cta { background: var(--deep); color: var(--deep-ink); padding-block: 44px; }
.cta-in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta p { margin: 6px 0 0; color: var(--deep-muted); }

.footer { padding-block: 40px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer-grid > * { min-width: 0; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font: 700 1.1rem var(--font-display); color: var(--ink); margin: 0 0 6px; }
.footer-op { margin: 0; line-height: 1.8; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-h { margin: 0; font-weight: 700; color: var(--ink); }
.footer-note { margin: 24px 0 0; font-size: .8rem; }

/* Anrufleiste auf dem Handy */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.callbar .btn { width: 100%; }
@media (min-width: 900px) { .callbar { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }

/* Zweispaltige Bänder: .band > .wrap setzt flex, hier gewinnt das Raster */
.band > .wrap.two { display: grid; }
.scale-ticks span { white-space: nowrap; }
@media (max-width: 720px) { .header .btn-sm { display: none; } }

/* Mehrstädtische Erweiterungen */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.service p { color: var(--muted); }
.service ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.service a { margin-top: auto; font-weight: 700; }
.service:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.type p { margin: 0; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.chips-static span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.notes { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.note p, .note ul { margin: 0; color: var(--muted); }
.note ul { padding-left: 18px; }
.band-soft .note, .band-soft .panel, .band-soft .service, .band-soft .type { background: var(--surface); }
.district-sub { font-size: .82rem; color: var(--muted); }
.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.kv { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-width: 820px; }
.kv > div { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 16px; background: var(--surface); padding: 12px 16px; }
.kv dt { font-weight: 700; } .kv dd { margin: 0; }
@media (max-width: 560px) { .kv > div { grid-template-columns: 1fr; gap: 4px; } }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: s; }
.process li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.process li::before { content: counter(s); font: 700 1.6rem var(--font-display); color: var(--accent); }
.process span { color: var(--muted); }
.footer-grid-4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid-4 { grid-template-columns: 1fr; } }
.hero h1 { max-width: 22ch; }

/* Bilder aus /wp-content/uploads/ */
:root { --logo-bg: #ffffff; }
.brand-logo { display: block; width: 176px; height: auto; max-width: 46vw; background: var(--logo-bg); border-radius: 8px; padding: 4px 8px; }
.photo { margin: 0; min-width: 0; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--soft); }
.photo-wide img { aspect-ratio: 21 / 9; }
.service-img { display: block; width: calc(100% + 40px); max-width: none; margin: -20px -20px 4px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r) var(--r) 0 0; background: var(--soft); }
.service { overflow: hidden; }
.legal { max-width: 820px; }
.legal h2 { font-size: 1.2rem; margin-top: 12px; }
.legal p { max-width: 72ch; }

/* Kontaktknöpfe: Anruf (Hauptaktion) und WhatsApp, überall gleich */
:root { --wa-ink: #ffffff; --tel-shadow: rgba(20, 99, 196, .35); --wa-shadow: rgba(17, 128, 74, .35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wa-ink: #04121f; --tel-shadow: rgba(0, 0, 0, .4); --wa-shadow: rgba(0, 0, 0, .4); } }
:root[data-theme="dark"] { --wa-ink: #04121f; --tel-shadow: rgba(0, 0, 0, .4); --wa-shadow: rgba(0, 0, 0, .4); }
.btn { min-height: 54px; padding: 8px 22px 8px 16px; gap: 12px; text-align: left; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn svg { flex: none; }
.btn-txt { display: flex; flex-direction: column; line-height: 1.15; }
.btn-label { font-weight: 800; font-size: 1rem; }
.btn-num { font-weight: 600; font-size: .8rem; opacity: .92; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.btn-call { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px var(--tel-shadow); }
.btn-wa { background: var(--wa); color: var(--wa-ink); border: 0; box-shadow: 0 8px 20px -8px var(--wa-shadow); }
.btn-call:hover, .btn-wa:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-sm { min-height: 42px; padding: 0 16px 0 12px; gap: 8px; font-size: .92rem; box-shadow: none; }
.btn-icon { width: 42px; padding: 0; justify-content: center; }
.header-cta { display: flex; gap: 8px; align-items: center; }
@media (max-width: 720px) { .header .header-cta { display: none; } }

/* Feste Leiste auf dem Handy: beide Wege mit einem Daumen erreichbar */
.callbar { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; box-shadow: 0 -6px 20px -10px rgba(0, 0, 0, .25); }
.callbar-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 8px 12px; border-radius: 14px; text-decoration: none; }
.callbar-btn span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.callbar-btn strong { font-size: 1rem; }
.callbar-btn small { font-size: .78rem; opacity: .92; font-variant-numeric: tabular-nums; }
.callbar-tel { background: var(--accent); color: var(--accent-ink); }
.callbar-wa { background: var(--wa); color: var(--wa-ink); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-call:hover, .btn-wa:hover { transform: none; } }
/* Leiste nur auf schmalen Bildschirmen; auf dem Handy volle Breite für die Hero-Knöpfe */
@media (min-width: 900px) { .callbar { display: none; } }
@media (max-width: 560px) { .hero .actions .btn, .cta .actions .btn, .hero-slim .actions .btn { flex: 1 1 100%; justify-content: flex-start; } }

/* Gruppen (Kreise, Stadtteile) auf Stadt- und Übersichtsseiten */
.group-h { margin: 28px 0 12px; font-size: 1.05rem; }
.group-h:first-of-type { margin-top: 8px; }
.group-h .muted { font-weight: 400; }
.services-compact .service { padding-top: 20px; }
.services-compact .service h3 { margin-top: 0; }
