/* ============================================================================
   adler.css – Gemeinsames Stylesheet der Website Schullandheim Adler
   Design "Bergwiese". Wird von JEDER Seite eingebunden.

   Grundregel: Jedes Objekt wird hier GENAU EINMAL beschrieben. Was auf mehreren
   Seiten gleich aussieht, nutzt denselben Klassennamen und denselben Stil.
   Bausteine, die es nur auf EINER Seite gibt, sind mit "Nur auf …" kommentiert.

   Die reinen Formular-Stile stehen separat in formular.css (nur die beiden
   Anfrageformulare binden sie zusätzlich ein).
   ========================================================================== */

/* --- 1. Farbwelt & Grundlagen ------------------------------------------- */
:root {
  --wiese: #f0f7ee;
  --gruen: #3a7d44;
  --gruen-tief: #24512c;
  --sonne: #f4b400;
  --sonne-dunkel: #c78f00;
  --text: #2b332c;
  --fehler: #b3261e;   /* nur in formular.css genutzt, hier zentral definiert */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Trebuchet MS", Verdana, system-ui, sans-serif;
  background: var(--wiese);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
}
p { margin: .7rem 0; }
a { color: var(--gruen); }

/* Sprung-Link "Zum Inhalt" – erst beim Tastatur-Fokus sichtbar */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gruen-tief); color: #fff; padding: .6em 1em; z-index: 99;
}
.skip-link:focus { left: 0; }

/* Nur fuer Screenreader (optisch versteckt) – z. B. Hinweis "oeffnet in neuem Tab" */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* --- 2. Kopf & Hauptnavigation ------------------------------------------ */
header { background: var(--gruen); border-bottom: 6px solid var(--sonne); }
.kopf {
  max-width: 1080px; margin: 0 auto; padding: 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: #fff;
}
.kopf img { height: 64px; width: auto; background: #fff; border-radius: 50%; padding: 6px; }
.kopf .marke { font-size: 1.4rem; font-weight: 700; }
.kopf .marke small { display: block; font-size: .85rem; font-weight: 400; color: #d8ecd8; }
nav.haupt { background: var(--gruen-tief); }
nav.haupt ul {
  max-width: 1080px; margin: 0 auto; padding: .5rem 1rem;
  list-style: none; display: flex; gap: .5rem; flex-wrap: wrap;
}
nav.haupt a {
  display: block; padding: .5em 1.1em; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600;
}
nav.haupt a:hover, nav.haupt a:focus { background: var(--sonne); color: var(--gruen-tief); }
nav.haupt a[aria-current="page"] { background: #fff; color: var(--gruen-tief); }
/* Dunkles Kopfband ohne Menue (z. B. Formular-Ergebnisseiten): ersetzt optisch
   die Nav-Leiste, damit der Kopf nicht abrupt endet. */
.kopfband { background: var(--gruen-tief); height: 2.75rem; }

/* Warn-/Fehler-Ergebnisseiten: Eingabefehler = warnung (bernstein),
   technischer Fehler = fehler (rot). Nur auf diesen Seiten. */
h1.warnkopf { display: flex; align-items: center; gap: .5rem; }
h1.warnkopf svg { width: 1.3em; height: 1.3em; flex: none; }
.meldebox { border-radius: 14px; padding: 1rem 1.3rem 1.1rem; margin: 1.2rem 0; border-left: 8px solid; }
.meldebox > :first-child { margin-top: 0; }
.meldebox > :last-child  { margin-bottom: 0; }
.seite-warnung h1 { color: #9a6700; }
.seite-warnung .meldebox { background: #fff6df; border-color: var(--sonne); color: #5c4300; }
.seite-fehler h1 { color: #b02a1c; }
.seite-fehler .meldebox { background: #fce9e7; border-color: #c0392b; color: #7a231a; }

/* --- 3. Inhaltsbereich & Brotkrumen ------------------------------------- */
.inhalt { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.inhalt.schmal { max-width: 880px; }   /* Nur auf den Anfrageformularen: schmaler = besser lesbare Formulare */
.brotkrumen { font-size: .92rem; margin-bottom: 1.5rem; }
.brotkrumen ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; }
.brotkrumen li + li::before { content: "›"; margin-right: .3rem; color: var(--gruen); }
.brotkrumen a { color: var(--gruen-tief); }

/* --- 4. Überschriften --------------------------------------------------- */
h1 { color: var(--gruen-tief); font-size: 2.1rem; line-height: 1.25; margin-bottom: .8rem; }
h2 { color: var(--gruen-tief); font-size: 1.5rem; margin: 2.5rem 0 .8rem; }
h3 { color: var(--gruen); font-size: 1.15rem; margin: 1.2rem 0 .4rem; }

/* Akzent-Überschrift: Symbol im grünen Kästchen, feine grüne Linie darunter */
h2.akzent-kopf { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid #cfe0c6; padding-bottom: .5rem; }
h2.akzent-kopf svg { width: 1.5rem; height: 1.5rem; color: var(--gruen); background: #e3efdc; padding: .35rem; border-radius: 10px; box-sizing: content-box; flex: 0 0 auto; }

/* --- 5. Gemeinsame Bausteine -------------------------------------------- */
/* Kernsatz: hervorgehobene Kernaussage mit gelbem Balken links */
.kernsatz {
  background: #fff; border-left: 6px solid var(--sonne);
  padding: 1rem 1.3rem; border-radius: 0 12px 12px 0; margin: 1.2rem 0;
  font-size: 1.1rem;
}
/* Info-Kasten mit grünem Rahmen */
.hinweis {
  background: #fff; border: 2px solid var(--gruen); border-radius: 12px;
  padding: 1rem 1.3rem; margin: 1.5rem 0;
}
.hinweis strong { color: var(--gruen-tief); }
.hinweis p + p { margin-top: .7rem; }
.hinweis > :first-child { margin-top: 0; }
.hinweis > :last-child { margin-bottom: 0; }
/* "Auf dieser Seite"-Sprungnavigation */
.sprungnav {
  background: #fff; border-radius: 12px; padding: .8rem 1.2rem; margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(30,60,35,.1);
}
.sprungnav strong { color: var(--gruen-tief); }
.sprungnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .4rem; margin-top: .3rem; }
.sprungnav a {
  display: block; padding: .3em .8em; border-radius: 999px;
  color: var(--gruen-tief); text-decoration: none; font-weight: 600; background: var(--wiese);
}
.sprungnav a:hover, .sprungnav a:focus { background: var(--sonne); }
/* Aufzählungsliste im Fließtext */
ul.liste { margin: .5rem 0 .5rem 1.3rem; }
ul.liste li { margin: .3rem 0; }
/* Farbig unterlegte Hervorhebung im Text */
.betont { background: #fff7dd; border-radius: 6px; padding: 0 .35em; font-weight: 700; }
/* Gelber Aktionsknopf */
.knopf {
  display: inline-block; background: var(--sonne); color: var(--gruen-tief);
  font-weight: 700; padding: .7em 1.4em; border-radius: 999px; text-decoration: none;
  box-shadow: 0 3px 0 var(--sonne-dunkel); margin: .3rem .4rem .3rem 0;
}
.knopf:hover, .knopf:focus { transform: translateY(2px); box-shadow: 0 1px 0 var(--sonne-dunkel); }
/* Postanschrift nicht kursiv */
address { font-style: normal; }
/* Kleiner, gedämpfter Zusatztext */
.klein { font-size: .92rem; color: #4b584d; }
/* Spamschutz: dieses Stück Adresse sehen nur Ernte-Programme, nie Menschen */
.spamfalle { display: none; }

/* Zwei Spalten: links Text, rechts der zweite Inhalt – ein Bild-Wechsler
   (.wechsel), eine Galerie oder ein weiterer Textblock. Bilder gehören immer
   in eine .wechsel-figure: die gibt Rahmen und Darstellung und wird bei
   mehreren Bildern automatisch zum Bilderwechsel. */
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }

/* Bildergalerie mit drei Spalten (Seiten "Das Haus" und "Die Küche") */
.galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 1.2rem 0; }
.galerie figure { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(30,60,35,.12); }
.galerie img { width: 100%; height: 200px; object-fit: cover; display: block; }
.galerie figcaption { padding: .6rem 1rem .8rem; font-size: .95rem; color: var(--gruen-tief); font-weight: 600; }

/* Objektkarten: für einzelne Gegenstände (Wasserspender, Gästetelefon …).
   Im Gegensatz zu .galerie (cover, beschneidet) zeigt object-fit:contain das
   GANZE Objekt – nichts wird abgeschnitten. Die Karten bleiben klein und
   einheitlich und funktionieren einzeln wie in einer Reihe. Weißer Grund. */
/* 3–4 Karten pro Reihe: über die volle Breite verteilt (space-between). Die
   Kartengröße (max 240px) ist so gewählt, dass bei voller Breite 4 Stück passen
   und die Reihe füllen. */
.objekte { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 240px)); gap: 1.2rem; margin: 1.2rem 0; justify-content: space-between; }
/* Sonderfall: sobald nur noch 2 (oder 1) Karten pro Reihe passen (bei dieser
   Kartengröße ab ≤ 790px Fensterbreite – von Stefan gemessen), NICHT über die
   volle Breite spreizen. Stattdessen die Rasterbreite deckeln = 2 Karten (2×240)
   + Maximalabstand (140px) = 620px. Dadurch hat der Abstand ein Maximum von ~140px
   und schrumpft beim weiteren Zusammenschieben mit – nie so weit, dass eine dritte
   Karte dazwischen zu passen scheint. (Geht nur über die Fensterbreite; CSS kann
   „genau 2 Karten" nicht direkt erkennen.) */
@media (max-width: 790px) { .objekte { max-width: 620px; } }
.objektkarte { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(30,60,35,.12); }
.objektkarte img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.objektkarte figcaption { padding: .6rem 1rem .8rem; font-size: .95rem; color: var(--gruen-tief); font-weight: 600; text-align: center; }
/* Layout "Text neben Objektkarte": Der Text nimmt den GANZEN restlichen Platz
   ein (1fr), die Objektkarte behält ihre feste kleine Breite – anders als
   .zweispaltig (zwei gleich breite Hälften). Für Einzelobjekte neben Fließtext. */
.text-objekt { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.text-objekt .objektkarte { width: 260px; max-width: 100%; }
.text-objekt > :first-child, .text-objekt > :first-child > :first-child { margin-top: 0; }   /* Textseite oben bündig mit der Karte */

/* "Zurück zu Das Allgäu"-Link auf den Allgäu-Unterseiten */
.zurueck { display: inline-block; margin-top: 2rem; font-weight: 700; color: var(--gruen-tief); }

/* --- 6. Nur auf einzelnen Seiten genutzte Bausteine --------------------- */

/* Nur auf 81-wir.html: Begrüßung mit Wappen in einer schmalen Spalte rechts.
   Eigener Name (nicht .zweispaltig), weil die rechte Spalte fest 200px breit
   ist – Text neben einer festen Wappenspalte, kein gleichbreites 2-Spalten-Layout. */
.vorstellung { display: grid; grid-template-columns: 1fr 200px; gap: 1.5rem; align-items: center; margin: 1rem 0 1.5rem; }
.vorstellung .wappen { justify-self: center; }
.vorstellung .wappen img { width: 170px; height: auto; }
.unterschrift { text-align: center; font-size: 1.4rem; font-style: italic; color: var(--gruen-tief); margin-top: 2rem; }

/* Nur auf 01-start.html: Willkommens-Kopf, Themen-Kacheln, Begrüßungsband */
.willkommen { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1rem 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.willkommen h1 { font-size: 2.2rem; color: var(--gruen-tief); line-height: 1.25; }
.willkommen h1 span { color: var(--sonne-dunkel); }
.willkommen p { margin: 1rem 0 1.4rem; }
.willkommen img { width: 100%; height: auto; border-radius: 18px; border: 5px solid #fff; box-shadow: 0 8px 20px rgba(30,60,35,.25); transform: rotate(1.5deg); }
.kacheln { max-width: 1080px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.kacheln h2 { color: var(--gruen-tief); font-size: 1.6rem; margin-bottom: 1.2rem; }
.raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.kachel { background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 3px 10px rgba(30,60,35,.12); display: block; transition: transform .15s; }
.kachel:hover, .kachel:focus { transform: translateY(-4px); outline-color: var(--gruen); }
.kachel img { width: 100%; height: 130px; object-fit: cover; display: block; }
.kachel strong { display: block; padding: .7rem 1rem .9rem; color: var(--gruen-tief); font-size: 1.05rem; }
.band { background: #fff; }
.band-innen { max-width: 1080px; margin: 0 auto; padding: 2rem 1rem; display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.band-innen p { flex: 1; min-width: 260px; }

/* Nur auf 31-allgaeu.html: Themen-Schaufenster (Kacheln zu den Unterseiten) */
.themen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; }
.thema { display: block; background: #fff; border-radius: 16px; padding: 1.4rem 1.6rem; text-decoration: none; color: var(--text); box-shadow: 0 3px 10px rgba(30,60,35,.12); transition: transform .15s; border-top: 6px solid var(--sonne); }
.thema:hover, .thema:focus { transform: translateY(-4px); outline-color: var(--gruen); }
.thema h2 { color: var(--gruen-tief); font-size: 1.35rem; margin: 0 0 .4rem; }
.thema p { margin: 0; }
.thema .pfeil { display: inline-block; margin-top: .8rem; font-weight: 700; color: var(--gruen); }

/* Nur auf 32-erlebnis.html: Karten für die einzelnen Ausflugsziele (Hündle,
   Alpsee-Coaster, Kletterwald usw.) mit gelbem Balken oben */
.ziel { background: #fff; border-radius: 16px; padding: 1.3rem 1.6rem; margin: 1.3rem 0; box-shadow: 0 3px 10px rgba(30,60,35,.12); border-top: 6px solid var(--sonne); }
.ziel h2 { margin-top: 0; }

/* Nur auf 41-preise.html: Preistabelle, Formular-Auswahlkacheln, Preisstand */
.formwahl { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.formkachel { display: block; background: #fff; border-radius: 16px; padding: 1.5rem 1.8rem; text-decoration: none; color: var(--text); box-shadow: 0 3px 10px rgba(30,60,35,.12); transition: transform .15s; border-top: 6px solid var(--sonne); }
.formkachel:hover, .formkachel:focus { transform: translateY(-4px); outline-color: var(--gruen); }
.formkachel strong { display: block; font-size: 1.25rem; color: var(--gruen-tief); margin-bottom: .4rem; }
.formkachel span.pfeil { display: inline-block; margin-top: .8rem; font-weight: 700; color: var(--gruen); }
table { border-collapse: collapse; margin: 1rem 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(30,60,35,.1); }
caption { caption-side: top; text-align: left; font-weight: 700; color: var(--gruen-tief); padding: .4rem 0; }
th, td { padding: .6rem 1.2rem; text-align: left; }
thead th { background: var(--gruen-tief); color: #fff; }
tbody tr:nth-child(even) { background: var(--wiese); }
.stand { font-size: .92rem; color: #5c6b5e; }

/* Nur auf 51-kontakt.html: Kontakt-Karten, große Kontaktzeile, Anfahrtsskizze */
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1rem 0; }
.karte { background: #fff; border-radius: 14px; padding: 1.2rem 1.4rem; box-shadow: 0 2px 8px rgba(30,60,35,.1); }
.karte h3 { margin-top: 0; }
.gross { font-size: 1.15rem; font-weight: 700; color: var(--gruen-tief); }
.skizze { text-align: center; margin: 1.2rem 0; }
.skizze img { max-width: 100%; height: auto; border-radius: 12px; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(30,60,35,.2); }

/* Nur auf 82-links.html: Link-Karten-Raster, hervorgehobene Karte, Haftungshinweis */
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.linkkarte { background: #fff; border-radius: 14px; padding: 1rem 1.3rem; box-shadow: 0 2px 8px rgba(30,60,35,.1); }
.linkkarte a.titel { font-weight: 700; color: var(--gruen-tief); font-size: 1.1rem; text-decoration: none; }
.linkkarte a.titel:hover, .linkkarte a.titel:focus { text-decoration: underline; }
.linkkarte a.titel::after { content: " ↗"; font-size: .85em; color: var(--gruen); }
.linkkarte p { font-size: .95rem; margin-top: .3rem; }
.linkkarte p + p { margin-top: .6rem; }
.linkkarte.breit { grid-column: 1 / -1; }
.featured { background: linear-gradient(135deg, var(--gruen-tief), var(--gruen)); color: #fff; border-radius: 16px; padding: 1.3rem 1.6rem; margin: 1rem 0; }
.featured a { color: #fff; font-weight: 700; }
.featured .titel { font-size: 1.25rem; }
.haftung { background: #fff; border-radius: 12px; padding: 1rem 1.3rem; margin: 2rem 0 0; font-size: .92rem; color: #4b584d; box-shadow: 0 2px 8px rgba(30,60,35,.1); }

/* Nur auf 91-recht.html: Text-Blöcke, Definitionsliste, Haftungs-Liste */
.block { background: #fff; border-radius: 14px; padding: 1.2rem 1.5rem; margin: 1rem 0; box-shadow: 0 2px 8px rgba(30,60,35,.1); }
.block h2 { margin-top: 0; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .6rem 0; }
.daten dt { font-weight: 600; color: var(--gruen-tief); }
ol.haftung { margin: .5rem 0 .5rem 1.3rem; }
ol.haftung > li { margin-bottom: .8rem; }
ol.haftung > li > span.titel { font-weight: 700; text-decoration: underline; }
/* Bereich "Gestaltung": Hinweis auf den W3C-Prüfdienst, rechts neben dem Text.
   align-items: flex-end stellt das Bild auf dieselbe Grundlinie wie die letzte
   Textzeile; der Absatz darüber bekommt dafür keinen Abstand nach unten.
   Auf schmalen Bildschirmen steht das Bild unter dem Text statt daneben. */
.gestaltung { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; }
.gestaltung .gestaltung-text > :last-child { margin-bottom: 0; }
.gestaltung .pruefzeichen { flex: none; }
.gestaltung .pruefzeichen img { display: block; }
@media (max-width: 30rem) {
  .gestaltung { display: block; }
  .gestaltung .pruefzeichen img { margin-top: .8rem; }
}

/* Bilder-Wechselrahmen (Überblendung, reines CSS) – passt sich der Bildanzahl an.
   Im HTML einfach 1 bis 8 <img> in die <figure class="wechsel"> legen, sonst nichts:
     1 Bild  → ruhiges Standbild (keine Animation)
     2–8 Bild → automatische Überblendung, jedes Bild gleich lang sichtbar
   Die Anzahl erkennt das CSS selbst (per :has), Anzeigedauer je Bild = --takt.
   Bei "Bewegung reduzieren" (Systemeinstellung) steht nur das erste Bild.
   MEHR ALS 8 BILDER: unten einen weiteren Block nach demselben Muster ergänzen
   (Anzahl-Erkennung + Keyframe wechselN mit SLOT = 100/N). Ganz ohne Obergrenze
   geht es in reinem CSS nicht, weil die Überblend-Zeiten die Anzahl kennen müssen. */
.wechsel { --takt: 6s; position: relative; margin: 0; }
.wechsel img { width: 100%; height: auto; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(30,60,35,.2); display: block; }
/* jedes weitere Bild deckungsgleich über das erste legen (erstes bleibt im Fluss und gibt die Höhe vor) */
.wechsel img + img { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; }

/* Optionale Beschriftung: je Bild eine <p class="bildtext"> (in Bild-Reihenfolge).
   Sie liegt als Balken unten im Bild und blendet synchron mit den Bildern um.
   WARUM KEIN figcaption: HTML erlaubt je <figure> nur EINE <figcaption>; mehrere
   sind ein Validierungsfehler (W3C-Pruefung am 03.10.2026). Bei nur einem Bild
   darf es weiterhin eine <figcaption> sein, beide Formen sind hier beruecksichtigt. */
.wechsel :is(figcaption, .bildtext) {
  position: absolute; left: 4px; right: 4px; bottom: 4px; margin: 0;
  padding: .5rem 1rem; background: rgba(36, 81, 44, .85); color: #fff;
  font-weight: 600; font-size: .95rem; border-radius: 0 0 12px 12px; opacity: 0;
}

/* gemeinsame Animationsbasis – gilt auch fuer die Beschriftungen (figcaption) */
.wechsel :is(img, figcaption, .bildtext) { animation-duration: var(--total); animation-iteration-count: infinite; animation-timing-function: ease; }
/* Startversatz je Position (Bild ODER Beschriftung, jeweils nach eigenem Typ gezaehlt) */
.wechsel :is(img, figcaption, .bildtext):nth-of-type(1) { animation-delay: calc(0 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(2) { animation-delay: calc(1 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(3) { animation-delay: calc(2 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(4) { animation-delay: calc(3 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(5) { animation-delay: calc(4 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(6) { animation-delay: calc(5 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(7) { animation-delay: calc(6 * var(--takt)); }
.wechsel :is(img, figcaption, .bildtext):nth-of-type(8) { animation-delay: calc(7 * var(--takt)); }
.wechsel:hover :is(img, figcaption) { animation-play-state: paused; }

/* Anzahl-Erkennung: Gesamtdauer (--total) + passendes Keyframe je Bildzahl */
.wechsel:not(:has(img:nth-of-type(2))) :is(img, figcaption) { animation: none; }   /* 1 Bild: Standbild */
.wechsel:not(:has(img:nth-of-type(2))) :is(figcaption, .bildtext) { opacity: 1; }                  /* einzelne Beschriftung fest sichtbar */
.wechsel:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) { --total: calc(2 * var(--takt)); }
.wechsel:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) :is(img, figcaption) { animation-name: wechsel2; }
.wechsel:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) { --total: calc(3 * var(--takt)); }
.wechsel:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) :is(img, figcaption) { animation-name: wechsel3; }
.wechsel:has(img:nth-of-type(4)):not(:has(img:nth-of-type(5))) { --total: calc(4 * var(--takt)); }
.wechsel:has(img:nth-of-type(4)):not(:has(img:nth-of-type(5))) :is(img, figcaption) { animation-name: wechsel4; }
.wechsel:has(img:nth-of-type(5)):not(:has(img:nth-of-type(6))) { --total: calc(5 * var(--takt)); }
.wechsel:has(img:nth-of-type(5)):not(:has(img:nth-of-type(6))) :is(img, figcaption) { animation-name: wechsel5; }
.wechsel:has(img:nth-of-type(6)):not(:has(img:nth-of-type(7))) { --total: calc(6 * var(--takt)); }
.wechsel:has(img:nth-of-type(6)):not(:has(img:nth-of-type(7))) :is(img, figcaption) { animation-name: wechsel6; }
.wechsel:has(img:nth-of-type(7)):not(:has(img:nth-of-type(8))) { --total: calc(7 * var(--takt)); }
.wechsel:has(img:nth-of-type(7)):not(:has(img:nth-of-type(8))) :is(img, figcaption) { animation-name: wechsel7; }
.wechsel:has(img:nth-of-type(8)) { --total: calc(8 * var(--takt)); }
.wechsel:has(img:nth-of-type(8)) :is(img, figcaption) { animation-name: wechsel8; }

/* Jedes Bild ist 1/Anzahl der Zeit sichtbar, dann weiche Überblendung.
   Aufbau: sichtbar bis SLOT%, ausblenden (~4%), unsichtbar, am Ende wieder ein.
   SLOT = 100/Anzahl. */
@keyframes wechsel2 { 0%{opacity:1;z-index:1} 50%{opacity:1} 54%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel3 { 0%{opacity:1;z-index:1} 33.33%{opacity:1} 37.33%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel4 { 0%{opacity:1;z-index:1} 25%{opacity:1} 29%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel5 { 0%{opacity:1;z-index:1} 20%{opacity:1} 24%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel6 { 0%{opacity:1;z-index:1} 16.66%{opacity:1} 20.66%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel7 { 0%{opacity:1;z-index:1} 14.28%{opacity:1} 18.28%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }
@keyframes wechsel8 { 0%{opacity:1;z-index:1} 12.5%{opacity:1} 16.5%,96%{opacity:0;z-index:0} 100%{opacity:1;z-index:1} }

@media (prefers-reduced-motion: reduce) {
  .wechsel :is(img, figcaption, .bildtext) { animation: none !important; }
  .wechsel img + img { opacity: 0; }
  .wechsel :is(figcaption, .bildtext) { opacity: 0; }
  .wechsel :is(figcaption, .bildtext):first-of-type { opacity: 1; }   /* erste Beschriftung fest sichtbar */
}

/* Nur auf 21-kueche.html: bläulicher Kasten zum Thema Wasser/Getränke */
.wasser { background: linear-gradient(135deg, #e8f4fb, #f0f7ee); border-radius: 16px; padding: 1.2rem 1.5rem; margin: 1.2rem 0; border: 2px solid #9cc7e0; }

/* --- 7. Fußzeile -------------------------------------------------------- */
footer { background: var(--gruen-tief); color: #d8ecd8; }
.fuss { max-width: 1080px; margin: 0 auto; padding: 0.9rem 1rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
footer a { color: #fff; }

/* --- 8. Anpassung an kleine Bildschirme --------------------------------- */
@media (max-width: 900px) { .raster { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) {
  .zweispaltig { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .willkommen, .formwahl { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .vorstellung, .text-objekt { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .daten { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 500px) { .galerie { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .raster { grid-template-columns: 1fr; } }

/* --- 9. Druckansicht (einheitlich für alle Seiten) ---------------------- */
/* Kopf, Navigation, Brotkrumen, Sprungnav, Knöpfe und Fußzeile raus –
   auf Papier zählt nur der Inhalt, schlicht und sparsam. */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  header, nav.haupt, .brotkrumen, .sprungnav, footer, .skip-link, .knopf, .zurueck { display: none !important; }
  .inhalt { max-width: none; padding: 0; }
  .kernsatz, .hinweis, .karte, .block, .linkkarte, .haftung, .ziel { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .skizze img, .galerie img, .objektkarte img, .wechsel img { border: 1px solid #999; box-shadow: none; }
  a { color: #000; }
  h1, h2, h3 { color: #000; }
  /* Externe Links im Fließtext bekommen auf Papier die Adresse dazu: Ein Pfeil
     nützt auf dem Ausdruck nichts, die Adresse schon — so geht beim Drucken
     eines Textes keine Information verloren. Gilt für alle Links mit
     target="_blank", das sind genau die fremden. */
  a[target="_blank"]::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 10pt; }
  /* AUSNAHME, und zwar mit Absicht: Auf der Linkseite bleiben die Adressen weg.
     Dort besteht die Seite nur aus Links; ausgeschrieben hinter jedem der 37
     Titel würde das die Seite sprengen, und gedruckt nützen sie dort nichts —
     die Links sollen angeklickt werden. Der Pfeil bleibt aber stehen, damit
     auch auf Papier erkennbar ist, dass es nach draußen geht; nur die Farbe
     wird schwarz. Die Regel ist spezifischer als die obige und gewinnt,
     deshalb erscheint hier keine Adresse. */
  .linkkarte a.titel::after { color: #000; }
}
