/* =====================================================================
   Braaklander Hof – Design „klassisch“
   Nachbildung des bisherigen Eclipse-9-Looks (Gold, Bordeaux, Papier,
   Ubuntu, transparenter Kopf über dem Kopfbild, goldene Kontaktleiste).
   ===================================================================== */

:root {
  --gold: #c49b4f;
  --gold-80: rgba(196, 155, 79, .8);
  --gold-96: rgba(196, 155, 79, .96);
  --bordeaux: #6e2628;
  --text: #312e2e;
  --ueberschrift: #303030;
  --menue-text: #4d4f4f;
  --papier: #f5f2f0;
  --weiss-80: rgba(255, 255, 255, .8);
  --breit: 1160px;
  --text-breit: 850px;
  --rand: 20px;
  --schatten: 1px 8px 15px rgba(0, 0, 0, .1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--papier) url("/design/ricepaper.png");
  /* WebP (6 KB statt 171 KB); Browser ohne image-set() behalten die PNG-Zeile */
  background-image: image-set(url("/design/ricepaper.webp") type("image/webp"), url("/design/ricepaper.png") type("image/png"));
}
img, svg, picture { max-width: 100%; height: auto; }
picture { display: contents; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, label:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
strong, b { font-weight: 700; }
.inhalt p strong, .inhalt li strong { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 { color: var(--ueberschrift); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(29.5px, 4vw + 8px, 51px); font-weight: 700; }
h2 { font-size: clamp(27.2px, 2.5vw + 10px, 39.7px); font-weight: 700; }
h3 { font-size: clamp(24.9px, 1.5vw + 12px, 31.7px); font-weight: 500; }
h4 { font-size: 25.5px; font-weight: 500; }
h5 { font-size: 22.7px; font-weight: 500; }
h6 { font-size: 20.4px; font-weight: 500; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprunglink { position: absolute; left: 10px; top: -60px; z-index: 200; background: #fff; color: var(--ueberschrift); padding: 10px 16px; }
.sprunglink:focus { top: 10px; }
.icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }

/* ---------- Knöpfe ---------- */
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.5em 0; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 700; font-size: 17px; line-height: 1.4;
  padding: 12px 36px; border: 2px solid var(--bordeaux); border-radius: 30px;
  background: var(--bordeaux); color: #fff; text-decoration: none; text-align: center;
  transition: background .2s, color .2s, border-color .2s;
}
.knopf:hover { text-decoration: none; background: #fff; color: var(--bordeaux); }
.knopf--rahmen { background: transparent; color: var(--bordeaux); }
.knopf--rahmen:hover { background: var(--bordeaux); color: #fff; }
.knopf--hell { background: transparent; border-color: #fff; color: #fff; }
.knopf--hell:hover { background: #fff; color: var(--gold); }
.knopf--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.knopf--gold:hover { background: #fff; color: var(--gold); }
@media (max-width: 767px) { .knoepfe { flex-direction: column; } .knopf { width: 100%; } }

/* ---------- Kopfbereich ---------- */
.kopf { position: absolute; top: 0; left: 0; right: 0; z-index: 50; background: linear-gradient(rgba(0, 0, 0, .2), transparent); }
.kopf__leiste { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 2vh 40px 0 50px; }
.kopf__logo { display: block; flex: 0 0 auto; line-height: 0; }
.kopf__logo-gross { width: 180px; height: auto; }
.kopf__logo-klein { display: none; width: 80px; height: 80px; }
.kopf__menueknopf { display: none; }
.hauptmenue { display: flex; align-items: stretch; background: rgba(0, 0, 0, .4); padding: 10px 30px; margin-top: calc(56px - 2vh); }
.menue, .untermenue, .kopf__social { list-style: none; margin: 0; padding: 0; }
.menue { display: flex; }
.menue > li { position: relative; }
.menue > li > a { display: block; line-height: 70px; padding: 0 18px; color: #fff; font-size: 18px; font-weight: 500; white-space: nowrap; }
.menue > li > a:hover, .menue > li.aktiv > a { color: var(--gold); text-decoration: none; }
.menue__auf, .hauptmenue__schliessen { display: none; }
.untermenue {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px; z-index: 60;
  background: #fff; border-top: 2px solid var(--gold); box-shadow: var(--schatten);
}
.untermenue .untermenue { top: -2px; left: 100%; }
.untermenue li { position: relative; }
.untermenue a { display: block; font-size: 13.6px; line-height: 32px; padding: 0 25.5px; color: var(--menue-text); border-bottom: 1px solid #f2f2f2; white-space: nowrap; }
.untermenue a:hover, .untermenue li.aktiv > a { color: var(--gold); text-decoration: none; }
.untermenue .hat-kinder > a::after { content: "›"; float: right; margin-left: 15px; }
.menue li:hover > .untermenue, .menue li:focus-within > .untermenue { display: block; }
.kopf__social { display: flex; align-items: center; margin-left: 12px; padding-left: 12px; border-left: 1px solid #3e3e3e; }
.kopf__social a { display: flex; align-items: center; justify-content: center; width: 50px; height: 70px; color: #fff; }
.kopf__social a:hover { color: var(--gold); }
.kopf__social .icon { width: 20px; height: 20px; }

/* fester Kopf beim Scrollen (Desktop) */
@media (min-width: 768px) {
  body.gescrollt .kopf { position: fixed; height: 100px; background: var(--papier) url("/design/ricepaper.png"); background-image: image-set(url("/design/ricepaper.webp") type("image/webp"), url("/design/ricepaper.png") type("image/png")); box-shadow: var(--schatten); animation: einblenden .3s ease-out; }
  body.gescrollt .kopf__leiste { padding-top: 10px; align-items: center; }
  body.gescrollt .kopf__logo-gross { display: none; }
  body.gescrollt .kopf__logo-klein { display: block; }
  body.gescrollt .hauptmenue { background: transparent; margin-top: 0; padding: 0; }
  body.gescrollt .menue > li > a, body.gescrollt .kopf__social a { color: var(--ueberschrift); line-height: 80px; height: 80px; }
  body.gescrollt .menue > li > a:hover, body.gescrollt .menue > li.aktiv > a { color: var(--gold); }
}
@keyframes einblenden { from { transform: translateY(-100%); } to { transform: none; } }
@media (min-width: 768px) and (max-width: 1150px) {
  .kopf__leiste { padding: 15px 20px 0; }
  .kopf__logo-gross { width: 130px; }
  .hauptmenue { padding: 5px 10px; margin-top: 10px; }
  .menue > li > a { padding: 0 9px; font-size: 15.5px; line-height: 56px; }
  .kopf__social a { width: 36px; height: 56px; }
}

/* mobiler Kopf + Vollbild-Menü */
@media (max-width: 767px) {
  .kopf { position: sticky; background: var(--papier) url("/design/ricepaper.png"); background-image: image-set(url("/design/ricepaper.webp") type("image/webp"), url("/design/ricepaper.png") type("image/png")); height: 90px; box-shadow: var(--schatten); }
  .kopf__leiste { padding: 5px 20px; align-items: center; height: 90px; }
  .kopf__logo-gross { display: none; }
  .kopf__logo-klein { display: block; }
  .kopf__menueknopf {
    display: flex; align-items: center; justify-content: center; position: relative; z-index: 120;
    width: 52px; height: 52px; border: 0; background: var(--gold); color: #fff; cursor: pointer;
  }
  .kopf__menueknopf .icon { width: 28px; height: 28px; }
  .kopf__menueknopf .icon--zu, .menue-offen .kopf__menueknopf .icon--auf { display: none; }
  .menue-offen .kopf__menueknopf .icon--zu { display: block; }
  .menue-offen .kopf__menueknopf { background: transparent; }
  /* Vollbild-Menü: deckend, vom oberen bis zum unteren Rand, eigener Bildlauf (Seite dahinter steht still) */
  .hauptmenue {
    display: none; position: fixed; inset: 90px 0 0; z-index: 110; margin: 0;
    height: calc(100vh - 90px); height: calc(100dvh - 90px); padding: 20px 20px calc(40px + env(safe-area-inset-bottom));
    background: #1b1918; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    flex-direction: column; align-items: center; text-align: center;
  }
  /* Scroll-Sperre (auch iOS): body mit gemerkter Position fixiert (top per Skript), Kopf mit X bleibt oben */
  html.menue-offen { overflow: hidden; }
  html.menue-offen body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
  html.menue-offen body .kopf { position: fixed; top: 0; left: 0; right: 0; background: #1b1918; box-shadow: none; }
  .menue-offen .kopf__logo { visibility: hidden; }
  .hauptmenue__schliessen { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; margin: 30px 0 0; padding: 10px 24px; border: 1px solid rgba(255, 255, 255, .6); background: none; color: #fff; font: inherit; font-size: 17px; cursor: pointer; }
  .hauptmenue__schliessen:hover { border-color: var(--gold); color: var(--gold); }
  .menue-offen .hauptmenue { display: flex; }
  .menue { flex-direction: column; }
  .menue > li > a { display: inline-flex; align-items: center; min-height: 48px; line-height: 1.3; padding: 6px 6px; font-size: 30px; text-transform: uppercase; font-weight: 400; white-space: normal; }
  .menue__auf { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: none; border: 0; color: #ccc; font: inherit; font-size: 26px; cursor: pointer; padding: 0 4px; vertical-align: middle; }
  .untermenue, .untermenue .untermenue { position: static; display: none; background: none; border: 0; box-shadow: none; min-width: 0; }
  .menue li:hover > .untermenue, .menue li:focus-within > .untermenue { display: none; }
  .menue li.offen > .untermenue { display: block; }
  .untermenue a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-size: 19px; line-height: 1.35; padding: 4px 6px; border: 0; white-space: normal; }
  .untermenue .menue__auf { font-size: 18px; }
  .untermenue .hat-kinder > a::after { content: none; }
  .untermenue .untermenue a { font-size: 17px; color: #ddd; }
  .kopf__social { border: 0; margin: 25px 0 0; padding: 0; }
  body.gescrollt .kopf { position: sticky; }
}

/* ---------- Kopfbild ---------- */
.kopfbild { position: relative; height: max(65vh, 650px); overflow: hidden; background: #2b2b2b; }
.kopfbild--start { height: max(75vh, 650px); background: #000; }
.kopfbild--mittel, .kopfbild--klein { height: 350px; }
.kopfbild--ohne { height: 220px; background: #3a3533; }
.kopfbild__bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kopfbild--start .kopfbild__bild { opacity: 0; animation: ueberblenden 12s infinite; }
.kopfbild__folien > :nth-child(1) .kopfbild__bild, .kopfbild__folien > .kopfbild__bild:nth-child(1) { opacity: .7; animation-delay: 0s; }
.kopfbild__folien > :nth-child(2) .kopfbild__bild, .kopfbild__folien > .kopfbild__bild:nth-child(2) { animation-delay: 3s; }
.kopfbild__folien > :nth-child(3) .kopfbild__bild, .kopfbild__folien > .kopfbild__bild:nth-child(3) { animation-delay: 6s; }
.kopfbild__folien > :nth-child(4) .kopfbild__bild, .kopfbild__folien > .kopfbild__bild:nth-child(4) { animation-delay: 9s; }
.kopfbild__folien > :nth-child(n+5) { display: none; }
@keyframes ueberblenden { 0% { opacity: 0; } 6% { opacity: .7; } 25% { opacity: .7; } 33% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .kopfbild--start .kopfbild__bild { animation: none; opacity: .7; }
  .kopfbild__folien > :nth-child(n+2) { display: none; }
}
.kopfbild__eu { position: absolute; right: 10px; bottom: 75px; z-index: 2; width: 144px; line-height: 0; }
.kopfbild__eu img { width: 144px; height: auto; }
@media (max-width: 767px) {
  .kopfbild, .kopfbild--start, .kopfbild--mittel, .kopfbild--klein { height: 350px; }
  .kopfbild--ohne { height: 40px; }
  .kopfbild__eu { width: 78px; bottom: 10px; right: 10px; }
  .kopfbild__eu img { width: 78px; }
}

/* ---------- Kontaktleiste ---------- */
.kontaktleiste {
  position: relative; z-index: 5; max-width: var(--breit); margin: -60px auto 0; min-height: 150px;
  display: grid; grid-template-columns: 210px auto 1fr minmax(0, 2fr); align-items: center; gap: 20px 30px;
  padding: 25px 60px; background: var(--gold); color: #fff;
}
.kontaktleiste__titel { margin: 0; font-size: 20.4px; font-weight: 500; line-height: 1.3; }
.kontaktleiste__icons { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; }
.kontaktleiste__icons a {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: #fff; transition: background .2s, color .2s;
}
.kontaktleiste__icons a:hover { background: var(--weiss-80); color: var(--gold); }
.kontaktleiste__icons .icon { width: 24px; height: 24px; }
.kontaktleiste .knopf { grid-column: 4; justify-self: end; width: 100%; max-width: 405px; }
.kontaktleiste--verkauf { grid-template-columns: 1fr auto; }
.kontaktleiste--verkauf .kontaktleiste__titel { font-size: clamp(24px, 2vw + 8px, 31.7px); }
@media (max-width: 1150px) { .kontaktleiste { margin-inline: 20px; padding: 25px 30px; grid-template-columns: 1fr auto; } .kontaktleiste .knopf { grid-column: 1 / -1; justify-self: stretch; max-width: none; } }
@media (max-width: 767px) {
  .kontaktleiste, .kontaktleiste--verkauf { grid-template-columns: 1fr; justify-items: center; text-align: center; margin: -40px 20px 0; padding: 30px 25px; }
  .kontaktleiste__titel { font-size: 24px; }
}

/* ---------- Inhaltsraster ---------- */
.inhalt {
  display: grid;
  grid-template-columns:
    [voll-start] minmax(var(--rand), 1fr)
    [breit-start] minmax(0, calc((var(--breit) - var(--text-breit)) / 2))
    [text-start] min(var(--text-breit), 100% - 2 * var(--rand))
    [text-end] minmax(0, calc((var(--breit) - var(--text-breit)) / 2))
    [breit-end] minmax(var(--rand), 1fr) [voll-end];
  padding: 80px 0 40px;
}
.inhalt > * { grid-column: text; min-width: 0; }
.inhalt > :is(.bild-text, .galerie, .kacheln, .liste, .pferd, .news-detail, .zurueck-leiste, .stammbaum) { grid-column: breit; }
.inhalt > .band { grid-column: voll; }
.inhalt > h1 { text-align: center; margin-bottom: .8em; }
/* zentrierter Einleitungstext: Absätze direkt unter der Hauptüberschrift */
.inhalt > :is(p, .knoepfe):not(:is(h2, h3, h4, h5, h6, section:not(.kurzinfo), div, details, ul, ol, article) ~ *) { text-align: center; justify-content: center; }
.inhalt > ul, .inhalt > ol, .aufklappen ul { padding-left: 1.3em; }
.inhalt li::marker { color: var(--bordeaux); }
.inhalt > h2, .inhalt > h3 { margin-top: 1.4em; }
.inhalt > p > img { display: block; margin: 1em auto; }
.inhalt > :is(.bild-text, .band, .galerie, .kacheln, .liste) { margin: 50px 0; }
.inhalt > .band:first-of-type { margin-top: 70px; }

/* Bild links / Text rechts */
.bild-text { display: grid; grid-template-columns: 1fr 1fr; background: transparent; }
.bild-text__bild { position: relative; min-height: 400px; }
.bild-text__bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bild-text__text { background: var(--weiss-80); padding: 50px 40px; }
.bild-text__text > :last-child { margin-bottom: 0; }
.bild-text__text h2 { font-size: clamp(24.9px, 1.5vw + 12px, 31.7px); font-weight: 500; }
.bild-text .knoepfe { justify-content: flex-start; }
.bild-text .knopf { padding-inline: 32px; }
@media (max-width: 767px) { .bild-text { grid-template-columns: 1fr; } .bild-text__bild { min-height: 260px; } .bild-text__text { padding: 30px 22px; } }

/* breite Bänder mit Foto */
.band { position: relative; color: #fff; background: #222; overflow: hidden; }
.band--foto::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.band--bordeaux { background: var(--bordeaux); }
.band--bordeaux::after { background: rgba(110, 38, 40, .82); }
.band__bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band__inhalt { position: relative; z-index: 1; max-width: var(--breit); margin: 0 auto; padding: 90px var(--rand); text-align: center; }
.band__inhalt > :last-child { margin-bottom: 0; }
.band h2, .band h3, .band a:not(.knopf) { color: #fff; }
.band p { font-size: 18.7px; }
.band .knoepfe { justify-content: center; }
.band .knopf, .band .knopf--rahmen { background: transparent; border-color: #fff; color: #fff; }
.band .knopf:hover { background: #fff; color: var(--ueberschrift); }
.band .knoepfe .knopf:first-child:not(.knopf--rahmen) { background: var(--gold); border-color: var(--gold); }
.band img:not(.band__bild) { display: block; margin: 0 auto 10px; width: 260px; }
.band--bordeaux .band__inhalt { max-width: 1000px; }
.band--bordeaux p { font-size: 22px; line-height: 1.6; }

/* Aktuelles-Band der Startseite */
.band--aktuelles .band__inhalt { display: grid; grid-template-columns: 1fr 1fr; text-align: left; padding-block: 80px; }
.band--aktuelles .band__inhalt > * { grid-column: 2; }
.band--aktuelles .knoepfe { justify-content: flex-end; }
@media (max-width: 900px) { .band--aktuelles .band__inhalt { grid-template-columns: 1fr; } .band--aktuelles .band__inhalt > * { grid-column: 1; } }
.news-karten { list-style: none; margin: 25px -28px 30px; padding: 0; display: grid; gap: 10px; }
.news-karte { display: grid; grid-template-columns: 175px 1fr; align-items: center; gap: 10px; padding: 20px 25px; background: var(--gold-80); color: #fff; font-weight: 700; line-height: 1.4; transition: background .2s; }
.news-karte:hover { background: var(--gold-96); text-decoration: none; }
.news-karte__datum { display: flex; align-items: center; gap: 15px; color: var(--bordeaux); }
.news-karte__tag { font-size: 36px; }
.news-karte__monat { font-size: 13.6px; line-height: 1.2; }
.band .news-karte, .band .news-karte:hover { color: #fff; }
@media (max-width: 600px) { .news-karten { margin-inline: 0; } .news-karte { grid-template-columns: 1fr; } }

/* Zitate */
.band--zitate .band__inhalt { padding-block: 70px; }
.band--zitate h2 { font-size: clamp(24.9px, 1.5vw + 12px, 31.7px); font-weight: 500; }
.zitate { display: grid; min-height: 4.5em; align-items: center; }
.zitate > p { grid-area: 1 / 1; margin: 0; opacity: 0; animation: zitat 38.5s infinite; }
.zitate > p:nth-child(1) { animation-delay: 0s; }
.zitate > p:nth-child(2) { animation-delay: 5.5s; }
.zitate > p:nth-child(3) { animation-delay: 11s; }
.zitate > p:nth-child(4) { animation-delay: 16.5s; }
.zitate > p:nth-child(5) { animation-delay: 22s; }
.zitate > p:nth-child(6) { animation-delay: 27.5s; }
.zitate > p:nth-child(7) { animation-delay: 33s; }
.zitate > p:nth-child(n+8) { display: none; }
@keyframes zitat { 0% { opacity: 0; } 2% { opacity: 1; } 13% { opacity: 1; } 15% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .zitate { gap: 1em; }
  .zitate > p { grid-area: auto; opacity: 1; animation: none; }
  .zitate > p:nth-child(n+8) { display: block; }
}

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.kachel { position: relative; display: flex; flex-direction: column; }
.kachel__bild { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.kachel__bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.kachel:hover .kachel__bild img { transform: scale(1.04); }
.kachel :is(h2, h3) a { color: inherit; }
.kachel :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kachel--text .kachel__text { flex: 1; background: var(--weiss-80); padding: 25px 25px 40px; font-size: 15.3px; }
.kachel--text :is(h2, h3) { font-size: clamp(24.9px, 1.5vw + 12px, 31.7px); font-weight: 500; margin-bottom: .4em; }
.kachel--bild { height: 300px; }
.kachel--bild .kachel__bild { position: absolute; inset: 0; aspect-ratio: auto; }
.kachel--bild .kachel__text { position: absolute; left: 0; right: 0; bottom: 10px; background: var(--gold-80); padding: 12px 15px; }
.kachel--bild :is(h2, h3) { font-size: 20.4px; font-weight: 500; color: #fff; margin: 0; }
.kacheln:has(.kachel--bild) { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kacheln:has(.kachel--bild) ~ .knoepfe, .inhalt > .kacheln + .knoepfe { justify-content: center; }

/* Galerie */
.galerie { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.galerie--3 { grid-template-columns: repeat(3, 1fr); }
.galerie--4 { grid-template-columns: repeat(4, 1fr); }
.galerie__link { display: block; aspect-ratio: 282 / 212; overflow: hidden; background: #ddd; }
.galerie__link img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.galerie__link:hover img { transform: scale(1.05); opacity: .85; }
@media (max-width: 900px) { .galerie, .galerie--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .galerie, .galerie--3, .galerie--4 { grid-template-columns: repeat(2, 1fr); } }

/* Aufklappen (Akkordeon) */
.aufklappen { margin: 0 0 6px; background: #fff; border: 1px solid #ebe7e3; }
.aufklappen summary { position: relative; cursor: pointer; list-style: none; padding: 14px 50px 14px 20px; font-weight: 700; color: var(--ueberschrift); background: #faf9f8; }
.aufklappen summary::-webkit-details-marker { display: none; }
.aufklappen summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.aufklappen[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.aufklappen__inhalt { padding: 20px; }
.aufklappen__inhalt > :last-child { margin-bottom: 0; }
.aufklappen__inhalt img { float: left; max-width: 160px; margin: 0 20px 10px 0; }
.aufklappen__inhalt::after { content: ""; display: block; clear: both; }

/* ---------- Listen (automatisch) ---------- */
.liste > h2 { text-align: center; }
.liste .knoepfe { justify-content: center; }

/* Verkaufspferde: Fotokacheln (Masonry) + Filter */
.pferde-kacheln { list-style: none; margin: 0; padding: 0; columns: 3 300px; column-gap: 10px; }
.liste--verkaufspferde { grid-column: voll !important; padding-inline: 10px; }
.pferd ~ .liste--verkaufspferde, .pferd + .liste--verkaufspferde { grid-column: breit !important; padding: 0; }
.pferde-kachel { break-inside: avoid; margin-bottom: 10px; position: relative; overflow: hidden; background: #ccc; }
.pferde-kachel a { display: block; position: relative; color: #fff; }
.pferde-kachel img { display: block; width: 100%; height: auto; }
.pferde-kachel a::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s; }
.pferde-kachel__name { position: absolute; z-index: 1; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 25.5px; font-weight: 500; padding: 0 15px; opacity: 0; transition: opacity .3s; }
.pferde-kachel a:hover::after, .pferde-kachel a:focus-visible::after, .pferde-kachel a:hover .pferde-kachel__name, .pferde-kachel a:focus-visible .pferde-kachel__name { opacity: 1; }
@media (hover: none) {
  .pferde-kachel a::after { opacity: 1; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .65)); }
  .pferde-kachel__name { opacity: 1; top: auto; bottom: 14px; transform: none; }
}
.filter__wahl { position: absolute; opacity: 0; pointer-events: none; }
.filter { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 25px; }
.filter label { cursor: pointer; padding: 8px 22px; background: #fff; border: 1px solid #e5e1dd; font-size: 15px; font-weight: 500; }
.filter label:hover { color: var(--gold); }
#filter-alle:checked ~ .filter [for="filter-alle"],
#filter-stute:checked ~ .filter [for="filter-stute"],
#filter-hengst:checked ~ .filter [for="filter-hengst"],
#filter-wallach:checked ~ .filter [for="filter-wallach"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.filter__wahl:focus-visible ~ .filter { outline: 2px solid var(--gold); outline-offset: 4px; }
#filter-stute:checked ~ .pferde-kacheln .pferde-kachel:not([data-geschlecht="stute"]),
#filter-hengst:checked ~ .pferde-kacheln .pferde-kachel:not([data-geschlecht="hengst"]),
#filter-wallach:checked ~ .pferde-kacheln .pferde-kachel:not([data-geschlecht="wallach"]) { display: none; }
@media (max-width: 767px) { .pferde-kacheln { columns: 1; } .pferde-kachel img { height: 350px; object-fit: cover; } }

/* Hengste */
.hengst-karten { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; }
.hengst-karte { display: flex; flex-direction: column; }
.hengst-karte__bild { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #e9e4df; }
.hengst-karte__bild img { width: 100%; height: 100%; object-fit: cover; }
.hengst-karte__bild::after { content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 50px; color: #fff; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s; }
.hengst-karte__bild:hover::after { opacity: 1; }
.ohne-foto { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #8b817a; font-size: 14px; }
.ohne-foto img { width: 45%; height: auto; opacity: .35; }
.hengst-karte__text { flex: 1; background: #fff; padding: 20px 22px; font-size: 15.3px; line-height: 1.6; }
.hengst-karte__text h3 { font-size: 22.7px; font-weight: 500; margin-bottom: .3em; }
.hengst-karte__text h3 a { color: var(--ueberschrift); }
.hengst-karte__status { color: var(--bordeaux); font-style: italic; margin: 0; }

/* Nachzucht / Stutenstämme */
.zucht-liste { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px 40px; }
.zucht-eintrag { text-align: center; }
.zucht-eintrag h3 { font-size: 25.5px; margin-bottom: .2em; }
.zucht-eintrag h3 a { color: var(--ueberschrift); }
.zucht-eintrag > p { margin-bottom: .6em; }
.zucht-eintrag__bild { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #ddd; }
.zucht-eintrag__bild img { width: 100%; height: 100%; object-fit: cover; }
.zucht-eintrag__mehr { margin-top: .5em; font-size: 15px; }
@media (max-width: 767px) { .zucht-liste { grid-template-columns: 1fr; } }

/* News-Liste */
.news-liste { display: grid; gap: 45px; margin-top: 20px; }
.inhalt > .liste--aktuelles { grid-column: breit; }
.liste--aktuelles > h2 { text-align: left; }
.news-eintrag { display: grid; grid-template-columns: 1fr 2fr; gap: 35px; align-items: start; }
.news-eintrag__bild { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #ddd; }
.news-eintrag__bild img { width: 100%; height: 100%; object-fit: cover; }
.news__untertitel { color: var(--gold); text-transform: uppercase; font-weight: 700; font-size: 14px; letter-spacing: .04em; margin: 0 0 .3em; }
.news-eintrag__titel { font-size: 25.5px; font-weight: 700; text-transform: uppercase; margin: 0 0 .2em; }
.news-eintrag__titel a { color: var(--ueberschrift); }
.news__datum { color: var(--bordeaux); margin: 0 0 .6em; font-size: 15px; }
.mehr { font-weight: 500; }
@media (max-width: 767px) { .news-eintrag { grid-template-columns: 1fr; gap: 15px; } }

/* News-Detail */
.news-detail { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.news-detail__bild img { width: 100%; height: auto; }
.news-detail h1 { font-size: 25.5px; text-transform: uppercase; text-align: left; }
@media (max-width: 767px) { .news-detail { grid-template-columns: 1fr; } }

/* Zurück-Leiste */
.zurueck-leiste { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-top: 60px; padding-top: 18px; border-top: 1px solid #ddd6cf; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Pferd (Detailseite) ---------- */
.pferd h1 { text-align: left; }
.pferd__untertitel { margin-top: -.4em; }
.pferd__status { display: inline-block; background: #fff; border-left: 4px solid var(--bordeaux); padding: 8px 16px; font-style: italic; }
.pferd__spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; align-items: start; margin-bottom: 40px; }
.pferd__spalten--eins { grid-template-columns: 1fr; }
.pferd__text::after { content: ""; display: block; clear: both; }
.pferd__bild-im-text { float: right; width: 280px; margin: 0 0 20px 30px; }
@media (max-width: 767px) { .pferd__spalten { grid-template-columns: 1fr; } .pferd__bild-im-text { float: none; width: 100%; margin: 0 0 20px; } }
.pferdedaten { width: 100%; border-collapse: collapse; }
.pferdedaten th, .pferdedaten td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #ddd6cf; }
.pferdedaten th { font-weight: 600; width: 40%; }
.anfrage { margin-top: 30px; padding: 25px; background: #fff; border-top: 3px solid var(--gold); }
.anfrage__titel { font-size: 22.7px; font-weight: 500; margin-bottom: .4em; }
.anfrage .knoepfe { margin: 1em 0 .5em; }
.anfrage .knopf { padding: 10px 20px; font-size: 15.5px; }
.anfrage__hinweis { font-size: 14px; margin: 0; color: #6b6461; }
.pferd .galerie { margin: 20px 0 50px; }
.pferd__daten--schmal { max-width: 560px; margin: 10px 0 0; }
.pferd__stand { margin: 12px 0 0; font-size: 14px; color: #6b6461; }
.pferdedaten a, .stammbaum a.stammbaum__name { color: var(--bordeaux); }
.stammbaum a.stammbaum__name:hover { text-decoration: underline; }
.pferd__verweise { margin: 10px 0 0; padding: 16px 20px; background: #fff; border-left: 4px solid var(--gold); }
.pferd__verweise p { margin: 0; }

/* „Auf einen Blick“ (Kurzinfo) und häufige Fragen */
.kurzinfo { margin: 0 0 2.2em; padding: 24px 28px; background: #fff; border-top: 3px solid var(--gold); box-shadow: var(--schatten); }
.kurzinfo h2 { font-size: 22.7px; font-weight: 500; margin: 0 0 .6em; }
.kurzinfo__liste { margin: 0; font-size: 16px; line-height: 1.6; }
.kurzinfo__liste > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid #ebe7e3; }
.kurzinfo__liste > div:last-child { border-bottom: 0; }
.kurzinfo__liste dt { font-weight: 700; color: var(--ueberschrift); }
.kurzinfo__liste dd { margin: 0; }
@media (max-width: 600px) { .kurzinfo { padding: 20px; } .kurzinfo__liste > div { grid-template-columns: 1fr; } }
/* Banner „Entwurf“ (Feld entwurf: true) und markierte Prüfstellen in Entwürfen */
.entwurf-hinweis { margin: 0 0 1.6em; padding: 12px 18px; background: #fbf5e8; border: 1px solid #e6d3a8; border-left: 4px solid var(--gold); font-size: 15px; line-height: 1.55; }
.entwurf-hinweis p { margin: 0; }
.inhalt mark { background: #fbe7a6; color: var(--text); padding: 0 .25em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.faq { margin: 50px 0 0; }
.faq > h2 { margin-bottom: .6em; }
.faq__frage { display: inline; font: inherit; color: inherit; margin: 0; }

/* Stammbaum (Organigramm wie bisher) */
/* Video (selbst gehostet) */
.pferd__video { margin: 40px 0 0; }
.pferd__video video { display: block; width: 100%; max-width: 900px; height: auto; aspect-ratio: auto 3 / 2; background: #000; }
.stammbaum { margin: 30px 0 60px; }
.stammbaum > h2 { text-align: center; font-size: clamp(24.9px, 1.5vw + 12px, 31.7px); font-weight: 500; }
.stammbaum__seiten { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.stammbaum__seite > h3 { text-align: center; color: var(--gold); font-size: 22.7px; margin-bottom: .5em; }
.stammbaum ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.stammbaum li { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1 1 0; padding: 20px 4px 0; min-width: 0; }
.stammbaum__baum > li { padding-top: 0; }
.stammbaum li::before, .stammbaum li::after { content: ""; position: absolute; top: 0; height: 20px; border-top: 1px solid var(--gold); width: 50%; }
.stammbaum li::before { right: 50%; }
.stammbaum li::after { left: 50%; border-left: 1px solid var(--gold); }
.stammbaum li:first-child::before, .stammbaum li:last-child::after { border-top: 0; }
.stammbaum li:last-child::before { border-right: 1px solid var(--gold); border-top-right-radius: 0; }
.stammbaum li:only-child::before, .stammbaum li:only-child::after { border-top: 0; }
.stammbaum__baum > li::before, .stammbaum__baum > li::after { display: none; }
.stammbaum li > ul { position: relative; padding-top: 20px; width: 100%; }
.stammbaum li > ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 20px; border-left: 1px solid var(--gold); }
.stammbaum__name { position: relative; z-index: 1; display: block; background: #fff; border-radius: 5px; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); padding: 6px 8px; font-size: 16px; font-weight: 500; line-height: 1.4; text-align: center; overflow-wrap: anywhere; hyphens: auto; max-width: 100%; }
.stammbaum__name--leer { color: #aaa; box-shadow: none; background: rgba(255, 255, 255, .5); }
@media (max-width: 900px) {
  .stammbaum__seiten { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) { .stammbaum__name { font-size: 12px; padding: 5px 4px; } .stammbaum li { padding-inline: 2px; } }

/* ---------- Fußbereich ---------- */
.fuss { position: relative; margin-top: 40px; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; background: url("/design/footer-silhouetten.png") center bottom / cover no-repeat; background-image: image-set(url("/design/footer-silhouetten.webp") type("image/webp"), url("/design/footer-silhouetten.png") type("image/png")); color: #efefef; font-size: 14.9px; }
.fuss__silhouette { flex: 1; }
.fuss__leiste { background: #000; padding: 14px 20px 18px; text-align: center; }
.fuss__leiste p { margin: 0; }
.fuss a { color: #efefef; margin-left: 14px; }
.fuss a:hover { color: var(--gold); }
.nach-oben {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 45px; height: 45px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0;
  background: rgba(255, 255, 255, .9); border: 1px solid #ebedeb; color: var(--ueberschrift) !important;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.gescrollt .nach-oben { opacity: 1; visibility: visible; }
@media (max-width: 767px) { .fuss { min-height: 0; background: #000; } .fuss__silhouette { display: none; } .fuss__leiste { padding: 30px 20px; } }

/* ---------- Großansicht (Galerie) ---------- */
.grossansicht { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.grossansicht::backdrop { background: rgba(0, 0, 0, .88); }
.grossansicht figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.grossansicht img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; box-shadow: 0 5px 30px rgba(0, 0, 0, .5); }
.grossansicht figcaption { color: #eee; font-size: 15px; padding: 10px; text-align: center; max-width: 80vw; }
.grossansicht button { position: fixed; background: rgba(0, 0, 0, .4); color: #fff; border: 0; font-size: 42px; line-height: 1; width: 56px; height: 56px; cursor: pointer; border-radius: 50%; }
.grossansicht button:hover { background: var(--gold); }
.grossansicht__zurueck { left: 15px; top: 50%; transform: translateY(-50%); }
.grossansicht__weiter { right: 15px; top: 50%; transform: translateY(-50%); }
.grossansicht__zu { right: 15px; top: 15px; }

/* ---------- Druck ---------- */
@media print {
  .kopf, .kontaktleiste, .fuss, .nach-oben, .kopfbild, .filter, .knoepfe { display: none !important; }
  body { background: #fff; }
  .inhalt { display: block; padding: 0; }
}

/* 404 */
.mittig { text-align: center; }
.linkliste { list-style: none; padding: 0; text-align: center; font-size: 19px; }
.linkliste li { margin: .3em 0; }

/* Überschriften direkt über Kachel-Rastern und Listen mittig (wie bisher) */
.inhalt > h2:has(+ .kacheln), .inhalt > h2:has(+ .liste), .inhalt > h2:has(+ a + .kacheln) { text-align: center; }
.liste--aktuelles > h2, .inhalt > h2:has(+ .liste--aktuelles) { text-align: left; }

/* lange Aufzählungen zweispaltig (wie bisher) */
@media (min-width: 768px) { .inhalt > ul:has(> li:nth-child(9)) { columns: 2; column-gap: 40px; } .inhalt > ul:has(> li:nth-child(9)) li { break-inside: avoid; } }

/* ---------- Veranstaltungen: Platzhalter und Rückblick ---------- */
.keine-termine { margin: 25px 0 30px; padding: 22px 25px; background: #fff; border-top: 3px solid var(--gold); }
.keine-termine--foto { margin-inline: -28px; background: var(--gold-80); border-top: 0; color: #fff; }
.keine-termine__text { margin: 0; }
.keine-termine .knoepfe, .band--aktuelles .keine-termine .knoepfe { margin: 1em 0 0; justify-content: flex-start; }
.keine-termine .knopf { padding: 10px 18px; font-size: 15.5px; }
@media (max-width: 600px) { .keine-termine--foto { margin-inline: 0; } }
.news-karte__art { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--bordeaux); }
.rueckblick { margin-top: 50px; }
.rueckblick__titel { display: inline; margin: 0; font: inherit; color: inherit; }
.news-liste--rueckblick { gap: 35px; margin-top: 0; }
.news-eintrag--vergangen .news__datum, .news__datum--vorbei { color: #6b6461; font-style: italic; }
