/* Tourenwart - Stylesheet. Bewusst ohne Webfonts, Frameworks oder CDN: alles
   kommt vom eigenen Server (Datenschutzerklaerung: nichts wird von Dritten
   nachgeladen, tests/test_web.py haelt das fest). */

:root {
  --gruen: #2d6a3e; --gruen-dunkel: #1c4a2b; --gruen-hell: #eaf3ec;
  --akzent: #f0a53c; --akzent-dunkel: #d88f26;
  --rand: #e1e6e3; --text: #1b2420; --grau: #5d6862; --bg: #f3f6f4;
  --archiv: #8a6d3b; --archiv-bg: #fdf7ea; --archiv-rand: #eddcb5;
  --radius: 14px; --radius-klein: 10px;
  --schatten: 0 1px 2px rgba(20, 40, 30, .06), 0 6px 18px rgba(20, 40, 30, .06);
  --schatten-hover: 0 2px 4px rgba(20, 40, 30, .08), 0 14px 30px rgba(20, 40, 30, .13);
  --schrift: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--schrift); color: var(--text); background: var(--bg); }
a { color: var(--gruen); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 70%, #fff); outline-offset: 2px; }

/* --- Hero ------------------------------------------------------------- */
.hero { position: relative; color: #fff; background: #123524 center / cover no-repeat; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 26, 18, .72) 0%, rgba(7, 26, 18, .38) 55%, rgba(7, 26, 18, .12) 100%),
    linear-gradient(180deg, rgba(7, 26, 18, .35) 0%, rgba(7, 26, 18, 0) 40%, rgba(7, 26, 18, .45) 100%);
}
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 2.4rem 1.5rem 4.6rem; }
.hero .marke {
  margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.025em;
}
.hero .marke a { color: inherit; text-decoration: none; }
.beta {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .28rem .7rem; border-radius: 99px; color: #fff;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .5);
  backdrop-filter: blur(4px); align-self: center;
}
.hero-claim { margin: .7rem 0 0; font-size: clamp(1.1rem, 2.4vw, 1.55rem); font-weight: 500; max-width: 38rem; text-wrap: balance; }
.hero-hinweis { margin: 1rem 0 0; font-size: .86rem; opacity: .88; max-width: 38rem; }

.hero--klein .hero-inner { padding: 1.3rem 1.5rem 1.5rem; }
.hero--klein .marke { font-size: clamp(1.5rem, 3.4vw, 2rem); }
.hero--klein .hero-claim { font-size: 1rem; margin-top: .3rem; }
.hero--klein .hero-hinweis { margin-top: .5rem; }

.hero-suche { display: flex; gap: .6rem; margin-top: 1.6rem; max-width: 40rem; }
.hero-suche input[type=text] {
  flex: 1; min-width: 0; padding: .95rem 1.1rem; font-size: 1.02rem; border: 0;
  border-radius: var(--radius); background: #fff; color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}
.hero-suche button { padding: .95rem 1.5rem; font-size: 1rem; font-weight: 700; background: var(--akzent); color: #1d1a12; border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.hero-suche button:hover { background: var(--akzent-dunkel); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Layout ----------------------------------------------------------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.kennzahlen {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding: 1rem 1.4rem; margin: -3.1rem 0 1.4rem;
  position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten);
  font-size: .84rem; color: var(--grau);
}
.kennzahlen b { display: block; font-size: 1.3rem; line-height: 1.2; color: var(--text); letter-spacing: -.01em; }
.kennzahlen .warn b { color: var(--archiv); }

/* --- Filter ----------------------------------------------------------- */
form.filter {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; align-items: end;
  padding: 1.2rem; margin-bottom: 1.2rem; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten);
}
form.filter label { font-size: .76rem; font-weight: 600; color: var(--grau); display: block; margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .04em; }
input[type=text], select {
  width: 100%; padding: .62rem .75rem; border: 1px solid var(--rand); border-radius: var(--radius-klein);
  font: inherit; font-size: .93rem; background: #fff; color: var(--text);
}
input[type=text]:focus, select:focus { border-color: var(--gruen); }
.checkgroups { grid-column: 1 / -1; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.checkfeld { flex: 1; min-width: 240px; }
.checkgroup { border: 1px solid var(--rand); border-radius: var(--radius-klein); background: #fafcfb; max-height: 200px; overflow-y: auto; padding: .55rem .75rem; }
.checkgroup fieldset { border: 0; margin: 0 0 .6rem; padding: 0; }
.checkgroup fieldset:last-child { margin-bottom: 0; }
.checkgroup legend { font-weight: 700; font-size: .76rem; color: var(--gruen-dunkel); padding: 0; margin-bottom: .15rem; }
.checkgroup .checkitem, .checkitem.alle { display: flex; align-items: center; gap: .45rem; padding: .18rem 0; font-size: .87rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; margin: 0; }
.checkitem.alle { margin-bottom: .35rem; font-weight: 600; }
.checkitem input { margin: 0; flex-shrink: 0; accent-color: var(--gruen); }

.aktionen { grid-column: 1 / -1; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
button { font: inherit; background: var(--gruen); color: #fff; border: 0; padding: .65rem 1.3rem; border-radius: var(--radius-klein); font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; }
button:hover { background: var(--gruen-dunkel); }
button:active { transform: translateY(1px); }
a.reset { color: var(--grau); font-size: .88rem; }
form.filter .check { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .88rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--grau); }
form.filter .check input { accent-color: var(--gruen); }

.anzahl { color: var(--grau); font-size: .92rem; margin: 1.6rem 0 .8rem; font-weight: 600; }

/* --- Karten ----------------------------------------------------------- */
.karte { padding: 1.05rem 1.3rem; margin-bottom: .8rem; background: #fff; border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--schatten); transition: box-shadow .18s, transform .18s; }
.karte:hover { box-shadow: var(--schatten-hover); transform: translateY(-2px); }
.karte.archiv { background: var(--archiv-bg); border-color: var(--archiv-rand); box-shadow: none; }
.karte h2 { margin: 0 0 .35rem; font-size: 1.1rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.karte h2 a { color: var(--text); text-decoration: none; }
.karte h2 a:hover { color: var(--gruen); text-decoration: underline; text-underline-offset: 3px; }
.meta { font-size: .88rem; color: var(--grau); display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.meta span:first-child { font-weight: 600; color: var(--text); }
.tags { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .76rem; font-weight: 500; padding: .2rem .65rem; border-radius: 99px; background: var(--gruen-hell); color: var(--gruen-dunkel); border: 1px solid #cfe2d4; }
.tag.schwer { background: #fdecea; color: #a4322a; border-color: #f3cdc8; }
.tag.archiv { background: #f5e8cd; color: var(--archiv); border-color: #e6d3a8; }
.tag.grau { background: #f0f3f1; color: var(--grau); border-color: var(--rand); }
.tag.region { background: #e8f0fa; color: #1f4f82; border-color: #c5daf0; font-weight: 600; }
.quelle { font-size: .78rem; color: var(--grau); margin-top: .55rem; }
.quelle a { color: var(--grau); }

.blaettern { display: flex; gap: .6rem; align-items: center; justify-content: center; margin: 1.8rem 0; font-size: .92rem; flex-wrap: wrap; }
.blaettern a { color: var(--gruen-dunkel); text-decoration: none; font-weight: 600; padding: .5rem 1rem; border-radius: 99px; background: #fff; box-shadow: var(--schatten); }
.blaettern a:hover { box-shadow: var(--schatten-hover); }
.leer { text-align: center; padding: 3rem 1rem; color: var(--grau); }

/* --- Footer / Textseiten ---------------------------------------------- */
footer { border-top: 1px solid var(--rand); margin-top: 2.2rem; padding: 1.4rem 0 .5rem; font-size: .82rem; color: var(--grau); }
footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .6rem; }
footer nav a { color: var(--gruen); font-weight: 600; }
.kein-offiziell { font-weight: 600; color: var(--text); }

.text { max-width: 46rem; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.6rem 1.8rem; }
.text h1 { margin-top: 0; }
.text h2 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.text p, .text li { line-height: 1.6; }
.text .platzhalter { background: #fff3cd; padding: 0 .25rem; border-radius: 3px; }

/* --- Kleinigkeiten statt Inline-Styles (die CSP verbietet style="...") ---- */
.seitentitel { font-size: 1.4rem; }
.mehrzeilig { white-space: pre-line; }
.hinweis-klein { color: #999; }

/* --- Landingpages / Stoebern ------------------------------------------- */
.landing-h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
.landing-text { margin: 0 0 1.2rem; color: var(--grau); max-width: 46rem; }
.stoebern { margin: 2rem 0 0; padding: 1.2rem 1.4rem; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); }
.stoebern h2 { font-size: 1rem; margin: 0 0 .6rem; }
.stoebern h3 { font-size: .8rem; margin: .9rem 0 .3rem; color: var(--gruen-dunkel); text-transform: uppercase; letter-spacing: .04em; }
.stoebern ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.stoebern a { display: inline-block; padding: .25rem .7rem; border-radius: 99px; background: var(--gruen-hell); color: var(--gruen-dunkel); text-decoration: none; font-size: .85rem; border: 1px solid #cfe2d4; }
.stoebern a:hover { background: #dcebdf; }

/* --- Schmale Bildschirme ---------------------------------------------- */
@media (max-width: 640px) {
  .hero-inner { padding: 1.6rem 1rem 4.2rem; }
  .hero--klein .hero-inner { padding: 1rem; }
  .hero-suche { flex-direction: column; }
  .hero-suche button { width: 100%; }
  .wrap { padding: 1rem; }
  .kennzahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 1rem; padding: 1rem; margin-top: -2.8rem; }
  .text { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .karte, button { transition: none; }
  .karte:hover { transform: none; }
}
