/* ==========================================================================
   Naturschutzverein Erschwil – Stylesheet
   Mobile first. Breakpoints: 620px (Tablet), 960px (Desktop)
   ========================================================================== */

:root {
  --gruen-900: #12331f;
  --gruen-800: #1c4a2c;
  --gruen-700: #2a6b3e;
  --gruen-600: #38874f;
  --gruen-100: #e5efe6;
  --gruen-050: #f2f7f2;

  --herbst: #b5691c;
  --herbst-hell: #f6ece1;

  --text: #1e241f;
  --text-leise: #56605a;
  --linie: #d9e0d9;
  --flaeche: #ffffff;
  --grund: #f7f9f6;

  --radius: 10px;
  --radius-gross: 16px;
  --schatten: 0 1px 2px rgba(18, 51, 31, .06), 0 6px 20px rgba(18, 51, 31, .07);
  --schatten-stark: 0 2px 6px rgba(18, 51, 31, .1), 0 14px 40px rgba(18, 51, 31, .13);

  --breite: 1140px;
  --breite-text: 68ch;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --gruen-900: #d7e8da;
    --gruen-800: #b8dcc0;
    --gruen-700: #8fc99d;
    --gruen-600: #6fb682;
    --gruen-100: #1d2c22;
    --gruen-050: #16211a;

    --herbst: #e2a463;
    --herbst-hell: #2a2019;

    --text: #e6ebe6;
    --text-leise: #a3ada6;
    --linie: #2b352d;
    --flaeche: #161c17;
    --grund: #10150f;

    --schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
    --schatten-stark: 0 2px 6px rgba(0, 0, 0, .5), 0 14px 40px rgba(0, 0, 0, .45);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Lange Wörter (E-Mail-Adressen, Ortsnamen) sollen umbrechen statt die
     Seite auf schmalen Bildschirmen breiter zu machen. */
  overflow-wrap: break-word;
}

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

a { color: var(--gruen-700); text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { color: var(--gruen-600); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.2;
  color: var(--gruen-900);
  margin: 0 0 .5em;
  text-wrap: balance;
  font-weight: 600;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }

p, ul, ol { margin: 0 0 1.1em; }
li { margin-bottom: .35em; }

.container { width: min(100% - 2rem, var(--breite)); margin-inline: auto; }
@media (min-width: 620px) { .container { width: min(100% - 3rem, var(--breite)); } }

.lauftext { max-width: var(--breite-text); }
.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }
.mittig { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sprungmarke für Tastaturnutzung ---------------------------------------- */
.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 200;
  background: var(--gruen-800); color: #fff; padding: .6rem 1rem;
  border-radius: var(--radius); transition: top .15s;
}
.skip-link:focus { top: .5rem; }

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gruen-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Kopfbereich und Navigation
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--linie);
}

.topbar__inner {
  display: flex; align-items: center; gap: .75rem;
  min-height: 3.5rem;
}
@media (min-width: 620px) { .topbar__inner { min-height: 4rem; } }

/* overflow-wrap: normal hebt die globale Regel für Links auf – der
   Vereinsname darf nicht mitten im Wort umbrechen. */
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; margin-right: auto; overflow-wrap: normal;
}
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--serif); font-size: 1.02rem; font-weight: 600;
  color: var(--gruen-900); white-space: nowrap;
}
.brand__ort {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-leise); white-space: nowrap;
}
@media (max-width: 400px) {
  .brand img { width: 34px; height: 34px; }
  .brand__name { font-size: .95rem; }
  .brand__ort { font-size: .66rem; letter-spacing: .06em; }
  .nav-toggle { padding: .45rem .55rem; }
}
/* Ganz schmale Geräte: Knopf nur mit Symbol, damit der Vereinsname
   einzeilig bleibt. Für Screenreader bleibt die Beschriftung erhalten. */
@media (max-width: 359px) {
  .nav-toggle__text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}
@media (min-width: 620px) {
  .brand img { width: 44px; height: 44px; }
  .brand__name { font-size: 1.18rem; }
}

.nav-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: 1px solid var(--linie); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: .9rem; padding: .45rem .7rem; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle[aria-expanded="true"] .icon-menu,
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

.nav { display: none; }
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; text-decoration: none; color: var(--text);
  font-weight: 500; border-radius: var(--radius);
}
.nav__link[aria-current="page"], .nav__item--aktiv > .nav__link { color: var(--gruen-700); font-weight: 600; }

.suchknopf {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: none; color: var(--text); cursor: pointer; text-decoration: none;
}
.suchknopf svg { width: 19px; height: 19px; }
.suchknopf:hover { background: var(--gruen-050); color: var(--gruen-700); }

/* --- Mobil: Panel unter dem Kopfbereich --- */
@media (max-width: 959px) {
  /* Panel klappt direkt unter der Kopfleiste auf; .topbar ist sticky und
     damit der Bezugspunkt für die absolute Positionierung. */
  .nav {
    display: block;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100svh - 3.5rem);
    background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
    box-shadow: var(--schatten-stark);
    overflow-y: auto; overscroll-behavior: contain;
    padding: .5rem 1rem 1.5rem;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .nav[data-offen="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav > .nav__list { width: min(100%, var(--breite)); margin-inline: auto; }
  .nav > .nav__list > .nav__item { border-bottom: 1px solid var(--linie); }
  .nav__link { padding: .85rem .25rem; font-size: 1.08rem; }
  .nav__gruppe > summary {
    list-style: none; cursor: pointer; padding: .85rem .25rem; font-size: 1.08rem;
    font-weight: 500; display: flex; align-items: center; justify-content: space-between;
  }
  .nav__gruppe > summary::-webkit-details-marker { display: none; }
  .nav__gruppe > summary::after {
    content: ""; width: .5rem; height: .5rem; margin-right: .4rem;
    border-right: 2px solid var(--text-leise); border-bottom: 2px solid var(--text-leise);
    transform: rotate(45deg); transition: transform .18s;
  }
  .nav__gruppe[open] > summary::after { transform: rotate(-135deg); }
  .nav__unter { list-style: none; margin: 0 0 .6rem; padding: 0 0 0 .9rem; border-left: 2px solid var(--gruen-100); }
  .nav__unter .nav__link { padding: .6rem .25rem; font-size: 1rem; color: var(--text-leise); }
  .nav__unter .nav__link[aria-current="page"] { color: var(--gruen-700); }
}

/* --- Desktop: waagrechte Leiste mit Klappmenüs --- */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav { display: block; }
  .nav > .nav__list { display: flex; align-items: center; gap: .15rem; }
  .nav__item { position: relative; }
  .nav__link, .nav__gruppe > summary {
    padding: .5rem .7rem; font-size: .97rem; border-radius: var(--radius);
    cursor: pointer; white-space: nowrap; list-style: none;
  }
  .nav__link:hover, .nav__gruppe > summary:hover { background: var(--gruen-050); color: var(--gruen-700); }
  .nav__gruppe > summary {
    display: flex; align-items: center; gap: .3rem; font-weight: 500; color: var(--text);
  }
  .nav__gruppe > summary::-webkit-details-marker { display: none; }
  .nav__gruppe > summary::after {
    content: ""; width: .38rem; height: .38rem; margin-top: -.2em;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); opacity: .6;
  }
  .nav__gruppe[open] > summary { background: var(--gruen-050); color: var(--gruen-700); }
  .nav__unter {
    position: absolute; top: calc(100% + .4rem); left: 0; z-index: 60;
    min-width: 258px; list-style: none; margin: 0; padding: .4rem;
    background: var(--flaeche); border: 1px solid var(--linie);
    border-radius: var(--radius-gross); box-shadow: var(--schatten-stark);
  }
  .nav__unter .nav__link { padding: .55rem .7rem; font-size: .95rem; }
  .nav__unter .nav__link:hover { background: var(--gruen-050); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { position: relative; background: var(--gruen-900); overflow: hidden; }
.hero__bild {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 55%; opacity: .95;
}
/* Abdunkelung hinter der Schrift: das Foto bleibt rechts hell, links und
   unten hält der Verlauf den Kontrast zur weissen Schrift – auch über
   hellen Wolken. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 24, 14, .16) 0%, rgba(8, 24, 14, .02) 35%, rgba(8, 24, 14, .48) 100%),
    linear-gradient(90deg, rgba(8, 24, 14, .70) 0%, rgba(8, 24, 14, .58) 65%, rgba(8, 24, 14, .16) 92%, rgba(8, 24, 14, 0) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  padding: clamp(2.5rem, 1rem + 9vw, 6rem) 0 clamp(2rem, 1rem + 6vw, 4.5rem);
  color: #fff;
}
.hero__inner h1, .hero__inner p { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .55); }
.hero__inner h1 { max-width: 18ch; }
.hero__lead { font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem); max-width: 44ch; margin-bottom: 1.6rem; }
.hero__seit {
  display: inline-block; margin-bottom: 1rem;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  padding: .3rem .8rem; border-radius: 99px; color: #fff;
}
@media (prefers-color-scheme: dark) {
  .hero__bild { opacity: .72; }
}

/* Kleinerer Kopf für Unterseiten */
.seitenkopf {
  background: linear-gradient(160deg, var(--gruen-100), var(--gruen-050));
  border-bottom: 1px solid var(--linie);
  padding: clamp(1.6rem, 1rem + 3vw, 3rem) 0 clamp(1.4rem, 1rem + 2vw, 2.4rem);
}
.seitenkopf p { max-width: 62ch; margin-bottom: 0; color: var(--text-leise); font-size: 1.08rem; }
.brotkrumen { font-size: .85rem; color: var(--text-leise); margin-bottom: .5rem; }
.brotkrumen a { color: inherit; }

/* ==========================================================================
   Knöpfe
   ========================================================================== */

.knopf {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.15rem; border-radius: var(--radius);
  font-weight: 600; font-size: .97rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.knopf--voll { background: var(--gruen-700); color: #fff; }
.knopf--voll:hover { background: var(--gruen-800); color: #fff; }
.knopf--rand { border-color: currentColor; color: var(--gruen-700); background: transparent; }
.knopf--rand:hover { background: var(--gruen-050); }
/* Für Buttons auf dem Hero-Foto: Knopf bleibt hell und Schrift bleibt dunkel
   in beiden Farbmodi, da er auf dem Foto sitzt statt auf der Seitenfläche –
   var(--gruen-900) würde im Dark Mode zu hellem Grün und wäre auf dem
   hellen Knopf kaum lesbar. */
.knopf--hell { background: rgba(255, 255, 255, .95); color: #12331f; }
.knopf--hell:hover { background: #fff; color: #12331f; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (prefers-color-scheme: dark) {
  .knopf--voll { background: var(--gruen-700); color: var(--gruen-900); }
  .knopf--voll:hover { background: var(--gruen-600); color: var(--gruen-900); }
}

/* ==========================================================================
   Abschnitte, Raster, Karten
   ========================================================================== */

.abschnitt { padding: clamp(2.2rem, 1.4rem + 3vw, 4rem) 0; }
.abschnitt--getoent { background: var(--gruen-050); border-block: 1px solid var(--linie); }
.abschnitt__kopf { margin-bottom: 1.8rem; }
.abschnitt__kopf p { max-width: 60ch; color: var(--text-leise); margin-bottom: 0; }

.uebertitel {
  display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--herbst); font-weight: 700; margin-bottom: .4rem; font-family: var(--sans);
}

.raster { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 620px) { .raster--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .raster--seitlich { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; } }

.karte {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius-gross); overflow: hidden;
  display: flex; flex-direction: column;
}
.karte__bild { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.karte__body { padding: 1.15rem 1.25rem 1.35rem; flex: 1; display: flex; flex-direction: column; }
.karte__body > :last-child { margin-bottom: 0; }
.karte h3 { margin-bottom: .35rem; }
.karte p { color: var(--text-leise); font-size: .97rem; }
.karte__mehr { margin-top: auto; padding-top: .8rem; font-weight: 600; font-size: .94rem; text-decoration: none; }
.karte__mehr::after { content: " →"; }

a.karte { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.karte:hover { transform: translateY(-2px); box-shadow: var(--schatten); border-color: var(--gruen-600); }

.infobox {
  background: var(--herbst-hell); border: 1px solid color-mix(in srgb, var(--herbst) 30%, transparent);
  border-radius: var(--radius-gross); padding: 1.2rem 1.35rem;
}
.infobox > :last-child { margin-bottom: 0; }
.infobox h3 { color: var(--herbst); }

.faktenraster {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  list-style: none; padding: 0; margin: 0;
  overflow-wrap: anywhere; hyphens: auto;
}
@media (min-width: 780px) { .faktenraster { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.faktenraster li {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius-gross); padding: 1.1rem; text-align: center; margin: 0;
}
.faktenraster b {
  display: block; font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  color: var(--gruen-700); line-height: 1.1;
}
.faktenraster span { font-size: .88rem; color: var(--text-leise); }

/* ==========================================================================
   Inhaltsblöcke Textseiten
   ========================================================================== */

.inhalt { padding: clamp(2rem, 1.4rem + 2.5vw, 3.4rem) 0; }
.inhalt h2 { margin-top: 2.2rem; scroll-margin-top: 5rem; }
.inhalt h2:first-child { margin-top: 0; }
.inhalt h3 { margin-top: 1.6rem; scroll-margin-top: 5rem; }
.inhalt > p, .inhalt > ul, .inhalt > ol { max-width: var(--breite-text); }

.themenblock {
  border-top: 1px solid var(--linie);
  padding-top: 2rem; margin-top: 2.4rem;
  scroll-margin-top: 5rem;
}
.themenblock:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.themenblock > p, .themenblock > ul { max-width: var(--breite-text); }

/* minmax(0, 1fr) statt 1fr: sonst wächst die Spalte auf die Mindestbreite
   ihres Inhalts und schiebt schmale Bildschirme in den Seitwärtsscroll. */
.seiteninhalt-mit-rand { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .seiteninhalt-mit-rand { grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
  .randspalte { position: sticky; top: 5.5rem; }
}
.randspalte > * + * { margin-top: 1.2rem; }
.randbox {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius-gross); padding: 1.1rem 1.25rem; font-size: .95rem;
}
.randbox > :last-child { margin-bottom: 0; }
.randbox h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
.randbox ul { list-style: none; padding: 0; margin: 0; }
.randbox li { border-top: 1px solid var(--linie); padding: .5rem 0; margin: 0; }
.randbox li:first-child { border-top: 0; padding-top: 0; }

/* Inhaltsverzeichnis auf langen Seiten */
.seitenmenu { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.seitenmenu a {
  display: inline-block; text-decoration: none; font-size: .9rem;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 99px; padding: .35rem .85rem; color: var(--text);
}
.seitenmenu a:hover { border-color: var(--gruen-600); color: var(--gruen-700); }

/* ==========================================================================
   Galerie und Lightbox
   ========================================================================== */

.galerie {
  display: grid; gap: .8rem; margin: 1.5rem 0 0;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (min-width: 620px) { .galerie { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.galerie figure { margin: 0; }
.galerie a {
  display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--gruen-100); line-height: 0;
}
.galerie img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s; }
.galerie a:hover img { transform: scale(1.04); }
.galerie figcaption { font-size: .84rem; color: var(--text-leise); padding-top: .4rem; line-height: 1.35; }

.bildblock { margin: 1.5rem 0; }
.bildblock img { border-radius: var(--radius-gross); width: 100%; }
.bildblock figcaption { font-size: .88rem; color: var(--text-leise); padding-top: .5rem; }

dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%;
}
dialog.lightbox::backdrop { background: rgba(10, 16, 11, .92); }
.lightbox__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 1rem; gap: .8rem;
}
.lightbox__inner img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: 6px; }
.lightbox__text { color: #fff; font-size: .95rem; text-align: center; max-width: 60ch; }
.lightbox__zu {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox__blaettern {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; font-size: 1.3rem; cursor: pointer;
}
.lightbox__blaettern--zurueck { left: .6rem; }
.lightbox__blaettern--vor { right: .6rem; }

/* ==========================================================================
   Übersichtskarte der Einsatzorte
   ========================================================================== */

.flurkarte-figur { margin: 1.5rem 0 1.8rem; }
.flurkarte-figur figcaption {
  font-size: .85rem; color: var(--text-leise); padding-top: .6rem; max-width: 70ch;
}

.flurkarte {
  position: relative; line-height: 0;
  border: 1px solid var(--linie); border-radius: var(--radius-gross);
  overflow: hidden; background: var(--gruen-050);
}
.flurkarte img { width: 100%; }

.flurkarte__marker {
  position: absolute; transform: translate(-50%, -50%);
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 700 .82rem/1 var(--sans); color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.flurkarte__marker--matte { background: #1f6b36; }
.flurkarte__marker--weiteres { background: #b5691c; }

/* Massstabsbalken unten rechts – links unten sitzt ein Marker */
.flurkarte__massstab {
  position: absolute; right: .8rem; bottom: .9rem; height: 6px;
  background: rgba(255, 255, 255, .85); border: 1px solid rgba(0, 0, 0, .65);
  border-top: 0;
}
.flurkarte__massstab > span {
  position: absolute; right: 0; bottom: 8px;
  font: 600 .72rem/1 var(--sans); color: #1b1b1b; white-space: nowrap;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

.flurkarte__sammellink {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1rem; font-size: .92rem; font-weight: 600; text-decoration: none;
}

.flurkarte-legende { margin-top: .4rem; }
.flurkarte-legende h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.flurkarte__liste { list-style: none; padding: 0; margin: 0; }
.flurkarte__liste li {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .45rem 0; margin: 0; border-top: 1px solid var(--linie);
}
.flurkarte__liste li:first-child { border-top: 0; }
.flurkarte__nr {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem; color: #fff;
}
.flurkarte__nr--matte { background: #1f6b36; }
.flurkarte__nr--weiteres { background: #b5691c; }

@media (max-width: 480px) {
  .flurkarte__marker { width: 1.45rem; height: 1.45rem; font-size: .74rem; border-width: 1.5px; }
}

/* ==========================================================================
   Tabellen
   ========================================================================== */

.tabelle-rahmen {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--linie); border-radius: var(--radius-gross);
  background: var(--flaeche); margin-bottom: 1.2rem;
  max-height: 70vh; overflow-y: auto;
}
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
caption { text-align: left; padding: .8rem 1rem; color: var(--text-leise); font-size: .9rem; }
th, td { padding: .55rem .85rem; text-align: left; border-bottom: 1px solid var(--linie); white-space: nowrap; }
thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--gruen-100); color: var(--gruen-900);
  font-size: .86rem; letter-spacing: .02em;
}
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--gruen-050) 60%, transparent); }
tbody tr:hover { background: var(--gruen-100); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
td.leer { color: var(--text-leise); }
.tabelle-hinweis { font-size: .87rem; color: var(--text-leise); }

.tabellenfilter {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .8rem;
}
.tabellenfilter input {
  flex: 1 1 220px; max-width: 340px;
  padding: .55rem .8rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--flaeche); color: var(--text);
}
.tabellenfilter output { font-size: .88rem; color: var(--text-leise); }

/* ==========================================================================
   Termine
   ========================================================================== */

.termine { list-style: none; padding: 0; margin: 0; }
.termine li {
  display: grid; gap: .15rem 1.2rem;
  grid-template-columns: 1fr; align-items: baseline;
  padding: 1rem 0; border-top: 1px solid var(--linie); margin: 0;
}
@media (min-width: 620px) { .termine li { grid-template-columns: 190px 1fr; } }
.termine li:first-child { border-top: 0; }
.termin__datum { font-weight: 700; color: var(--gruen-800); font-variant-numeric: tabular-nums; }
.termin__zeit { display: block; font-weight: 400; font-size: .9rem; color: var(--text-leise); }
.termin__titel { font-weight: 600; }
.termin__info { font-size: .93rem; color: var(--text-leise); }
.marke {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .12rem .5rem; border-radius: 99px;
  vertical-align: .12em; margin-left: .4rem;
}
.marke--nve { background: var(--gruen-100); color: var(--gruen-800); }
.marke--region { background: var(--herbst-hell); color: var(--herbst); }
.marke--vorbei { background: var(--linie); color: var(--text-leise); }

/* ==========================================================================
   Beiträge / Aktuelles
   ========================================================================== */

.beitrag { border-top: 1px solid var(--linie); padding: 2rem 0; scroll-margin-top: 5rem; }
.beitrag:first-of-type { border-top: 0; padding-top: 0; }
.beitrag__datum { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--herbst); font-weight: 700; }
.beitrag h2 { margin-top: .2rem; }
.beitrag p, .beitrag ul { max-width: var(--breite-text); }

/* ==========================================================================
   Dokumentenliste
   ========================================================================== */

/* auto-fill statt fester Spaltenzahl: funktioniert auch in der schmalen
   Randspalte, ohne dort überzulaufen. */
.dokumente {
  list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.dokumente li { margin: 0; min-width: 0; }
.dokument {
  display: flex; gap: .9rem; align-items: flex-start; height: 100%;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius-gross); padding: 1rem 1.1rem;
  text-decoration: none; color: inherit;
}
.dokument:hover { border-color: var(--gruen-600); box-shadow: var(--schatten); }
.dokument > span { min-width: 0; }
.dokument__typ {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--gruen-100); color: var(--gruen-800);
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
}
.dokument__name { font-weight: 600; display: block; margin-bottom: .15rem; }
.dokument__meta { font-size: .87rem; color: var(--text-leise); }

/* ==========================================================================
   Suche
   ========================================================================== */

.suchfeld { display: flex; gap: .6rem; margin-bottom: 1rem; }
.suchfeld input[type="search"] {
  flex: 1; font: inherit; font-size: 1.05rem;
  padding: .8rem 1rem; border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--flaeche); color: var(--text); min-width: 0;
}
.suchfeld input[type="search"]:focus { border-color: var(--gruen-600); }

.suchfilter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.suchfilter button {
  font: inherit; font-size: .88rem; cursor: pointer;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 99px; padding: .35rem .9rem; color: var(--text);
}
.suchfilter button[aria-pressed="true"] {
  background: var(--gruen-700); border-color: var(--gruen-700); color: #fff;
}
@media (prefers-color-scheme: dark) {
  .suchfilter button[aria-pressed="true"] { color: var(--gruen-900); }
}

.suchstatus { color: var(--text-leise); font-size: .95rem; margin-bottom: 1rem; }
.treffer { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.treffer li { margin: 0; }
.treffer__karte {
  display: block; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius-gross); padding: 1rem 1.15rem;
  text-decoration: none; color: inherit;
}
.treffer__karte:hover { border-color: var(--gruen-600); box-shadow: var(--schatten); }
.treffer__pfad { display: block; font-size: .8rem; color: var(--text-leise); letter-spacing: .03em; }
.treffer__titel { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--gruen-800); margin: .2rem 0 .35rem; }
.treffer__text { font-size: .94rem; color: var(--text-leise); margin: 0; }
.treffer mark { background: color-mix(in srgb, var(--herbst) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 .1em; }
.treffer__art {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--herbst); margin-left: .5rem;
}

/* ==========================================================================
   Fussbereich
   ========================================================================== */

.fuss {
  background: var(--gruen-900); color: color-mix(in srgb, #fff 82%, transparent);
  padding: 2.6rem 0 1.5rem; margin-top: 3rem;
}
@media (prefers-color-scheme: dark) {
  .fuss { background: #0b120d; color: var(--text-leise); border-top: 1px solid var(--linie); }
}
.fuss a { color: #fff; text-decoration: none; }
@media (prefers-color-scheme: dark) { .fuss a { color: var(--gruen-800); } }
.fuss a:hover { text-decoration: underline; }
.fuss h2 { color: #fff; font-size: 1.05rem; font-family: var(--sans); font-weight: 700; margin-bottom: .7rem; }
@media (prefers-color-scheme: dark) { .fuss h2 { color: var(--text); } }
.fuss__raster { display: grid; gap: 1.8rem; }
@media (min-width: 620px) { .fuss__raster { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .fuss__raster { grid-template-columns: 1.4fr 1fr 1fr; } }
.fuss ul { list-style: none; padding: 0; margin: 0; }
.fuss li { margin-bottom: .4rem; font-size: .95rem; }
.fuss__unten {
  border-top: 1px solid rgba(255, 255, 255, .15);
  margin-top: 2rem; padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .88rem;
}
@media (prefers-color-scheme: dark) { .fuss__unten { border-top-color: var(--linie); } }

/* ==========================================================================
   Druck
   ========================================================================== */

@media print {
  .topbar, .fuss, .seitenmenu, .lightbox, .knopfzeile { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .tabelle-rahmen { max-height: none; overflow: visible; border: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
