/* Aussehen der öffentlichen Website. Die Farben --primaer und --akzent setzt jeder Vermieter selbst
   (sie werden im Seitenkopf aus der Datenbank eingefügt). Keine fremden Schriften oder Dienste. */

:root {
  --primaer: #0f4c81;
  --akzent: #e07a5f;
  --sand: #f6f2ea;
  --flaeche: #ffffff;
  --text: #1f2d3a;
  --text-leise: #5b6b7a;
  --linie: #dfd8cb;
  --gut: #2e7d57;
  --schlecht: #b3402e;
  --radius: 14px;
  --schatten: 0 1px 2px rgba(31, 45, 58, .06), 0 8px 24px rgba(31, 45, 58, .07);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 4.75rem; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--sand);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.4rem; margin-top: 2.2em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--primaer); }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

.breite { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.klein { font-size: .875rem; color: var(--text-leise); }
.optional { font-weight: 400; color: var(--text-leise); }

.sprung { position: absolute; left: -999px; }
.sprung:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; border-radius: 8px; }

.symbol { flex: none; vertical-align: -4px; }

/* --- Kopf ------------------------------------------------------------------ */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.marke { text-decoration: none; color: var(--primaer); }
.marke-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.haupt-nav { display: flex; align-items: center; gap: 1.25rem; }
.haupt-nav a { text-decoration: none; font-weight: 600; color: var(--text); }
.haupt-nav a:hover { color: var(--primaer); }
.nav-telefon { display: inline-flex; align-items: center; gap: .4rem; color: var(--primaer) !important; }

/* --- Hero mit Suche -------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  background-color: var(--primaer);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .28));
  background-size: cover;
  background-position: center;
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(4rem, 9vw, 6.5rem);
}
.hero-ort { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; opacity: .85; margin-bottom: .6rem; }
.hero h1 { max-width: 18em; }
.hero-text { max-width: 36em; font-size: 1.15rem; opacity: .95; }
.welle { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(24px, 4vw, 60px); fill: var(--sand); }

.suche {
  display: grid;
  grid-template-columns: 1fr 1fr 6.5rem auto;
  gap: .75rem;
  align-items: end;
  margin-top: 1.75rem;
  padding: 1rem;
  background: var(--flaeche);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  max-width: 52rem;
}
.hero .meldung { max-width: 52rem; margin-top: .75rem; }

/* --- Formularfelder -------------------------------------------------------- */
.feld { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; min-width: 0; }
.suche .feld { margin-bottom: 0; }
label { font-size: .875rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #b9c2cb;
  border-radius: 9px;
  padding: .6rem .7rem;
  min-height: 2.9rem;
}
input[type="date"] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primaer); outline: 3px solid color-mix(in srgb, var(--primaer) 25%, transparent); outline-offset: 0; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; min-height: 0; flex: none; margin: .2rem 0 0; accent-color: var(--primaer); }
.haken-feld { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .95rem; margin-bottom: .9rem; cursor: pointer; }
.zeile { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.zeile-drei { grid-template-columns: repeat(3, 1fr); }
.feld-fehler { color: var(--schlecht); font-size: .9rem; font-weight: 600; margin: -.4rem 0 .9rem; }
.feld .feld-fehler { margin: 0; }
.nicht-ausfuellen { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: .6rem 1.2rem;
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--primaer);
  border: 0; border-radius: 9px; cursor: pointer;
  transition: filter .15s, transform .05s;
}
.knopf:hover { filter: brightness(1.08); }
.knopf:active { transform: translateY(1px); }
.knopf-akzent { background: var(--akzent); color: #fff; }
.knopf-hell { background: #fff; color: var(--primaer); border: 1px solid var(--linie); }
.knopf-klein { min-height: 2.4rem; padding: .35rem .9rem; font-size: .95rem; }
.knopf-breit { width: 100%; }

.meldung { padding: .7rem .9rem; border-radius: 9px; font-size: .95rem; font-weight: 600; margin: 0 0 .9rem; }
.meldung-gut { background: #e3f3ea; color: #1d5c3e; }
.meldung-fehler { background: #fbe9e5; color: #8f2f20; }

/* --- Karten der Wohnungen -------------------------------------------------- */
.abschnitt { padding: 2.5rem 0 3.5rem; }
.abschnitt > h2:first-child, .abschnitt > h1:first-child { margin-top: 0; }
.abschnitt-text { color: var(--text-leise); max-width: 46em; }

.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.karte { display: flex; flex-direction: column; background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.karte-blass { opacity: .62; }
.karte-bild { position: relative; display: block; aspect-ratio: 3 / 2; background: #e9e3d6; }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; }
.bild-ersatz {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; height: 100%;
  color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primaer) 78%, #fff), var(--primaer));
}
.bild-ersatz .symbol { width: 44px; height: 44px; }
.bild-ersatz-gross { height: auto; aspect-ratio: 16 / 7; border-radius: var(--radius); font-weight: 600; margin-bottom: 1.25rem; }
.marker { position: absolute; left: .75rem; top: .75rem; padding: .25rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.marker-ja { background: var(--gut); color: #fff; }
.marker-nein { background: #fff; color: var(--schlecht); }
.karte-text { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.2rem 1.2rem; }
.karte-text h3 { margin-bottom: .45rem; }
.karte-text h3 a { color: inherit; text-decoration: none; }
.karte-text h3 a:hover { color: var(--primaer); }
.karte-text p { font-size: .97rem; color: var(--text-leise); flex: 1; }
.karte-fuss { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--linie); }
.preis-kurz { font-size: .95rem; }

.eckdaten { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; margin: 0 0 .7rem; padding: 0; font-size: .9rem; font-weight: 600; color: var(--primaer); }
.eckdaten li { display: inline-flex; align-items: center; gap: .35rem; }
.eckdaten .symbol { width: 17px; height: 17px; }
.eckdaten-gross { gap: .75rem; margin: 0 0 1.5rem; font-weight: 400; color: var(--text); }
.eckdaten-gross li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .5rem .8rem; gap: .5rem; }
.eckdaten-gross .symbol { width: 20px; height: 20px; color: var(--primaer); }

.karte-text .karte-vermieter { flex: 0; font-size: .85rem; margin: -.4rem 0 .8rem; }
.portal-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.5rem 3rem; padding-top: 0; }
.portal-info h2 { margin-top: 0; }
.fuss-portal { display: inline-block; margin-top: .6rem; opacity: .9; }

.fuss-technik { opacity: .7; font-size: .85rem; display: block; margin-top: .25rem; }
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.leistungen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.leistung { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.2rem; }
.leistung h3 { margin: .7rem 0 .35rem; font-size: 1.1rem; }
.leistung p { margin: 0; color: var(--text-leise); font-size: .97rem; }
.leistung-symbol { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; color: var(--primaer); background: color-mix(in srgb, var(--primaer) 10%, #fff); }

/* --- Detailseite ----------------------------------------------------------- */
.pfad { padding: 1.1rem 0 .3rem; font-size: .95rem; }
.pfad a { text-decoration: none; font-weight: 600; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 2.5rem; align-items: start; padding-bottom: 4rem; }
.detail-haupt { min-width: 0; }
.einleitung { font-size: 1.15rem; color: var(--text-leise); }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.galerie img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.galerie img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.hinweis-kasten { background: color-mix(in srgb, var(--primaer) 8%, #fff); border-left: 4px solid var(--primaer); padding: .8rem 1rem; border-radius: 8px; }
.ausstattung { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .4rem 1rem; }
.ausstattung li { display: flex; align-items: flex-start; gap: .5rem; }
.ausstattung .symbol { color: var(--gut); margin-top: .25rem; width: 18px; height: 18px; }
.liste { padding-left: 1.2rem; margin: 0; }
.liste li { margin-bottom: .3rem; }

.detail-seite { min-width: 0; }
.anfrage { position: relative; background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.3rem; }
.anfrage h2 { margin-top: 0; font-size: 1.25rem; }
.anfrage .klein { margin: .7rem 0 0; text-align: center; }

.preis-kasten { background: var(--sand); border-radius: 10px; padding: .8rem .9rem; margin-bottom: 1rem; transition: opacity .15s; }
.preis-kasten.laedt { opacity: .5; }
.preis-kasten .meldung:last-child, .preis-leer { margin: 0; }
.preis-kasten .meldung { background: none; padding: 0; }
.preis-leer { font-size: .95rem; }
.preis-tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; margin-bottom: .5rem; }
.preis-tabelle th { text-align: left; font-weight: 400; padding: .2rem .5rem .2rem 0; }
.preis-tabelle td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding: .2rem 0; }
.preis-tabelle .summe th, .preis-tabelle .summe td { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: .45rem 0; }
.preis-kasten .klein { margin: 0; }

/* --- Belegungskalender ----------------------------------------------------- */
.kalender-nav { display: flex; justify-content: space-between; margin-bottom: .75rem; }
.kalender { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }
.monat { width: 100%; border-collapse: separate; border-spacing: 3px; background: var(--flaeche); border-radius: var(--radius); padding: .6rem; table-layout: fixed; }
.monat caption { font-weight: 700; padding-bottom: .4rem; }
.monat th { font-size: .75rem; color: var(--text-leise); font-weight: 600; }
.monat td { text-align: center; padding: .4rem 0; border-radius: 7px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.monat td.frei { background: #e3f3ea; color: #1d5c3e; }
.monat td.belegt { background: #f4d9d2; color: #8f2f20; text-decoration: line-through; }
.monat td.vorbei { color: #b3bac1; }
.legende { margin-top: .75rem; font-size: .9rem; color: var(--text-leise); display: flex; align-items: center; gap: .4rem; }
.punkt { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; }
.punkt.frei { background: #e3f3ea; border: 1px solid #9fd3b6; }
.punkt.belegt { background: #f4d9d2; border: 1px solid #e2a698; margin-left: .8rem; }

/* --- Textseiten und Fuß ---------------------------------------------------- */
.text-seite { max-width: 46rem; }
.text-seite h2, .text-seite h3, .text-seite h4 { margin-top: 1.8em; }
.text-seite ul { padding-left: 1.2rem; }

.fuss { background: var(--primaer); color: rgba(255, 255, 255, .9); margin-top: 2rem; padding: 2.25rem 0; font-size: .95rem; }
.fuss a { color: #fff; }
.fuss-innen { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem; }

/* --- Kleine Bildschirme (Handy) -------------------------------------------- */
@media (max-width: 60rem) {
  .detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-seite { position: static; }
}
@media (max-width: 40rem) {
  .suche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .suche .feld-schmal, .suche .knopf { grid-column: 1 / -1; }
  .nav-telefon span { display: none; }
  .haupt-nav { gap: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .knopf, .preis-kasten { transition: none; }
}
