/* ------------------------------------------------------------------
   Wassergewinnungsgemeinschaft „Auf Kotert" — oeffentliche Seite
   Schlichtes, handgepflegtes CSS. Keine Frameworks, keine externen
   Ressourcen (keine Web-Fonts o. ae.) -> nichts wird nachgeladen.
   ------------------------------------------------------------------ */

:root {
  --text: #1f2933;
  --text-leise: #5b6770;
  --akzent: #2c6e74;          /* ruhiges Wasser-/Teal-Gruen */
  --akzent-hell: #3f8a90;
  --flaeche: #f6f7f5;
  --rahmen: #e2e6e2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--akzent); }
a:hover { color: var(--akzent-hell); }

/* ====================  Startseite (Bild-Hero)  ==================== */

.hero-page { min-height: 100vh; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Hintergrundbild — Austausch hier in EINER Zeile moeglich: */
  background-image: url("hintergrund.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* dezenter dunkler Verlauf oben/unten fuer lesbare Schrift */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.10) 30%,
    rgba(0, 0, 0, 0.10) 60%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 1.5rem;
  color: #fff;
}

.wordmark {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.wordmark span { font-weight: 400; }

.hero__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  text-align: center;
}
.hero__footer nav { display: inline-flex; gap: 0.6rem; align-items: center; }
.hero__footer a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.hero__footer a:hover { text-decoration: underline; }
.hero__footer span { color: rgba(255, 255, 255, 0.7); }

/* ====================  Inhaltsseiten (Impressum/Datenschutz)  ==================== */

.doc-page {
  background: var(--flaeche);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.doc-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rahmen);
  background: #fff;
}
.doc-header a { text-decoration: none; font-size: 0.95rem; }

.doc {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.doc h1 { font-size: 1.8rem; margin: 0 0 1.5rem; }
.doc h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--text-leise); }
.doc p { margin: 0.5rem 0; }
.doc .firma { font-weight: 600; font-size: 1.05rem; }

.impressum-grafik {
  display: block;
  width: 100%;
  max-width: 340px;     /* Anzeigegroesse; die PNG ist fuer Schaerfe groesser gerendert */
  height: auto;
  margin: 0.75rem 0;
}

.hinweis {
  color: var(--text-leise);
  font-size: 0.9rem;
}

/* Download-Liste (interner Bereich) */
.downloads { list-style: none; padding: 0; margin: 1.25rem 0; }
.downloads li {
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.7rem;
}
.downloads a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--text);
}
.downloads a:hover { background: #fbfcfb; color: var(--akzent); }
.download__titel { font-weight: 600; }
.download__meta {
  color: var(--text-leise);
  font-size: 0.8rem;
  border: 1px solid var(--rahmen);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}

.doc-footer {
  border-top: 1px solid var(--rahmen);
  background: #fff;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}
.doc-footer a { text-decoration: none; }
.doc-footer span { color: var(--text-leise); margin: 0 0.4rem; }

/* ====================  Wasseranalysen (generiert aus TSV)  ==================== */

/* Zitat-Callout (kein Trinkwasser, § 14 Satzung) */
.wasser-zitat {
  border-left: 4px solid var(--akzent);
  background: var(--flaeche);
  padding: 0.7rem 1rem;
  margin: 1rem 0 1.75rem;
}
.wasser-zitat blockquote { margin: 0; font-style: italic; }
.wasser-zitat cite {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-leise);
  font-style: normal;
}

.analyse-disclaimer {
  margin: 1.2rem 0 0;
  padding: 0.7rem 0.9rem;
  background: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-leise);
}
.analyse-block { margin: 2.25rem 0; }
.analyse-block h2 { color: var(--text); font-size: 1.25rem; margin-bottom: 0.1rem; }

.analyse-meta { color: var(--text-leise); font-size: 0.88rem; margin: 0.1rem 0 0.6rem; }
.analyse-summary { margin: 0.3rem 0 0.9rem; }

table.analyse {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  overflow: hidden;
}
table.analyse th,
table.analyse td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rahmen);
  vertical-align: top;
}
table.analyse thead th {
  color: var(--text-leise);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--flaeche);
}
table.analyse tbody tr:last-child td { border-bottom: 0; }
table.analyse td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.analyse-quelle { color: var(--text-leise); font-size: 0.78rem; }

/* Aufklappbarer Erklärtext: Stoffname (ⓘ) bzw. „nicht nachweisbar“-Badge wird zum
   Umschalt-Button; der Text folgt in einer eigenen Zeile über die volle Breite (.info-row). */
.info-toggle { font: inherit; cursor: pointer; }
.name-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
}
.name-toggle::after {
  content: "ⓘ";
  color: var(--akzent);
  font-size: 0.85em;
  margin-left: 0.35rem;
  vertical-align: baseline;
}
.name-toggle[aria-expanded="true"] { font-weight: 600; }
/* „nicht nachweisbar“: Badge bleibt optisch ein Badge, ist aber klickbar */
.badge-toggle::after { content: "ⓘ"; margin-left: 0.3rem; font-size: 0.9em; }

/* Erklärtext-Zeile: volle Breite, gut lesbare Spaltenbreite */
.info-body {
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--text-leise);
  line-height: 1.5;
  max-width: 70ch;
}
.info-body p { margin: 0.3rem 0; }
.info-body p:first-child { margin-top: 0; }
.info-body p:last-child { margin-bottom: 0; }

/* Ampel: farbige Zeilenmarkierung (linke Kante) + dezente Zeilentönung bei gelb/rot */
table.analyse td:first-child { border-left: 4px solid transparent; }
tr.ampel-gruen   td:first-child { border-left-color: #2f9e54; }
tr.ampel-gelb    td:first-child { border-left-color: #e0b53a; }
tr.ampel-rot     td:first-child { border-left-color: #d2553f; }
tr.ampel-neutral td:first-child { border-left-color: #c4cacd; }
tr.ampel-gelb td { background: #fdf8e7; }
tr.ampel-rot  td { background: #fbeeeb; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge a { color: inherit; text-decoration: underline dotted; }
/* farbiger Ampel-Punkt vor dem Text – sichtbar unabhängig vom Hintergrund */
.badge::before { content: "\25CF"; margin-right: 0.35rem; }
.badge--gruen   { background: #e3f0e4; color: #1f6b3b; border-color: #bcdcc3; }
.badge--gruen::before   { color: #2f9e54; }
.badge--gelb    { background: #fbf2d6; color: #856414; border-color: #ecd99a; }
.badge--gelb::before    { color: #e0a90f; }
.badge--rot     { background: #fbe2de; color: #9a2f1f; border-color: #f0c2b8; }
.badge--rot::before     { color: #d2553f; }
.badge--neutral { background: #eef0f1; color: var(--text-leise); border-color: #dfe3e5; }
.badge--neutral::before { color: #aeb4b8; }

/* Inhaltsübersicht oben (Sprunglinks – v. a. für Mobilgeräte) */
.analyse-toc {
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  background: var(--flaeche);
  padding: 0.7rem 1rem;
  margin: 1.25rem 0 1.75rem;
}
.analyse-toc h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-leise);
  margin: 0 0 0.4rem;
}
.analyse-toc ul { margin: 0; padding-left: 1.1rem; }
.analyse-toc ul ul { margin: 0.15rem 0 0.4rem; }
.analyse-toc li { margin: 0.15rem 0; }

/* Untergruppe: Überschrift + feste Einleitung (Rahmen) über der Tabelle */
.analyse-gruppe { margin: 1.5rem 0; }
.analyse-gruppe > h3 { font-size: 1.05rem; color: var(--text); margin: 0 0 0.4rem; }
.gruppe-einleitung {
  border-left: 4px solid var(--akzent);
  background: var(--flaeche);
  padding: 0.6rem 0.9rem;
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  color: var(--text);
}
.gruppe-einleitung h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.gruppe-einleitung p { margin: 0.3rem 0; }
.gruppe-einleitung p:first-child { margin-top: 0; }
.gruppe-einleitung p:last-child { margin-bottom: 0; }
.analyse-quellen { font-size: 0.85rem; }
.analyse-download { font-size: 0.9rem; margin: 0.6rem 0 0; }

/* Übersichtsseite: eine Karte je Analyse */
.analyse-cards { display: grid; gap: 0.8rem; margin: 1.5rem 0; }
.analyse-card {
  display: block;
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  background: #fff;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
}
.analyse-card:hover { border-color: var(--akzent); background: var(--flaeche); }
.analyse-card__kopf {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
}
.analyse-card__titel { display: block; font-weight: 600; color: var(--text); }
.analyse-card__text {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--text-leise);
}
.analyse-card__mehr { display: block; margin-top: 0.5rem; font-size: 0.85rem; color: var(--akzent); }
