/* ==========================================================================
   Wohnraumwerk – Hauptstylesheet
   Ohne Framework. Farben kommen als CSS-Variablen aus den Einstellungen
   (siehe _main.php), hier stehen nur die Standardwerte.

   Schrift auf Grün ist weiß wie im Original (Entscheidung Auftraggeber 2026-09-28,
   bewusst vor dem WCAG-Kontrastwert).
   ========================================================================== */

/* ---------- Schriften (lokal, DSGVO) ---------- */
@font-face { font-family: "Edmondsans"; src: url("../fonts/edmondsans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Edmondsans"; src: url("../fonts/edmondsans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Edmondsans"; src: url("../fonts/edmondsans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Martel Sans reserviert unten viel Platz (Devanagari-Metriken: 1150/674) – lateinische Schrift saß dadurch in
   Knöpfen und Bändern zu hoch. Gleiche Gesamthöhe, Mitte auf Höhe der Buchstaben verschoben. */
@font-face { font-family: "Martel Sans"; src: url("../fonts/martel-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; ascent-override: 122.2%; descent-override: 60.2%; }
@font-face { font-family: "Martel Sans"; src: url("../fonts/martel-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; ascent-override: 122.2%; descent-override: 60.2%; }
@font-face { font-family: "Martel Sans"; src: url("../fonts/martel-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; ascent-override: 122.2%; descent-override: 60.2%; }

/* ---------- Variablen ---------- */
:root {
	--gruen: #96a797;
	--gruen-hell: #aabdab;
	--gruen-flaeche: #667a67;  /* Grün hinter weißer Schrift (Kontrast ≥ 4,5:1, WCAG AA) */
	--schiefer: #32363f;
	--text: #404040;
	--hintergrund: #f0f0f0;
	--weiss: #fff;
	--schwarz-band: #252525;
	--tabellenkopf: #6b6f78;
	--verkauft: #e1bcd7;
	--rahmen: #9a9a9a;

	--schrift-titel: "Edmondsans", "Trebuchet MS", sans-serif;
	--schrift-text: "Martel Sans", "Segoe UI", system-ui, sans-serif;

	--breite: 1080px;
	--rand: 20px;
	--leiste: 56px;
	--abstand: clamp(48px, 7vw, 80px);
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(100% * var(--textskala, 1)); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--leiste) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--hintergrund); color: var(--text); font: 400 1rem/1.65 var(--schrift-text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--schiefer); }
h1, h2, h3, h4 { font-family: var(--schrift-titel); font-weight: 700; color: var(--schiefer); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--schiefer); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--schiefer); color: var(--weiss); padding: 8px 16px; text-decoration: none; }
.skip-link:focus { top: 8px; color: var(--weiss); }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.wrap { width: 100%; max-width: calc(var(--breite) + 2 * var(--rand)); margin-inline: auto; padding-inline: var(--rand); }
main:focus { outline: none; }

/* ---------- Kopfleiste / Navigation ---------- */
.kopfleiste { position: sticky; top: 0; z-index: 30; background: var(--gruen-flaeche); min-height: var(--leiste); transition: box-shadow .3s ease; }
.kopfleiste.gescrollt { box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.hauptnavigation { position: relative; display: flex; justify-content: center; align-items: center; min-height: var(--leiste); }
/* Menüpunkte: Versalien mit Abstand, Linie wächst beim Hover aus der Mitte, aktuelle Seite mit fester Linie */
.hauptmenue { display: flex; flex-wrap: nowrap; white-space: nowrap; justify-content: center; align-items: center; gap: 0 clamp(4px, 1.1vw, 14px); list-style: none; margin: 0; padding: 0 var(--rand); }
.hauptmenue a { position: relative; display: block; padding: 8px clamp(8px, .9vw, 14px); border-radius: 4px; text-decoration: none; color: var(--weiss); font: 500 .8rem/1.2 var(--schrift-text); letter-spacing: .14em; text-transform: uppercase; transition: background-color .25s ease; }
.hauptmenue a::after { content: ""; position: absolute; left: clamp(8px, .9vw, 14px); right: clamp(8px, .9vw, 14px); bottom: 2px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.hauptmenue a:hover { background: rgba(0, 0, 0, .14); }
.hauptmenue a:hover::after, .hauptmenue a[aria-current]::after { transform: scaleX(1); }
.hauptmenue a[aria-current] { font-weight: 700; }
.hauptmenue a:focus-visible { outline: 2px solid var(--weiss); outline-offset: 2px; }
.kopfleiste-telefon { display: none; }
@media (min-width: 1200px) {
	.kopfleiste-telefon { position: absolute; right: var(--rand); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 8px; color: var(--weiss); text-decoration: none; font: 500 .85rem var(--schrift-text); letter-spacing: .04em; }
	.kopfleiste-telefon:hover { text-decoration: underline; text-underline-offset: 3px; }
	.kopfleiste-telefon .icon { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { .hauptmenue a::after { transition: none; } }
.nav-toggle { display: none; background: none; border: 0; color: var(--weiss); padding: 8px 16px; margin-left: auto; cursor: pointer; }
.nav-toggle .icon { width: 32px; height: 32px; }
.nav-toggle { align-items: center; gap: 10px; font: 500 .8rem var(--schrift-text); letter-spacing: .14em; text-transform: uppercase; }
html.gesperrt { overflow: hidden; }

/* ---------- Handy-Menü: Vollbild-Overlay ---------- */
.nav-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--schiefer); color: var(--weiss); overflow: hidden; }
.nav-dialog::backdrop { background: transparent; }
.nav-dialog-innen { height: 100%; overflow-y: auto; display: flex; flex-direction: column; padding: 0 var(--rand) max(24px, env(safe-area-inset-bottom)); }
.nav-dialog-leiste { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.nav-dialog-logo { color: var(--weiss); text-decoration: none; font: 700 1.1rem var(--schrift-titel); }
.nav-dialog-logo img { display: block; height: 64px; width: auto; }
.nav-schliessen { display: inline-flex !important; margin: 0; padding: 8px 0; }
.nav-schliessen .icon { width: 26px; height: 26px; }
.nav-index { list-style: none; margin: 18px 0 0; padding: 0; }
.nav-index a { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); color: var(--weiss); text-decoration: none; }
.nav-index-nr { font-size: .75rem; letter-spacing: .1em; color: var(--gruen-hell); font-variant-numeric: tabular-nums; }
.nav-index-name { font: 500 clamp(1.5rem, 1.1rem + 2vw, 2rem)/1.2 var(--schrift-titel); }
.nav-index .icon { width: 20px; height: 20px; align-self: center; color: var(--gruen-hell); transition: transform .25s ease; }
.nav-index a:hover .icon, .nav-index a:focus-visible .icon { transform: translateX(4px); }
.nav-index a[aria-current] .nav-index-name { color: var(--gruen-hell); }
.nav-dialog-fuss { margin-top: auto; padding-top: 32px; display: grid; gap: 10px; font-size: .95rem; }
.nav-dialog-fuss a { color: var(--weiss); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.nav-dialog-fuss .icon { width: 20px; height: 20px; color: var(--gruen-hell); }
.nav-dialog-social { display: flex; gap: 18px; margin: 8px 0 0; }
.nav-dialog-social .icon { width: 26px; height: 26px; color: var(--weiss); }
@media (prefers-reduced-motion: no-preference) {
	.nav-dialog { opacity: 0; transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete; }
	.nav-dialog[open] { opacity: 1; }
	@starting-style { .nav-dialog[open] { opacity: 0; } }
	.nav-index li { opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
	.nav-dialog[open] .nav-index li { opacity: 1; transform: none; transition-delay: calc(var(--i) * 45ms + 60ms); }
	@starting-style { .nav-dialog[open] .nav-index li { opacity: 0; transform: translateY(12px); } }
}
@media (min-width: 761px) { html:not(.nav-eng) .nav-dialog { display: none !important; } }
/* Desktop, wenn das Menü nicht in eine Zeile passt (misst main.js – je nach Breite und Textgröße):
   zuerst ohne Telefonnummer, sonst MENÜ-Knopf mit Vollbild-Overlay wie am Handy */
html.nav-ohne-telefon .kopfleiste-telefon { display: none !important; }
html.nav-eng .hauptmenue, html.nav-eng .kopfleiste-telefon { display: none !important; }
html.nav-eng .nav-toggle { display: inline-flex; }

.logo-box { position: absolute; top: var(--leiste); left: 0; z-index: 20; width: 150px; height: 210px; background: var(--schiefer); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { font: 700 38px/.95 var(--schrift-titel); color: var(--weiss); letter-spacing: .02em; }

.newsletter-tab { position: absolute; top: calc(var(--leiste) + 305px); left: 0; z-index: 20; width: 98px; height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--schiefer); color: var(--weiss); border: 2px solid var(--weiss); font: 400 13.6px var(--schrift-text); cursor: pointer; } /* feste Größe: Box ist quadratisch, skaliert nicht mit der Textgröße */
.newsletter-tab .icon { width: 44px; height: 44px; }
.newsletter-tab:hover { background: var(--schwarz-band); }

/* ---------- Kopfbild ---------- */
.kopf { position: relative; background: var(--gruen-hell); }
.kopf-bild, .slider-kopf .slider-bild img { width: 100%; height: clamp(235px, 45vw, 650px); object-fit: cover; }
.status-band { margin: 0; min-height: 64px; padding: 18px var(--rand); display: flex; align-items: center; justify-content: center; background: var(--gruen-flaeche); color: var(--weiss); letter-spacing: .08em; text-transform: uppercase; font-size: 1.3rem; }
.status-band:empty { min-height: 64px; }
.status-band.status-reserviert { background: var(--schiefer); color: var(--weiss); font-weight: 700; }
.status-band.status-verkauft, .status-band.status-ausverkauft { background: var(--verkauft); color: #000; font-weight: 700; }

/* ---------- Slider ---------- */
.slider { position: relative; }
.slider-spur { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider-spur::-webkit-scrollbar { display: none; }
.slider-bild { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
/* Kopfbereich: Überblendung statt Schieben (ohne JavaScript bleibt das erste Bild stehen) */
.slider-kopf .slider-spur { display: grid; overflow: hidden; scroll-snap-type: none; }
.slider-kopf .slider-bild { grid-area: 1 / 1; opacity: 0; transition: opacity 1.2s ease-in-out; }
.slider-kopf .slider-bild:first-child, .slider-kopf.blende .slider-bild.aktiv { opacity: 1; z-index: 1; }
.slider-kopf.blende .slider-bild:not(.aktiv) { opacity: 0; z-index: 0; }
@media (prefers-reduced-motion: reduce) { .slider-kopf .slider-bild { transition: none; } }
.slider-knopf { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--schiefer); display: grid; place-items: center; cursor: pointer; }
.slider-knopf .icon { width: 22px; height: 22px; }
.slider-zurueck { left: 16px; }
.slider-weiter { right: 16px; }
.slider-kopf .slider-zurueck { left: 166px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-top: 16px; font-size: .85rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 4px; color: var(--text); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--schiefer); font-weight: 700; }

/* ---------- Seitenkopf / Abschnittstitel ---------- */
.seiten-kopf { padding-top: clamp(32px, 5vw, 56px); padding-bottom: 8px; }
.seiten-titel, .abschnitt-titel { text-align: right; padding-bottom: 6px; border-bottom: 4px solid var(--gruen); margin-bottom: .5em; }
.status-marke { display: inline-block; margin: 0 0 6px; padding: 6px 16px; background: var(--schiefer); color: var(--weiss); font-weight: 700; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.status-marke.status-verkauft, .status-marke.status-ausverkauft { background: var(--verkauft); color: #000; }
.status-marke.status-verfuegbar { background: var(--gruen-flaeche); }
.seiten-kopf-links .seiten-titel { text-align: left; border: 0; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem); line-height: 1.5; }
/* Projekt und Immobilie: mehr Luft um die H1 (Marke – Titel – Zurück-Link) */
.seiten-kopf-objekt { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 44px); }
.seiten-kopf-objekt .status-marke { margin-bottom: clamp(20px, 3vw, 32px); }
.seiten-kopf-objekt .seiten-titel { line-height: 1.3; margin-bottom: clamp(20px, 3vw, 32px); padding-bottom: .3em; border-bottom: 4px solid var(--gruen); } /* Linie wie bei den anderen Seiten */
.seiten-kopf-objekt .zurueck-link { margin: 0; }
.seiten-kopf-objekt .anker-menue { margin-top: clamp(20px, 3vw, 32px); }
.abschnitt-titel-links { text-align: left; }
.abschnitt-untertitel { text-align: right; margin-top: -.4em; }
.seiten-intro { text-align: right; }
.artikel-meta { text-align: right; font-size: .9rem; }
.block { padding-block: calc(var(--abstand) / 2); }
.abschnitt { margin-block: 0 48px; }
.fliesstext > :last-child { margin-bottom: 0; }
.fliesstext a { color: var(--schiefer); }
.fliesstext img { margin-block: 1em; }
.fliesstext img, .fliesstext iframe, .fliesstext video, .fliesstext figure, .fliesstext table { max-width: 100%; height: auto; }
.fliesstext figure { margin-inline: 0; }
.fliesstext table { display: block; overflow-x: auto; }
.fliesstext { overflow-wrap: break-word; }
/* Zurück-Links als Knopf wie das Anker-Menü: weiß mit grünem Rahmen, beim Überfahren grün mit weißer Schrift */
.zurueck-link a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px 8px 12px; background: var(--weiss); border: 2px solid var(--gruen); border-radius: 4px; color: var(--schiefer); text-decoration: none; transition: background-color .2s, color .2s; }
.zurueck-link a:hover, .zurueck-link a:focus-visible { background: var(--gruen-flaeche); border-color: var(--gruen-flaeche); color: var(--weiss); }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 24px; border: 2px solid transparent; border-radius: 6px; font: 400 1rem var(--schrift-text); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.knopf-dunkel { background: var(--schiefer); color: var(--hintergrund); }
.knopf-dunkel:hover { background: var(--gruen-hell); color: var(--schiefer); }
.knopf-gruen { background: var(--gruen-flaeche); color: var(--weiss); border-color: var(--gruen-flaeche); border-radius: 0; }
.knopf-gruen:hover { background: var(--schiefer); border-color: var(--schiefer); }
.knopf-rahmen { background: var(--weiss); color: var(--schiefer); border-color: var(--gruen); border-radius: 4px; }
.knopf-rahmen:hover { background: var(--gruen-hell); }
.knopf-klein { min-height: 40px; padding: 6px 10px; border-radius: 0; background: var(--gruen-flaeche); color: var(--weiss); line-height: 1.2; font-size: .9rem; width: 100%; }
.knopf-klein:hover { background: var(--schiefer); color: var(--weiss); }

/* ---------- Kacheln (Projekte, Immobilien, Blog, Referenzen) ---------- */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 39px; }
.kachel { background: var(--weiss); }
.kachel-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text); }
.kachel-bild { position: relative; aspect-ratio: 255 / 256; background: #ddd; overflow: hidden; }
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.kachel-link:hover .kachel-bild img { transform: scale(1.03); }
.kachel-status { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 8px 4px 8px; background: var(--schiefer); color: var(--weiss); text-align: center; font-size: .95rem; }
.kachel-text { padding: 14px 16px 22px; text-align: center; }
.kachel-titel { font-size: 1.2rem; font-weight: 500; margin-bottom: .45em; }
.kachel-text p { font-style: italic; font-size: .92rem; line-height: 1.45; margin: .5em 0 0; }
.block-mehr { margin: 36px 0 0; text-align: center; }
.block-mehr .knopf-dunkel:hover, .block-mehr .knopf-dunkel:focus-visible { background: var(--weiss); color: var(--schiefer); } /* auf dem grünen Band: nie Schiefer auf Grün */
.kachel-text .kachel-eckdaten { font-style: normal; font-weight: 600; color: var(--schiefer); }

/* ---------- Wohnungsfilter (/wohnungen/) ---------- */
/* Handy 2 Spalten, ab 760 px 4 Spalten: Zimmer · Fläche · Preis · Lage / Projekt · Sortierung · Garten · Anzeigen */
.wohnungsfilter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: end; margin-block: 8px 12px; padding-block: 18px; border-block: 2px solid var(--gruen); }
@media (min-width: 760px) { .wohnungsfilter { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; } }
.filter-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-feld label { font-size: .85rem; font-weight: 600; color: var(--schiefer); }
.filter-feld select { width: 100%; min-height: 44px; padding: 6px 10px; border: 2px solid var(--gruen); border-radius: 4px; background: var(--weiss); color: var(--schiefer); font: 400 1rem var(--schrift-text); }
.filter-feld select:focus-visible, .filter-check input:focus-visible { outline: 3px solid var(--schiefer); outline-offset: 2px; }
.filter-check { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.filter-check input { width: 22px; height: 22px; accent-color: var(--gruen-flaeche); margin: 0; }
.filter-check label { font-size: 1rem; font-weight: 400; }
.filter-aktionen .knopf { width: 100%; min-height: 44px; padding-block: 8px; border-radius: 4px; } /* gleiche Höhe wie die Auswahlfelder */
.filter-zuruecksetzen { color: var(--schiefer); font-weight: 400; }
.filter-ergebnis { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 18px; font-weight: 600; color: var(--schiefer); }
.trenner { display: block; width: 47px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--gruen); }
.kachel-gedimmt .kachel-bild img { opacity: .55; }
/* Hover: die übrigen Projekte/Immobilien werden unscharf */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.kacheln-fokus .kachel { transition: filter .3s, opacity .3s; }
	.kacheln-fokus:has(.kachel:hover) .kachel:not(:hover) { filter: blur(3px); opacity: .7; }
}
.kachel-gedimmt .kachel-status { background: #6d7079; }
.kachel-gedimmt .kachel-text { color: #5b5b5b; }

.band-gruen { background: var(--gruen-flaeche); padding-block: var(--abstand); }
.band-gruen .abschnitt-titel { color: var(--weiss); border-color: var(--weiss); }

/* ---------- Zweispaltig: Inhalt + Berater-Box ---------- */
.zweispaltig { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 425px); gap: 16px; justify-content: space-between; align-items: start; padding-block: 16px 32px; }
.spalte-seite { position: sticky; top: calc(var(--leiste) + 16px); }

/* ---------- Anker-Menü (Projekt) ---------- */
.anker-menue { display: flex; flex-wrap: wrap; gap: 12px 15px; }
.anker-menue a { min-width: 150px; padding: 8px 16px; background: var(--weiss); border: 2px solid var(--gruen); border-radius: 4px; text-align: center; text-decoration: none; color: var(--schiefer); }
.anker-menue a:hover, .anker-menue a:focus-visible { background: var(--gruen-flaeche); color: var(--weiss); }

/* ---------- Wohnungstabelle ---------- */
.tabelle-scroll { overflow-x: auto; }
.einheiten { width: 100%; border-collapse: collapse; border: 1px solid var(--rahmen); font-size: .95rem; }
.einheiten th { background: var(--tabellenkopf); color: var(--weiss); text-align: left; font-weight: 500; padding: 12px; }
.einheiten td { padding: 10px 12px; border-top: 1px solid var(--rahmen); vertical-align: middle; }
.einheiten td:last-child { width: 1%; min-width: 96px; }
.einheiten .status-reserviert td { background: rgba(150, 167, 151, .45); }
/* „Reserviert“ als Reiter oben links in der Zeile – verändert die Spaltenbreite nicht */
.einheiten .status-reserviert td:first-child { position: relative; }
.einheit-marke { position: absolute; top: 0; left: 0; padding: 2px 10px; background: var(--schiefer); color: var(--weiss); font-size: .68rem; line-height: 1.5; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 0 0 4px 0; white-space: nowrap; }
.einheiten .status-verkauft td { color: #9a9a9a; background: #e4e4e4; }
.einheiten .status-verkauft td:first-child { color: #8a8a8a; }
.einheit-status { display: block; margin-top: 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--schiefer); }
.einheiten .status-verkauft .einheit-status { color: #6b3c5f; }

/* ---------- Berater-Box ---------- */
.berater-box { background: var(--gruen-flaeche); color: var(--weiss); padding: 20px 10px 32px; }
.berater-box-titel { color: var(--weiss); text-align: center; font-weight: 400; font-size: 1.4rem; margin-bottom: .6em; }
/* Verkauft / ausverkauft: Box grau, Inhalt blass, Formular deaktiviert – nur der Hinweis bleibt voll lesbar */
.berater-box-inaktiv { background: #6b6f75; } /* weiße Schrift 5,1:1 (AA) */
.berater-box-inaktiv > :not(.berater-hinweis) { opacity: .45; }
.berater-box-inaktiv .berater-foto { filter: grayscale(1); }
.berater-box-inaktiv :disabled { cursor: not-allowed; }
.berater-hinweis { margin: 0 0 18px; padding: 10px 12px; background: var(--verkauft); color: #000; font-weight: 700; text-align: center; }
.berater-foto { margin: 0 auto; width: 230px; aspect-ratio: 230 / 290; object-fit: cover; }
.berater-name { text-align: center; font: 400 1.35rem var(--schrift-titel); margin: 8px 0 14px; }
.berater-kontakt { list-style: none; margin: 0 0 24px; padding: 18px 0 0; border-top: 3px solid var(--weiss); width: 50%; }
.berater-kontakt li { display: flex; align-items: center; gap: 12px; white-space: nowrap; margin-bottom: 8px; }
.berater-kontakt a { text-decoration: none; }
.berater-kontakt a:hover { text-decoration: underline; }
.berater-kontakt .icon { width: 20px; height: 20px; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 12px; }
.feld label { display: block; font-size: .8rem; margin-bottom: 2px; }
.formular input[type=text], .formular input[type=email], .formular input[type=tel], .formular textarea { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid #c9c9c9; border-radius: 4px; background: var(--weiss); color: #222; font: 400 .95rem var(--schrift-text); }
.formular textarea { min-height: 90px; resize: vertical; }
.formular input::placeholder, .formular textarea::placeholder { color: #767676; }
.feld-zustimmung { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; line-height: 1.45; }
.feld-zustimmung input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.feld-zustimmung label { font-size: .8rem; margin: 0; }
.feld-honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formular-meldung:empty { display: none; }
.formular-meldung { margin: 0; padding: 10px 12px; background: var(--weiss); color: var(--schiefer); border-left: 4px solid var(--schiefer); }
.formular-meldung.fehler { border-color: #b3261e; }
/* Beschriftungen visuell wie im Original als Platzhalter, für Screenreader vorhanden */
.berater-box .feld:not(.feld-zustimmung) label, .newsletter .feld:not(.feld-zustimmung) label, .kontakt-panel-formular .feld:not(.feld-zustimmung) label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.berater-box .formular { padding: 16px 0 0; }
.berater-box .knopf-dunkel { margin-top: 20px; border-radius: 4px; }

/* ---------- Merkmale ---------- */
.merkmale { margin: 0 0 24px; padding: 10px 12px; border: 2px dashed var(--schiefer); } /* gleiche Größe wie der Fließtext */
.merkmale dl { margin: 0; }
.merkmale .merkmal-hinweis { margin: 8px 0 0; }
.merkmal { display: flex; align-items: baseline; gap: 4px; }
.merkmal dt::after { content: ""; }
.merkmal dt { flex: none; }
.merkmal dd { margin: 0; flex: 0 1 auto; min-width: 0; text-align: right; } /* langer Wert (Energieausweis) darf am Handy umbrechen */
.merkmal::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted #555; margin-bottom: .3em; }
.merkmal dd { order: 2; }
.merkmal-hinweis { font-size: .9rem; }
.immobilie-titelbild { margin-bottom: 32px; width: 100%; }

/* ---------- Dokumente ---------- */
.dokumente { margin-block: 48px; }
.dokumente-liste { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; max-width: 530px; }
.knopf-download { width: 100%; justify-content: flex-start; }
.knopf-download .dokument-info { margin-left: auto; font-size: .8rem; opacity: .85; }

/* ---------- Karte ---------- */
.karte-block { margin-bottom: 16px; }
.karte { position: relative; height: 300px; background: var(--weiss); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); border-radius: 4px; overflow: hidden; z-index: 0; }
.karte-platzhalter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; font-size: .9rem; }
.karte-platzhalter p { margin: 0; max-width: 420px; }
.karte.geladen .karte-platzhalter { display: none; }
.karte-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.karte-adresse { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; }
.karten-logo { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.karten-marker { width: 30px; height: 40px; color: var(--schiefer); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.leaflet-container { font-family: var(--schrift-text); }
.leaflet-popup-content a { color: var(--schiefer); font-weight: 600; }

/* ---------- Galerie + Lightbox ---------- */
.galerie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.galerie-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.galerie a { display: block; }
.galerie img { width: 100%; aspect-ratio: 16 / 10.3; object-fit: cover; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .92); color: var(--weiss); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: 90vw; }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; }
.lightbox figcaption { text-align: center; padding: 8px; }
.lightbox-nav, .dialog-schliessen { position: absolute; background: rgba(255, 255, 255, .9); color: var(--schiefer); border: 0; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.lightbox-nav .icon, .dialog-schliessen .icon { width: 24px; height: 24px; }
.lightbox-zurueck { left: 16px; top: 50%; }
.lightbox-weiter { right: 16px; top: 50%; }
.dialog-schliessen { top: 16px; right: 16px; }

/* ---------- Newsletter ---------- */
.newsletter-band { background: var(--schwarz-band); color: var(--weiss); padding-block: var(--abstand); }
.newsletter-titel { font: 400 2rem/1.2 var(--schrift-text); letter-spacing: .06em; text-transform: uppercase; color: var(--weiss); margin-bottom: .3em; }
.newsletter-text { margin-bottom: 40px; }
.newsletter .formular { gap: 12px; }
.newsletter .feld-zustimmung { color: #c4d2c5; }
.newsletter .feld-zustimmung a { color: #c4d2c5; }
.newsletter .knopf-gruen { width: 100%; min-height: 36px; }
.dialog { max-width: 640px; width: calc(100% - 32px); padding: 40px 32px 32px; border: 0; background: var(--schwarz-band); color: var(--weiss); }
.dialog::backdrop { background: rgba(0, 0, 0, .6); }

/* Dialoge (Newsletter, Lightbox) weich ein- und ausblenden */
@media (prefers-reduced-motion: no-preference) {
	.dialog, .lightbox { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1), overlay .35s allow-discrete, display .35s allow-discrete; }
	.dialog[open], .lightbox[open] { opacity: 1; transform: none; }
	.dialog::backdrop, .lightbox::backdrop { opacity: 0; transition: opacity .35s ease, overlay .35s allow-discrete, display .35s allow-discrete; }
	.dialog[open]::backdrop, .lightbox[open]::backdrop { opacity: 1; }
	@starting-style {
		.dialog[open], .lightbox[open] { opacity: 0; transform: translateY(18px) scale(.985); }
		.dialog[open]::backdrop, .lightbox[open]::backdrop { opacity: 0; }
	}
}
.block-newsletter .newsletter { background: var(--schwarz-band); color: var(--weiss); padding: clamp(24px, 4vw, 48px); }

/* ---------- Erfahrungen ---------- */
.erfahrungen-liste { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.erfahrung figure { margin: 0; height: 100%; background: var(--weiss); padding: 20px; display: flex; flex-direction: column; }
.erfahrung blockquote { margin: 8px 0 16px; flex: 1; }
.erfahrung figcaption { font-size: .85rem; display: grid; }
.sterne { margin: 0; color: #d8a31a; display: flex; gap: 2px; }
.sterne .leer { color: #ccc; }

/* ---------- Text mit Bild / Berater-Karten / Kontakt ---------- */
.block-text-bild { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); align-items: start; }
.block-text-bild .block-bild img { width: 100%; }
.block-text-bild .block-kasten { background: var(--gruen-flaeche); color: var(--weiss); padding: 16px 20px; margin: 100px 0 0 -75px; max-width: 390px; position: relative; }
/* Links auf grünen Flächen: weiß, unterstrichen */
.block-text-bild .block-kasten a, .berater-box a, .berater-karte a, .band-gruen a:not(.knopf) { color: var(--weiss); text-decoration: underline; text-underline-offset: 2px; }
.block-text-bild .block-kasten h2 { font: 700 1rem var(--schrift-text); margin: 0; color: var(--weiss); }
.block-text-bild.bild-rechts .block-bild { order: 2; }
.block-text-bild.bild-rechts .block-kasten { margin: 100px -75px 0 auto; }
/* Instagram-Feed (Embed, erst nach Einwilligung „Externe Medien“) */
.block-instagram { border-top: 2px solid var(--gruen); margin-top: calc(var(--abstand) / 2); }
.insta-kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.insta-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); color: var(--weiss); }
.insta-avatar .icon { width: 30px; height: 30px; }
.insta-kopf-text { flex: 1 1 240px; }
.insta-titel { font-size: 1.35rem; margin: 0; }
.insta-name { font-weight: 700; color: var(--schiefer); text-decoration: none; }
.insta-name:hover { text-decoration: underline; }
.insta-folgen { display: inline-flex; align-items: center; gap: 8px; }
.insta-folgen .icon { width: 18px; height: 18px; }
.insta-embed { width: min(100%, 40rem); margin-inline: auto; background: var(--weiss); border: 1px solid #ddd; }
.insta-frame { display: block; width: 100%; height: 34rem; border: 0; background: var(--weiss); } /* Höhe folgt der Meldung des Embeds (main.js) */
.insta-frame:not([src]) { display: none; }
.insta-frame[src] ~ .insta-platzhalter { display: none; }
.insta-platzhalter { display: grid; justify-items: center; gap: 14px; padding: 36px 24px; text-align: center; }
.insta-platzhalter p { max-width: 28rem; margin: 0; font-size: .9rem; }
.insta-platzhalter .knopf { width: auto; }
.insta-einstellungen { font-size: .8rem; }
.insta-einstellungen a { color: inherit; }

/* Reihe: Bilder + Berater:innen-Karte (Kontaktseite) */
.block-text-bild:has(+ .block-reihe) { padding-bottom: 0; }
.block-text-bild + .block-reihe { padding-top: 0; }
.block-reihe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.reihe-bilder { display: contents; }
.reihe-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.block-reihe .berater-karte { width: auto; display: flex; flex-direction: column; justify-content: space-between; }
.berater-karten { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.berater-karte { background: var(--gruen-flaeche); color: var(--weiss); padding: 14px 14px 12px; width: 266px; text-align: center; }
.berater-karte img { width: 100%; margin-bottom: 12px; }
.berater-karte a { text-decoration: none; }
.block-kontaktformular { display: grid; grid-template-columns: 1fr 1.5fr; }
.kontakt-panel-marke { background: var(--schiefer); color: var(--weiss); padding: 40px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.kontakt-panel-marke h2 { color: var(--weiss); }
.kontakt-panel-marke img { width: 125px; margin-bottom: 40px; }
.kontakt-social { display: flex; gap: 48px; margin-top: 16px; }
.kontakt-social .icon { width: 24px; height: 24px; color: var(--weiss); }
.kontakt-panel-formular { background: #c1c1c1; padding: 16px; }
.kontakt-panel-formular .formular { grid-template-columns: 1fr 1fr; }
.kontakt-panel-formular .feld-breit { grid-column: 1 / -1; }

/* ---------- Blog / Artikel ---------- */
.artikel-bild { margin-bottom: 32px; width: 100%; max-width: min(100%, 550px); }
.kategorien { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.kategorien a { padding: 4px 14px; border: 2px solid var(--gruen); border-radius: 20px; text-decoration: none; background: var(--weiss); }
.kategorien a[aria-current] { background: var(--gruen-flaeche); border-color: var(--gruen-flaeche); color: var(--weiss); }
.pagination ul { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 40px 0 0; }
.pagination a { display: block; min-width: 44px; padding: 10px 12px; text-align: center; background: var(--weiss); text-decoration: none; }
.pagination a[aria-current] { background: var(--gruen-flaeche); color: var(--weiss); }

/* ---------- Fußzeile ---------- */
.fusszeile { background: var(--schiefer); color: var(--weiss); padding-block: 70px 60px; }
.fusszeile-raster { display: grid; grid-template-columns: 1fr 1fr 290px; gap: 32px 20px; align-items: start; }
.fusszeile-logo { grid-column: 1 / 3; }
.fusszeile-logo img { width: 382px; max-width: 100%; }
.fusszeile-adresse { font-style: normal; }
.fusszeile-adresse p { margin: 0 0 12px; }
.fusszeile a { color: #b7c6b8; text-decoration: none; }
.fusszeile a:hover { color: var(--weiss); text-decoration: underline; }
.fusszeile .link-knopf { background: none; border: 0; padding: 0; font: inherit; color: #b7c6b8; cursor: pointer; }
.fusszeile .link-knopf:hover { color: var(--weiss); text-decoration: underline; }
.fusszeile-links { grid-column: 1 / 3; display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: .9rem; } /* Impressum · Datenschutz · Barrierefreiheit · Cookies in einer Zeile */
.fusszeile-links > * { white-space: nowrap; }
.fusszeile-social { display: flex; justify-content: flex-end; gap: 10px; }
.fusszeile-social .icon { width: 24px; height: 24px; }

/* ---------- Responsiv ---------- */
@media (max-width: 999px) {
	.zweispaltig { grid-template-columns: minmax(0, 1fr); }
	.spalte-seite { position: static; }
	.kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.galerie-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.block-text-bild .block-kasten, .block-text-bild.bild-rechts .block-kasten { margin: -40px 20px 0; }
	.block-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.block-reihe .berater-karte { grid-column: 1 / -1; max-width: 340px; justify-self: center; }
	.block-text-bild { grid-template-columns: 1fr; }
	.fusszeile-raster { grid-template-columns: 1fr; }
	.fusszeile-logo, .fusszeile-links { grid-column: auto; }
	.fusszeile-links { gap: 6px 10px; font-size: .8rem; justify-content: space-between; } /* passt ab 360 px Breite in eine Zeile */
	.fusszeile-social { justify-content: flex-start; }
}
@media (max-width: 760px) {
	.nav-toggle { display: inline-flex; }
	/* Handy: Menü öffnet als Vollbild-Overlay (#nav-dialog) */
	.hauptmenue { display: none; }
	.logo-box { width: 150px; height: 210px; }
	.newsletter-tab { display: none; }
	.kacheln, .galerie, .galerie-3 { grid-template-columns: minmax(0, 1fr); }
	.einheiten .nur-breit { display: none; }
	.block-kontaktformular { grid-template-columns: 1fr; }
	.kontakt-panel-formular .formular { grid-template-columns: 1fr; }
	.berater-karten { justify-content: center; }
	.slider-kopf .slider-zurueck { left: 16px; }
	.knopf-download .dokument-info { display: none; }
	.anker-menue a { min-width: 0; flex: 1 1 40%; }
}

@media print {
	.kopfleiste, .logo-box, .newsletter-tab, .newsletter-band, .berater-box form, .karte, .slider-knopf { display: none !important; }
	body { background: #fff; }
}

/* ---------- Barrierefreiheit: Menü (schwebendes Symbol + Flyout) und Darstellungsmodi ---------- */
.a11y { position: fixed; right: 16px; bottom: 16px; z-index: 900; font-size: 16px; line-height: 1.4; }
.a11y-knopf { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--weiss); background: var(--schiefer); color: var(--weiss); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: transform .2s ease, background .2s ease; }
.a11y-knopf:hover { transform: scale(1.06); background: var(--gruen-flaeche); }
.a11y-knopf .icon { width: 30px; height: 30px; }
.a11y-knopf[aria-expanded="true"] { background: var(--gruen-flaeche); }
.a11y-panel { position: absolute; right: 0; bottom: 64px; width: min(300px, calc(100vw - 32px)); background: var(--weiss); color: #1a1a1a; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); padding: 16px 16px 14px; transform-origin: bottom right; }
.a11y-panel[hidden] { display: none; }
.a11y-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.a11y-kopf h2 { margin: 0; font: 700 16px/1.3 var(--schrift-titel); color: #1a1a1a; }
.a11y-schliessen { background: none; border: 0; padding: 6px; cursor: pointer; color: #1a1a1a; display: grid; }
.a11y-schliessen .icon { width: 20px; height: 20px; }
.a11y-gruppe { border-top: 1px solid #e2e2e2; padding: 12px 0; }
.a11y-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; }
.a11y-wert { font-weight: 400; color: #555; }
.a11y-knoepfe { display: grid; gap: 6px; }
.a11y-knoepfe-3 { grid-template-columns: repeat(3, 1fr); }
.a11y-knoepfe button, .a11y-zuruecksetzen { min-height: 40px; padding: 6px 4px; border: 2px solid #c9c9c9; border-radius: 6px; background: var(--weiss); color: #1a1a1a; font: 600 14px/1.2 var(--schrift-text); cursor: pointer; }
.a11y-knoepfe button:hover, .a11y-zuruecksetzen:hover { border-color: var(--schiefer); }
.a11y-knoepfe button[aria-pressed="true"] { background: var(--schiefer); border-color: var(--schiefer); color: var(--weiss); }
.a11y-knoepfe [data-a11y-text] span { font-size: 17px; }
.a11y-schalter { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; padding: 4px 0; font: 600 14px/1.2 var(--schrift-text); color: #1a1a1a; cursor: pointer; }
.a11y-schalter-spur { width: 44px; height: 24px; border-radius: 12px; background: #c9c9c9; position: relative; transition: background .2s; }
.a11y-schalter-spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--weiss); transition: transform .2s; }
.a11y-schalter[aria-pressed="true"] .a11y-schalter-spur { background: var(--schiefer); }
.a11y-schalter[aria-pressed="true"] .a11y-schalter-spur::after { transform: translateX(20px); }
.a11y-zuruecksetzen { width: 100%; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
	.a11y-panel { transition: opacity .2s ease, transform .2s ease, display .2s allow-discrete; }
	@starting-style { .a11y-panel:not([hidden]) { opacity: 0; transform: translateY(8px) scale(.97); } }
}
@media print { .a11y { display: none; } }

/* Kontrast erhöht: dunklere Farben, reines Weiß, Links immer unterstrichen */
html.kontrast-hoch { --text: #000; --schiefer: #111418; --gruen-flaeche: #2d3b2e; --gruen: #3e5240; --tabellenkopf: #33363c; --hintergrund: #fff; --rahmen: #333; }
html.kontrast-hoch body { color: #000; }
html.kontrast-hoch a:not(.knopf):not(.kachel-link):not(.logo-box) { text-decoration: underline; }
html.kontrast-hoch .kachel-text p, html.kontrast-hoch .kachel-gedimmt .kachel-text { color: #000; }
html.kontrast-hoch .kachel-gedimmt .kachel-bild img { opacity: 1; }
/* Kontrast verringert und Schwarz-weiß: Filter auf die ganze Seite (Menü bleibt bedienbar) */
html.kontrast-niedrig { filter: contrast(.78) brightness(1.06); }
html.graustufen { filter: grayscale(1); }
html.graustufen.kontrast-niedrig { filter: grayscale(1) contrast(.78) brightness(1.06); }
html.graustufen.kontrast-hoch { filter: grayscale(1) contrast(1.15); }

