/* Gemeinsames Stylesheet aller Seiten (Startseite, Impressum, Datenschutz, 404). */
/* Schrift lokal eingebunden (keine Verbindung zu Google Fonts – siehe datenschutz.html) */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/lato-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/lato-700.woff2") format("woff2"); }
/* Layout: klassische Gastgeber-Seite — Navigation, Außenaufnahme als Start, dann Haus → Einheiten → Lage → Kontakt */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f3;
  --ink: #202522;
  --muted: #626a66;
  --line: #dde1de;
  --primary: #24473d;        /* Buttons, Links */
  --primary-ink: #ffffff;
  --placeholder: #d7ddd9;
  --font: "Lato", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a19; --bg-alt: #1f2422; --ink: #eef0ee; --muted: #a7aeaa; --line: #303633;
    --primary: #3b6d5f; --primary-ink: #ffffff; --placeholder: #2b3330; --link: #8fc0b1; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171a19; --bg-alt: #1f2422; --ink: #eef0ee; --muted: #a7aeaa; --line: #303633;
  --primary: #3b6d5f; --primary-ink: #ffffff; --placeholder: #2b3330; --link: #8fc0b1; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--link, var(--primary)); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 4px; border: 1px solid var(--primary); font: inherit; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-solid { background: var(--primary); color: var(--primary-ink); }
.btn-solid:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--link, var(--primary)); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-light { background: #fff; color: #1d2a25; border-color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn svg { width: 15px; height: 15px; flex: none; }

/* Navigation */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.logo { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav ul a:hover { color: var(--primary); }
.nav .btn { padding: 9px 16px; }
.nav ul a { display: inline-flex; align-items: center; min-height: 44px; }
.nav .rechts { display: flex; align-items: center; gap: 14px; flex: none; }
.nav .sprache { font-size: 0.9rem; color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 760px) {
  .nav { position: static; }
  .nav .wrap { flex-wrap: wrap; height: auto; padding-block: 10px 0; gap: 0 16px; }
  .nav nav { order: 3; width: 100%; overflow-x: auto; border-top: 1px solid var(--line); margin-top: 10px; }
  .nav ul { gap: 22px; white-space: nowrap; }
  .nav .rechts { margin-left: auto; }
  section { scroll-margin-top: 0; }
}

/* Startansicht: Außenaufnahme */
.hero { position: relative; min-height: clamp(400px, 62vh, 640px); display: flex; align-items: flex-end; background: var(--placeholder); color: #fff; overflow: hidden; }
.hero picture { display: contents; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .ph-hero { position: absolute; inset: 0; background: linear-gradient(160deg, #8fa39a 0%, #5b7268 55%, #3c4f47 100%); }
.hero .ph-hero span { position: absolute; top: 20px; right: 20px; font-size: 0.8rem; background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 3px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,16,14,.78) 0%, rgba(10,16,14,.25) 55%, rgba(10,16,14,0) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-block: 40px; display: flex; flex-direction: column; gap: 14px; }
.hero .ort { font-size: 1rem; opacity: .9; }
.hero p.sub { max-width: 36em; font-size: 1.1rem; opacity: .95; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Abschnitte */
section { padding-block: 64px; scroll-margin-top: 64px; }
section.hero { padding: 0; }
section.alt { background: var(--bg-alt); }
.section-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 60ch; }
@media (max-width: 760px) { section { padding-block: 44px; } }

/* Haus */
.haus { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.haus .text { min-width: 0; display: flex; flex-direction: column; gap: 14px; max-width: 62ch; }
.haus .text p + p { margin-top: 2px; }
.haus .bilder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.haus .bilder .pic:first-child { grid-column: span 2; }
.pic { display: block; margin: 0; position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--placeholder); border-radius: 4px; }
.pic picture { display: contents; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
a.pic { cursor: zoom-in; }
.pic.leer { aspect-ratio: 16 / 9; }
.pic.wide { aspect-ratio: 16 / 9; }
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; text-align: center; padding: 12px; }
@media (max-width: 760px) { .haus { grid-template-columns: 1fr; gap: 24px; } }
.merkmale { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 6px 0 0; list-style: none; font-size: 0.95rem; }
.merkmale li { display: flex; align-items: center; gap: 8px; }
.merkmale li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* Einheiten */
/* Eine Karte besteht aus Bild, Text mit Buttons und Details. Den Rahmen zeichnen diese drei Teile,
   nicht die Karte selbst: So endet jede Karte sichtbar nach ihren eigenen Details. */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.unit { display: flex; flex-direction: column; }
.unit > * { border-inline: 1px solid var(--line); }
.unit > .inner, .unit > details { background: var(--bg); }
.unit > :first-child { border-top: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.unit > :last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.unit .thumbs .pic { border-radius: 0; }
.unit .inner { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
/* Karten einer Reihe teilen sich die Zeilen Bild, Text und Details: Die Buttons stehen auf einer Höhe,
   und aufgeklappte Details schieben in den Nachbarkarten nichts auseinander. */
@supports (grid-template-rows: subgrid) {
  .units { align-items: stretch; }
  .unit { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
  .unit > details { align-self: start; }
}
.unit .kurz { color: var(--muted); }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-size: 0.92rem; color: var(--muted); }
.kennzahlen b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.unit .buchen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 6px; }
.unit details { border-top: 1px solid var(--line); padding: 0 20px; }
.unit summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--link, var(--primary)); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.unit summary::-webkit-details-marker { display: none; }
.unit summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.unit details[open] summary::after { content: "–"; }
.unit .detail { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
.unit .detail p + p { margin-top: 6px; }
.amen { columns: 2; column-gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 0.93rem; }
.amen li { break-inside: avoid; padding: 4px 0 4px 18px; position: relative; }
.amen li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-size: 0.85rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumbs .pic { aspect-ratio: 1; cursor: zoom-in; }

/* Lage */
.lage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.lage .text { display: flex; flex-direction: column; gap: 12px; max-width: 60ch; }
.poi { list-style: none; margin: 0; padding: 0; }
.poi li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.poi li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .lage { grid-template-columns: 1fr; gap: 24px; } }

/* Gut zu wissen */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.info div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.info span { font-size: 0.82rem; color: var(--muted); }
.info b { font-weight: 700; }

/* Kontakt & Fußzeile */
.kontakt .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.kontakt .col { display: flex; flex-direction: column; gap: 4px; }
.kontakt .col b { display: block; margin-bottom: 4px; }
.kontakt .hinweis { color: var(--muted); font-size: 0.95rem; max-width: 48ch; margin-top: 8px; }
@media (max-width: 640px) { .kontakt .grid { grid-template-columns: 1fr; } }

/* Förderhinweis (nur bei geförderten Objekten) */
.foerderung .leiste { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; max-width: 760px; }
.foerderung .leiste img { display: block; width: 100%; height: auto; }
.foerderung .leiste .ph { position: static; min-height: 96px; color: #626a66; }
.foerderung .text { max-width: 68ch; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.foerderung .massnahme { color: var(--muted); font-size: 0.95rem; }
footer { border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px 100px; }
footer nav { display: flex; gap: 18px; }
@media (min-width: 641px) { footer .wrap { padding-bottom: 22px; } }

/* Mobile Leiste */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: none; }
.bar .btn { width: 100%; }
@media (max-width: 640px) { .bar { display: flex; } .nav .rechts .btn { display: none; } }

/* Bildansicht (seite.js) */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8,10,9,.94); display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lightbox .oben { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; font-size: 0.9rem; }
.lightbox .mitte { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .text { padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 0.95rem; min-height: 2.6em; }
.lightbox button { background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; min-width: 44px; min-height: 44px; padding: 6px 14px; font: inherit; cursor: pointer; }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox .pfeil { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.4rem; line-height: 1; }
.lightbox .zurueck { left: 12px; } .lightbox .vor { right: 12px; }
.lightbox[data-einzeln] .pfeil { display: none; }

/* Hilfen */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 60; background: var(--bg); color: var(--ink); padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; }
.skip:focus { top: 8px; }
.ziel { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.ziel svg { width: 14px; height: 14px; }
.folgt { color: var(--muted); font-size: 0.93rem; margin-top: auto; padding-top: 6px; }
.haus.ohne-bilder { grid-template-columns: 1fr; }
.unit .buchen { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
footer .wrap { align-items: center; }
.kontakt .col a { overflow-wrap: anywhere; }

/* Impressum, Datenschutz, 404 */
.recht header { border-bottom: 1px solid var(--line); }
.recht header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-block: 10px; }
.recht .wrap { max-width: 760px; }
.recht main { padding-block: 40px 64px; overflow-wrap: break-word; }
.recht h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; }
.recht h2 { font-size: 1.25rem; line-height: 1.3; margin: 36px 0 8px; }
.recht p { margin: 0 0 12px; }
.recht .unter { color: var(--muted); margin-bottom: 8px; }
.recht dl { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 6px 20px; margin: 0 0 12px; }
.recht dt { color: var(--muted); }
.recht dd { margin: 0; }
.recht footer .wrap { padding-bottom: 22px; }
@media (max-width: 520px) { .recht dl { grid-template-columns: 1fr; gap: 0; } .recht dd { margin-bottom: 10px; } }
