/* ════════════════════════════════════════════════════════════
   Mietwohnungen – /wohnungen und /wohnungen/{kurzname}
   Nach design-system/handoffs/2026-10-24-vermietung/ (Abschnitte 1–4).
   Baut auf css/startseite.css auf (Farben, .nav, .fuss, .knopf,
   .profil, Formular-Bausteine des Rückruf-Dialogs, .leiste) und
   ergänzt nur, was die Seite selbst braucht (Präfix wo-).
   Unter 720 px Handy, zwischen 720 und 999 eine Spalte.
   ════════════════════════════════════════════════════════════ */

/* ── Navigation ───────────────────────────────────────────── */
.wo-nav .inhalt { gap: 14px; }
.wo-nav-strich { width: 1px; height: 22px; background: var(--border-strong); flex: none; }
.wo-nav-titel { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.wo-nav-titel:hover { color: var(--teal-text); }
.wo-nav-rechts { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.wo-nav-zurueck { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.wo-nav-zurueck:hover { color: var(--teal-text); }

/* ── Marken und Kennzeichnung ─────────────────────────────── */
.wo-marke { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: #ffffff; white-space: nowrap; }
.wo-marke.warn { background: var(--warn); }
.wo-marke.gut { background: var(--gut); }
.wo-marke.navy { background: var(--navy); }
.wo-kennz { position: absolute; left: 12px; bottom: 12px; height: 26px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px;
  background: rgba(12, 24, 38, .78); color: #ffffff; font-size: 11.5px; font-weight: 700; white-space: nowrap; pointer-events: none; }

/* ── Übersicht: Kopf ──────────────────────────────────────── */
.wo-held { background: var(--navy); color: #ffffff; }
.wo-held .inhalt { padding-top: 72px; padding-bottom: 80px; }
.wo-held .augenbraue { color: var(--teal); }
.wo-held h1 { margin-top: 18px; font-size: 84px; font-weight: 900; line-height: .94; letter-spacing: -.045em; }
.wo-held h1 em { font-style: normal; color: var(--teal); }
.wo-held-satz { margin-top: 28px; max-width: 520px; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, .8); }
.wo-held-zaehler { margin-top: 24px; font-family: var(--mono); font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* ── Übersicht: Liste ─────────────────────────────────────── */
.wo-liste .inhalt { padding-top: 48px; padding-bottom: 88px; }
.wo-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.wo-raster.eins { grid-template-columns: minmax(0, 1fr); }
.wo-karte { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #ffffff;
  color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.wo-karte:hover { color: var(--ink); border-color: var(--border-strong); box-shadow: 0 12px 32px rgba(12, 24, 38, .08); }
.wo-karte:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.wo-karte-bild { position: relative; aspect-ratio: 4 / 3; background: var(--bild-leer); }
.wo-karte-bild img { width: 100%; height: 100%; object-fit: cover; }
.wo-karte-bild .wo-marke { position: absolute; top: 12px; left: 12px; }
.wo-anzahl { position: absolute; right: 12px; bottom: 12px; height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px;
  background: rgba(12, 24, 38, .78); color: #ffffff; font-size: 11.5px; font-weight: 700; }
.wo-karte-text { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.wo-ort { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--teal-text); }
.wo-karte h2 { margin-top: 6px; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--navy); text-wrap: balance; }
.wo-eck { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.wo-karte-fuss { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--grid); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.wo-eck + .wo-karte-fuss { margin-top: 14px; }
.wo-karte-fuss > div:first-child b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.wo-karte-fuss > div:first-child span { font-size: 13px; color: var(--muted); }
.wo-karte-fuss small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.wo-ab { text-align: right; }
.wo-ab span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.wo-ab b { display: block; margin-top: 3px; font-size: 14px; font-weight: 700; color: var(--ink); }

/* Eine Wohnung: breite Karte */
.wo-karte.breit { display: grid; grid-template-columns: 1.25fr 1fr; border-radius: 16px; }
.wo-karte.breit .wo-karte-bild { aspect-ratio: auto; min-height: 440px; }
.wo-karte.breit .wo-karte-bild img { position: absolute; inset: 0; }
.wo-karte.breit .wo-karte-text { padding: 36px; }
.wo-karte.breit h2 { margin-top: 10px; font-size: 32px; letter-spacing: -.03em; line-height: 1.08; }
.wo-karte.breit .wo-eck { margin-top: 10px; font-size: 16px; }
.wo-karte-zahlen { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--navy); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wo-karte-zahlen b { display: block; font-size: 34px; font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--navy); }
.wo-karte-zahlen b.klein { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.wo-karte-zahlen span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.wo-ansehen { margin-top: auto; align-self: flex-start; }
.wo-karte-zahlen + .wo-ansehen { margin-top: 36px; }
.wo-karte.breit:hover .wo-ansehen { background: var(--navy-hover); }

.wo-fragen { margin-top: 28px; font-size: 14px; color: var(--muted); }
.wo-hinweis { max-width: 720px; margin-bottom: 24px; display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--warn); border-radius: 12px;
  background: var(--warn-bg); }
.wo-hinweis i { width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: #ffffff; font-style: normal; font-size: 12.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex: none; }
.wo-hinweis b { font-size: 15px; font-weight: 800; }
.wo-hinweis p { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.wo-leer { max-width: 760px; padding: 40px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-alt); }
.wo-leer h2 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--navy); }
.wo-leer p { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.wo-leer-mail { display: inline-block; margin-top: 22px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--navy);
  border-bottom: 3px solid var(--teal); overflow-wrap: anywhere; }
.wo-leer-mail:hover { color: var(--teal-text); }

/* ── Detail ───────────────────────────────────────────────── */
.wo-detail { padding-top: 32px; padding-bottom: 88px; }
.wo-wisch { display: none; }
.wo-kopf-marke { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wo-kopf-marke > span:last-child { font-size: 14px; font-weight: 600; color: var(--ink); }
.wo-kopf-zeile { margin-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.wo-kopf h1 { font-size: 44px; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; color: var(--navy); text-wrap: balance; }
.wo-kopf p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.wo-teilen, .wo-alle { flex: none; height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: #ffffff;
  color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.wo-teilen:hover, .wo-alle:hover { border-color: var(--navy); }

.wo-mosaik { margin-top: 24px; height: 480px; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px;
  border-radius: 14px; overflow: hidden; }
.wo-mosaik-bild { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; background: var(--bild-leer); cursor: zoom-in; overflow: hidden; }
.wo-mosaik-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.wo-mosaik-bild:hover img { transform: scale(1.02); }
.wo-mosaik-bild:first-child { grid-row: 1 / span 2; }
.wo-mosaik.n1 { grid-template-columns: 1fr; }
.wo-mosaik.n2 { grid-template-columns: 2fr 1fr; }
.wo-mosaik.n2 > :nth-child(2) { grid-row: 1 / span 2; }
.wo-mosaik.n3 { grid-template-columns: 2fr 1fr; }
.wo-mosaik.n4 > :nth-child(4) { grid-column: 2 / span 2; }
.wo-bild-zeile { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wo-bild-zeile p { font-size: 13px; line-height: 1.5; color: var(--muted); }

.wo-spalten { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "eck kosten" "absch kosten";
  column-gap: 56px; align-items: start; }
.wo-eck-bereich { grid-area: eck; min-width: 0; }
.wo-abschnitte { grid-area: absch; min-width: 0; }
.wo-eckdaten.profil { margin-top: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wo-eckdaten.profil > div { padding-top: 22px; }
.wo-eckdaten.profil b { font-size: 40px; }
.wo-eckdaten.profil span { font-size: 14px; }

.wo-kosten { grid-area: kosten; position: sticky; top: 92px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #ffffff;
  box-shadow: 0 10px 30px rgba(12, 24, 38, .06); }
.wo-k-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.wo-k-gross { margin-top: 4px; font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1.05; color: var(--navy); }
.wo-k-gross span { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.wo-k-liste { margin: 16px 0 0; }
.wo-k-liste div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.wo-k-liste div:first-child { border-top: 0; }
.wo-k-liste dd { margin: 0; font-weight: 700; white-space: nowrap; }
.wo-k-liste .summe { border-top: 1.5px solid var(--navy); font-size: 15px; font-weight: 800; }
.wo-k-klein { margin-top: 10px; display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.wo-k-klein div { display: flex; justify-content: space-between; gap: 12px; }
.wo-k-klein b { font-weight: 600; color: var(--ink); text-align: right; }
.wo-k-ab { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--grid); font-size: 14px; color: var(--muted); }
.wo-k-ab b { color: var(--ink); }
.wo-k-anfrage { margin-top: 16px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--navy);
  color: #ffffff; font-size: 15px; font-weight: 800; }
.wo-k-anfrage:hover { background: var(--navy-hover); color: #ffffff; }
.wo-k-link { display: block; margin-top: 12px; text-align: center; font-size: 13.5px; font-weight: 700; }

.wo-abschnitt { margin-top: 44px; }
.wo-abschnitt h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.wo-merkmale { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; }
.wo-merkmale li { font-size: 16px; font-weight: 600; }
.wo-merkmale li::before { content: '✓'; margin-right: 10px; color: var(--teal-text); font-weight: 800; }
.wo-text { max-width: 680px; }
.wo-text p { margin-top: 12px; font-size: 16px; line-height: 1.65; }
.wo-neu { margin: 14px 0 0; padding: 0; max-width: 680px; list-style: none; border-top: 1px solid var(--border); }
.wo-neu li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 16px; line-height: 1.5; }
.wo-neu li::before { content: '→'; color: var(--teal); flex: none; }
.wo-lage-ort { margin-top: 12px; font-size: 16px; font-weight: 700; }
.wo-klein { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.wo-grundriss { display: block; max-width: 460px; margin-top: 14px; }
.wo-grundriss img { width: 100%; border: 1px solid var(--border); border-radius: 12px; }
.wo-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; }
.wo-energie { margin-top: 14px; max-width: 560px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; }
.wo-energie dl { margin: 0; display: grid; gap: 6px; }
.wo-energie dl div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; font-size: 14px; }
.wo-energie dt { color: var(--muted); }
.wo-energie dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.wo-klassen { margin-top: 14px; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.wo-klassen span { height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--surface-alt);
  color: var(--muted); font-size: 11.5px; font-weight: 700; }
.wo-klassen span.an { background: var(--navy); color: #ffffff; }

/* Anfrage */
.wo-anfrage { margin-top: 64px; max-width: 640px; scroll-margin-top: 84px; }
.wo-anfrage h2 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.wo-anfrage-satz { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.wo-form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.wo-felder { grid-template-columns: 1fr 1fr; }
.wo-felder .breit { grid-column: 1 / -1; }
.wo-form .chip { min-height: 40px; }
.wo-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wo-erfolg { margin-top: 20px; }
.wo-erfolg p a { font-weight: 700; }

/* Interne Vorschau (intern/api/vermietung_vorschau.php) */
.wo-vorschau-band { padding: 10px var(--rand); background: var(--warn-bg); border-bottom: 1px solid var(--warn); text-align: center; font-size: 13px;
  font-weight: 700; color: var(--warn); }

/* ── Galerie im Vollbild ──────────────────────────────────── */
.wo-galerie { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: var(--navy); color: #ffffff; }
.wo-galerie[hidden] { display: none; }
.wo-g-kopf { height: 64px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 var(--rand); }
.wo-g-zahl { font-family: var(--mono); font-size: 14px; color: rgba(255, 255, 255, .75); flex: none; }
.wo-g-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.wo-g-zu { margin-left: auto; width: 44px; height: 44px; flex: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; background: transparent;
  color: #ffffff; font-size: 22px; cursor: pointer; }
.wo-g-buehne { position: relative; flex: 1; min-height: 0; }
.wo-g-reihe { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wo-g-reihe::-webkit-scrollbar { display: none; }
.wo-g-seite { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 0 80px; min-width: 0; }
.wo-g-rahmen { position: relative; max-width: 100%; max-height: 100%; }
.wo-g-rahmen img { display: block; max-width: 100%; max-height: calc(100vh - 64px - 96px); width: auto; height: auto; border-radius: 6px; }
.wo-g-rahmen .wo-kennz { height: 30px; font-size: 12.5px; }
.wo-g-pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #ffffff; font-size: 22px; cursor: pointer; z-index: 2; }
.wo-g-pfeil:hover { background: rgba(255, 255, 255, .2); }
.wo-g-pfeil:disabled { opacity: .35; cursor: default; }
.wo-g-pfeil.links { left: 14px; }
.wo-g-pfeil.rechts { right: 14px; }
.wo-g-leiste { flex: none; display: flex; gap: 8px; justify-content: center; padding: 12px var(--rand) 20px; overflow-x: auto; }
.wo-g-leiste button { width: 72px; height: 54px; flex: none; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  background: rgba(255, 255, 255, .08); cursor: pointer; }
.wo-g-leiste button[aria-current="true"] { border-color: var(--teal); }
.wo-g-leiste img { width: 100%; height: 100%; object-fit: cover; }
.wo-g-hinweis { display: none; }

/* ── Bis 999: eine Spalte ─────────────────────────────────── */
@media (max-width: 999px) {
  .wo-held h1 { font-size: 64px; }
  .wo-kopf h1 { font-size: 36px; }
  .wo-mosaik { height: 380px; }
  .wo-spalten { grid-template-columns: minmax(0, 1fr); grid-template-areas: "eck" "kosten" "absch"; }
  .wo-kosten { position: static; margin-top: 28px; max-width: 520px; }
  .wo-karte.breit { grid-template-columns: 1fr 1fr; }
  .wo-karte.breit .wo-karte-bild { min-height: 360px; }
  .wo-karte.breit .wo-karte-text { padding: 28px; }
  .wo-karte.breit h2 { font-size: 26px; }
}

/* ── Handy ────────────────────────────────────────────────── */
@media (max-width: 719px) {
  .wo-nav .nur-desktop-wo, .wo-nav-cta { display: none; }
  .wo-nav-zurueck { height: 44px; padding: 0 14px; display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px;
    font-weight: 700; }
  .wo-held .inhalt { padding-top: 36px; padding-bottom: 40px; }
  .wo-held h1 { font-size: 46px; }
  .wo-held-satz { margin-top: 20px; font-size: 16px; }
  .wo-liste .inhalt { padding-top: 24px; padding-bottom: 48px; }
  .wo-raster { gap: 16px; }
  .wo-karte.breit { display: flex; border-radius: 14px; }
  .wo-karte.breit .wo-karte-bild { min-height: 0; aspect-ratio: 4 / 3; }
  .wo-karte.breit .wo-karte-text { padding: 18px 20px 20px; }
  .wo-karte.breit h2 { margin-top: 6px; font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
  .wo-karte.breit .wo-eck { margin-top: 6px; font-size: 14.5px; }
  .wo-karte-zahlen { margin-top: 14px; padding-top: 14px; border-top-color: var(--grid); }
  .wo-karte-zahlen b { font-size: 24px; }
  .wo-karte-zahlen b.klein { font-size: 14px; padding-top: 0; }
  .wo-karte-zahlen span { margin-top: 4px; font-size: 13px; }
  .wo-karte-zahlen + .wo-ansehen { display: none; }
  .wo-leer { padding: 24px 20px; }
  .wo-leer h2 { font-size: 26px; }
  .wo-leer-mail { font-size: 19px; }

  .wo-wisch { display: block; position: relative; }
  .wo-wisch-reihe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .wo-wisch-reihe::-webkit-scrollbar { display: none; }
  .wo-wisch-bild { position: relative; flex: 0 0 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--bild-leer); scroll-snap-align: start; }
  .wo-wisch-bild img { width: 100%; height: 100%; object-fit: cover; }
  .wo-zaehler { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 6px; background: rgba(12, 24, 38, .78); color: #ffffff;
    font-family: var(--mono); font-size: 12px; }
  .wo-mosaik, .wo-alle { display: none; }
  .wo-detail { padding-top: 20px; padding-bottom: 48px; }
  .wo-kopf h1 { font-size: 28px; }
  .wo-kopf p { font-size: 15px; }
  .wo-kopf-zeile { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wo-bild-zeile { margin-top: 14px; }
  .wo-spalten { margin-top: 24px; }
  .wo-eckdaten.profil { grid-template-columns: 1fr 1fr; }
  .wo-eckdaten.profil b { font-size: 30px; }
  .wo-kosten { max-width: none; padding: 18px; }
  .wo-k-gross { font-size: 34px; }
  .wo-k-anfrage { display: none; }
  .wo-abschnitt { margin-top: 36px; }
  .wo-energie dl div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wo-klassen { gap: 3px; }
  .wo-anfrage { margin-top: 48px; }
  .wo-anfrage h2 { font-size: 28px; }
  .wo-felder { grid-template-columns: 1fr; }
  .wo-form .chip { min-height: 44px; }
  .wo-leiste-preis { flex: none; display: flex; flex-direction: column; justify-content: center; padding-right: 6px; }
  .wo-leiste-preis b { font-size: 16px; font-weight: 800; color: var(--navy); white-space: nowrap; }
  .wo-leiste-preis span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

  .wo-g-seite { padding: 0; }
  .wo-g-rahmen img { border-radius: 0; max-height: calc(100vh - 64px - 48px); }
  .wo-g-pfeil, .wo-g-leiste { display: none; }
  .wo-g-hinweis { display: block; flex: none; padding: 14px 0 20px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
}

@media (prefers-reduced-motion: reduce) {
  .wo-karte, .wo-mosaik-bild img { transition: none; }
}
