/* =====================================================================
   AMBIENTE Immobilien – Stylesheet
   Schriften lokal eingebunden (kein Google-Server, DSGVO-konform)
   ===================================================================== */
/* Ersatzschriften mit angepassten Maßen: verhindert Springen beim Nachladen */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue");
  size-adjust: 97%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%;
}
@font-face {
  font-family: "Source Serif Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 103%; ascent-override: 95%; descent-override: 27%; line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Source Serif";
  font-style: normal;
  font-display: optional;
  font-weight: 200 900;
  src: url(../fonts/sourceserif.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Source Serif";
  font-style: italic;
  font-display: optional;
  font-weight: 200 900;
  src: url(../fonts/sourceserif-italic.woff2) format("woff2-variations");
}

:root {
  --paper: #f4f5f3;
  --surface: #ffffff;
  --ink: #1e2528;
  --muted: #56646b;
  --line: #d2d8d6;
  --bronze: #8b6a45;       /* Logofarbe */
  --bronze-ink: #6e5233;   /* Bronze für Text auf hellem Grund */
  --slate: #26333a;
  --slate-2: #33434b;

  --sans: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif", "Source Serif Fallback", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --section: 50px;
  --tint: #e8ebe7;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bronze-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 640; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }
.prose { max-width: 68ch; }
.prose h2, .detail__main > h2 { margin-top: 1.8em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose > img, .prose figure > img { margin: .4rem 0 1.8rem; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--bronze); }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--white { background: var(--surface); }
.section--tint { background: var(--tint); }
.section--slate { background: var(--slate); color: #e9eeec; }
.section--slate a { color: #e3cfae; }
.section--slate h2 { color: #fff; }
.lead { font-size: 1.25rem; color: var(--muted); }
.lead-h2, .prose > h2:first-child, .detail-head .prose > h2:first-child {
  text-shadow: 0 2px 7px rgba(30, 37, 40, .18);
}
.lead-h2 { margin-bottom: 0; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; font-stretch: 105%;
  padding: .8em 1.35em; border-radius: 3px; text-decoration: none;
  border: 1.5px solid var(--bronze); background: var(--bronze); color: #fff;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bronze-ink); border-color: var(--bronze-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.75rem; }
.logo img { width: 190px; }
.nav { margin-left: auto; font-family: var(--sans); font-size: .98rem; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav li { position: relative; }
.nav a { display: block; padding: .6rem .8rem; color: var(--ink); text-decoration: none; border-radius: 3px; }
.nav a:hover { color: var(--bronze-ink); }
.nav > ul > li.is-section > a, .nav > ul > li > a[aria-current="page"] {
  color: var(--bronze-ink); box-shadow: inset 0 -2px 0 var(--bronze); border-radius: 0;
}
.sub-toggle { display: none; }

/* Aufklapp-Menü "Über uns" */
.nav .sub {
  list-style: none; margin: 0; padding: .5rem 0;
  position: absolute; left: 0; top: 100%; min-width: 15rem;
  background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--bronze);
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav .sub a { padding: .45rem 1rem; }
.nav .sub a[aria-current="page"] { color: var(--bronze-ink); font-weight: 600; }
.nav li:hover > .sub, .nav li:focus-within > .sub { visibility: visible; opacity: 1; transform: none; }

/* Mega-Menü mit allen Häusern */
.mega {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(4px); top: 100%;
  width: min(96vw, 1200px); background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--bronze);
  padding: 1.6rem 1.4rem 1.4rem; visibility: hidden; opacity: 0;
  transition: opacity .15s, transform .15s, visibility .15s;
  box-shadow: 0 18px 40px rgba(20, 27, 30, .13);
}
.has-mega:hover > .mega, .has-mega:focus-within > .mega { visibility: visible; opacity: 1; transform: translateX(-50%); }
.mega__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1.2rem; }
.mega__col > ul { list-style: none; margin: .35rem 0 0; padding: 0; }
.mega__cat { font-weight: 650; padding: .2rem .4rem !important; border-bottom: 1px solid var(--line); border-radius: 0; }
.mega__cat.is-current { color: var(--bronze-ink); border-bottom-color: var(--bronze); }
.mega__col li a { padding: .3rem .4rem; font-size: .94rem; color: var(--muted); }
.mega__col li a:hover { color: var(--bronze-ink); }
.mega__col li a[aria-current="page"] { color: var(--bronze-ink); font-weight: 600; }

.header-call { font-family: var(--sans); font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: .4rem; }
.header-call svg { width: 1.1rem; color: var(--bronze); }
.nav-toggle { display: none; }

@media (max-width: 1180px) { .header-call span { display: none; } }

@media (max-width: 1080px) {
  /* Menü als ausklappbares Panel */
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: .5rem;
    font: 600 1rem var(--sans); background: none; border: 1.5px solid var(--ink);
    border-radius: 3px; padding: .5rem .8rem; color: var(--ink); cursor: pointer;
  }
  .header-call { order: 2; }
  .nav {
    position: fixed; left: 0; right: 0; top: 4.75rem; bottom: 0;
    height: calc(100vh - 4.75rem); height: calc(100dvh - 4.75rem);
    background: #fff; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: .5rem var(--gap) 4rem; display: none; margin: 0; font-size: 1.05rem;
  }
  .nav.is-open { display: block; }
  .nav > ul { flex-direction: column; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .nav > ul > li > a { padding: .95rem 0; }
  .nav > ul > li.is-section > a, .nav > ul > li > a[aria-current="page"] { box-shadow: none; }
  .nav > ul > li.is-section > a::before, .nav > ul > li > a[aria-current="page"]::before {
    content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--bronze);
    border-radius: 50%; margin-right: .6rem; vertical-align: .05em;
  }
  .sub-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 2.8rem; height: 2.8rem;
    background: none; border: 0; color: var(--ink); cursor: pointer;
  }
  .sub-toggle svg { width: 1.3rem; height: 1.3rem; transition: transform .2s; }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav .sub, .mega {
    position: static; transform: none; visibility: visible; opacity: 1; width: auto; left: auto;
    border: 0; box-shadow: none; padding: 0 0 .8rem 1rem; grid-column: 1 / -1; display: none;
  }
  .nav .sub[data-open], .mega[data-open] { display: block; }
  .nav li:hover > .sub, .nav li:focus-within > .sub,
  .has-mega:hover > .mega, .has-mega:focus-within > .mega {
    visibility: visible; opacity: 1; position: static; left: auto; width: auto; transform: none;
  }
  .nav .sub:not([data-open]), .mega:not([data-open]) { display: none; }
  .mega__grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .mega__cat { font-size: 1.02rem; }
  .mega__col li a { font-size: 1rem; padding: .35rem .4rem; }
  .logo img { width: 160px; }
}

/* ---------- Kopfbereich Startseite ---------- */
.hero { position: relative; background: var(--slate); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__text { position: relative; display: flex; align-items: flex-end;
  min-height: clamp(22rem, 68vh, 42rem); padding-block: 3rem; }
.hero__box { max-width: 34rem; background: rgba(255, 255, 255, .75);
  padding: clamp(1.4rem, 3vw, 2.2rem); border-left: 4px solid var(--bronze); }
.hero__box h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .45em; }
.hero__box p { margin-bottom: 1.1rem; color: var(--ink); }
@media (max-width: 760px) {
  .hero__img { position: static; height: 15rem; }
  .hero__text { display: block; min-height: 0; padding: 0; }
  .hero__text .wrap { width: 100%; }
  .hero__box { max-width: none; background: #fff; border-left: 0; border-top: 4px solid var(--bronze); padding: 1.4rem var(--gap) 2rem; }
}

/* ---------- H1: im Quelltext oben, sichtbar vor dem Footer ---------- */
.main--h1-bottom { display: flex; flex-direction: column; }
.main--h1-bottom > * { order: 0; }
.main--h1-bottom > .h1-band { order: 10; }
.main--h1-bottom > .h1-band + * { margin-top: 0; }
.h1-band { background: #1b2428; border-top: 1px solid #2e3b41; }
.h1-band__inner { width: 100%; padding: 1rem var(--gap); text-align: center; }
.h1-band h1 {
  font-size: .85rem; font-weight: 500; font-stretch: 100%; line-height: 1.45; letter-spacing: 0;
  margin: 0 auto; max-width: none; color: #3e525b;
}

/* ---------- Zweispaltig: Text + Bild ---------- */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split figure { margin: 0; min-width: 0; }
.owners { position: sticky; top: 7rem; }
.owners figcaption { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin-top: .6rem; }
@media (max-width: 860px) {
  .split, .split--rev { grid-template-columns: 1fr; }
  .owners { position: static; max-width: 22rem; }
}

.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .55rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 1.05rem; height: .6rem;
  border-left: 2px solid var(--bronze); border-bottom: 2px solid var(--bronze); transform: rotate(-45deg);
}

/* ---------- Maßkette (Wohnfläche als Bemaßung) ----------
   Länge = Wohnfläche im Verhältnis zur Skala der Liste.            */
.dim { --from: 0; --to: 1; position: relative; height: 2.1rem; margin-top: .35rem; font-family: var(--sans); }
.dim__line {
  position: absolute; bottom: .45rem; height: 1px; background: var(--bronze);
  left: calc(var(--from) * 100%); width: calc((var(--to) - var(--from)) * 100%); min-width: 3.2rem;
}
.dim__line::before, .dim__line::after {
  content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--bronze); transform: rotate(45deg);
}
.dim__line::before { left: 0; }
.dim__line::after { right: 0; }
.dim__label {
  position: absolute; bottom: .7rem; left: calc(var(--from) * 100%); font-size: .92rem; font-weight: 600;
  color: var(--bronze-ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.dim__axis { position: absolute; left: 0; right: 0; bottom: .45rem; border-bottom: 1px dotted var(--line); }

/* ---------- Haus-Karten ---------- */
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 2.5rem var(--gap); }
.houses--3 { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.house { min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.house__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.house__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.house:hover .house__img img { transform: scale(1.03); }
.house h3 { margin: 1rem 0 .15rem; color: var(--ink); }
.house:hover h3 { color: var(--bronze-ink); }
.house p { font-size: 1rem; color: var(--muted); margin: .4rem 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.section-head h2, .section-head p { margin-bottom: 0; }
.section-head p { max-width: 52ch; color: var(--muted); }
.section-head p.nowrap { max-width: none; }
@media (min-width: 980px) { .section-head p.nowrap { white-space: nowrap; } }

/* ---------- Standard & Sicherheit ---------- */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.fact { background: var(--surface); display: grid; grid-template-rows: auto 1fr; }
.fact img { aspect-ratio: 16 / 8; object-fit: cover; width: 100%; }
.fact__body { padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; align-items: flex-start; }
.fact__body p { flex: 1; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Kontakt-Band ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem clamp(2rem, 5vw, 4rem); align-items: start; }
.cta__text { position: sticky; top: 6.5rem; min-width: 0; }
.cta p { color: #cfd8d5; max-width: 48ch; }
@media (max-width: 900px) { .cta { grid-template-columns: 1fr; } .cta__text { position: static; } }

/* ---------- Breadcrumb ---------- */
.crumbs { font-family: var(--sans); font-size: .92rem; color: var(--muted); padding-top: 1.4rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--bronze-ink); text-decoration: underline; }

/* ---------- Haus-Detailseite ---------- */
.detail-head { padding-block: 1.2rem 2rem; }
.detail-head h1 { max-width: 34ch; }
.detail {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr);
  grid-template-areas: "media eckdaten" "text eckdaten";
  gap: 0 clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
.detail__media { grid-area: media; min-width: 0; }
.detail__text { grid-area: text; min-width: 0; }
.detail .sheet { grid-area: eckdaten; min-width: 0; }
.detail__media > figure, .detail__text > figure { margin: 0 0 var(--gap); }
.detail__media > figure > img, .detail__text > figure > img { width: 100%; }
.detail__media figcaption, .detail__text figcaption { font-family: var(--sans); font-size: .92rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 900px) {
  /* Eckdaten direkt unter die Bilder, noch vor Preis- und Beschreibungstext */
  .detail { grid-template-columns: 1fr; grid-template-areas: "media" "eckdaten" "text"; }
  .detail .sheet { margin-bottom: 2rem; }
}

.sheet { background: var(--surface); border: 1px solid var(--line); position: sticky; top: 6.5rem; }
.sheet h2 { font-size: 1.5rem; margin: 0; padding: 1.4rem 1.5rem 0; }
.sheet .dim { margin: .6rem 1.5rem 0; }
.sheet dl { margin: 1rem 0 0; font-family: var(--sans); }
.sheet dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1.5rem; border-top: 1px solid var(--line); }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 600; text-align: right; }
.sheet ul { list-style: none; margin: 0; padding: .4rem 1.5rem 1rem; border-top: 1px solid var(--line); font-family: var(--sans); }
.sheet ul li { padding: .35rem 0; }
.price { padding: 1.2rem 1.5rem; border-top: 1px solid var(--line); background: var(--paper); font-family: var(--sans); }
.price span { display: block; color: var(--muted); font-size: .95rem; }
.price strong.price--ask { font-size: 1.4rem; }
.price strong { font-size: 1.9rem; font-stretch: 110%; font-weight: 650; font-variant-numeric: tabular-nums; }
.sheet .btn { margin: 1.2rem 1.5rem 1.5rem; width: calc(100% - 3rem); justify-content: center; }
@media (max-width: 900px) { .sheet { position: static; } }

/* Grundrisse als Planblatt mit Schriftfeld */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.plan { margin: 0; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan button { all: unset; cursor: zoom-in; display: block; padding: 1rem; flex: 1; }
.plan button:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.plan img { margin: auto; }
.plan figcaption {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0;
  border-top: 1px solid var(--ink); font-family: var(--sans); font-size: .88rem; color: var(--ink);
}
.plan figcaption span { padding: .45rem .75rem; }
.plan figcaption span + span { border-left: 1px solid var(--ink); color: var(--muted); }

.lightbox { border: 0; padding: 0; max-width: min(96vw, 1400px); max-height: 94vh; background: #fff; }
.lightbox::backdrop { background: rgba(20, 27, 30, .86); }
.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; }
.lightbox p { font-family: var(--sans); font-size: .95rem; margin: 0; padding: .6rem 1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.lightbox button { font: 600 .95rem var(--sans); background: none; border: 1.5px solid var(--ink); border-radius: 3px; padding: .35rem .8rem; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: #1b2428; color: #cfd8d5; font-family: var(--sans); font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem 3rem; padding-block: 3.5rem 2.5rem; }
.footer-grid h2 { font-size: 1.05rem; color: #fff; margin-bottom: .9rem; }
.footer-brand { margin: 0 0 1.4rem; line-height: 1; }
.footer-brand span { display: block; font-size: 2rem; font-weight: 700; font-stretch: 105%; letter-spacing: .02em; color: #fff; }
.footer-brand small { display: block; font-size: .95rem; letter-spacing: .085em; color: #e3cfae; margin-top: .25rem; }
.footer-brand small b { font-weight: inherit; color: #fff; }
.footer-space { display: block; height: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-grid address { font-style: normal; line-height: 1.7; }
.footer-seo { padding-block: 0 1.8rem; font-family: var(--serif); font-size: .85rem; line-height: 1.5; color: #5d686c; }
.footer-seo p { max-width: 90ch; margin: 0; }
.footer-seo a { color: #77868b; text-decoration: none; }
.footer-seo a:hover { color: #cfd8d5; text-decoration: underline; }
.footer-legal { border-top: 1px solid #2e3b41; padding-block: 1.1rem .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .9rem; color: #aebbb7; }
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Kategorieliste: Bilder gleich groß, Kante in der Mitte ---------- */
/* gleich hohe Zeilen: alle Bilder einer Seite sind gleich groß */
.cat-list { display: grid; gap: 0; grid-auto-rows: 1fr; }
.cat-item { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
.cat-item:nth-child(even) .cat-item__img { order: 2; }
.cat-item__img { display: flex; min-width: 0; }
/* Bild füllt die Zeilenhöhe, damit die Bilder der Zeilen bündig aneinander stoßen */
.cat-item__img img { width: 100%; height: 100%; min-height: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.cat-item__body { min-width: 0; padding: clamp(1.5rem, 3vw, 2.2rem) 0 25px clamp(1.2rem, 3vw, 2.5rem); }
.cat-item:nth-child(even) .cat-item__body { padding-left: 0; padding-right: clamp(1.2rem, 3vw, 2.5rem); }
.cat-item__body h3 { font-size: 1.35rem; margin-bottom: .2rem; }
.cat-item__body h3 a { color: inherit; text-decoration: none; }
.cat-item__body h3 a:hover { color: var(--bronze-ink); }
.cat-item__body ul { list-style: none; padding: 0; margin: 1rem 0 1.2rem; font-family: var(--sans); font-size: 1rem; }
.cat-item__body li { position: relative; padding-left: 1.4rem; margin-bottom: .35rem; }
.cat-item__body li::before { content: ""; position: absolute; left: 0; top: .62em; width: .6rem; height: 1px; background: var(--bronze); }
@media (max-width: 760px) {
  .cat-list { grid-auto-rows: auto; }
  .cat-item { grid-template-columns: 1fr; margin-bottom: 2rem; }
  .cat-item:nth-child(even) .cat-item__img { order: 0; }
  .cat-item__body, .cat-item:nth-child(even) .cat-item__body { min-width: 0; padding: 1.4rem 0 0; }
}

/* ---------- Referenzen-Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--gap); }
.gallery__item { all: unset; cursor: zoom-in; display: block; background: var(--surface); }
.gallery__item:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__item span { display: block; font-family: var(--sans); font-size: .95rem; padding: .6rem .8rem; color: var(--ink); }
.gallery__item:hover span { color: var(--bronze-ink); }

/* ---------- Formular ---------- */
.formcard { min-width: 0; background: var(--surface); border: 1px solid var(--line); padding: clamp(1.3rem, 3vw, 2rem); scroll-margin-top: 6rem; }
.section--slate .formcard { border-color: transparent; color: var(--ink); }
.section--slate .formcard a { color: var(--bronze-ink); }
.section--slate .formcard a:hover { color: var(--ink); }
.section--slate .formcard label, .section--slate .formcard legend, .section--slate .formcard h3 { color: var(--ink); }
.section--slate .formcard .form__intro, .section--slate .formcard .form__note, .section--slate .formcard .form__hint { color: var(--muted); }
.formcard--compact .form { max-width: none; margin-top: 0; }
.formcard--compact .form input, .formcard--compact .form select, .formcard--compact .form textarea { font-size: .98rem; padding: .6rem .7rem; }
.formcard--compact .form p { margin-bottom: .85rem; }
.form__title { font-size: 1.25rem; margin: 0 0 .25rem; color: var(--ink); }
.form__intro { color: var(--muted); font-size: 1rem; margin-bottom: 1.4rem !important; }
.form__hint { font-weight: 400; color: var(--muted); }
.form__note { font-size: .88rem; color: var(--muted); line-height: 1.5; margin-bottom: 0 !important; }
.form select {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--line);
  background: var(--surface); border-radius: 3px; color: var(--ink); appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356646b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.1rem; padding-right: 2.4rem;
}
.form ::placeholder { color: #9aa6ab; }
.formcard--compact .form fieldset { padding-top: .9rem; margin-bottom: .8rem; }
.formcard--compact .form .opt { margin: 0 1.1rem .45rem 0; font-size: .97rem; }
.formcard--compact .form .btn { width: 100%; justify-content: center; }

.form { max-width: 42rem; margin-top: 2.5rem; }
.form__note { font-size: .95rem; color: var(--muted); }
.form p { margin: 0 0 1.1rem; }
.form label { display: block; font-family: var(--sans); font-size: .98rem; font-weight: 600; margin-bottom: .3rem; }
.form input[type="text"], .form input:not([type]), .form input[type="tel"], .form input[type="email"], .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--line);
  background: var(--surface); border-radius: 3px; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--bronze); outline-offset: 1px; border-color: var(--bronze); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form fieldset { border: 0; border-top: 1px solid var(--line); padding: 1.1rem 0 .6rem; margin: 0 0 1rem; }
.form legend { font-family: var(--sans); font-weight: 600; font-size: .98rem; padding-right: .8rem; }
.form .opt { display: inline-flex; align-items: baseline; gap: .45rem; font-weight: 400; margin: 0 1.5rem .5rem 0; }
.form .opt--block { display: block; font-size: .98rem; }
.form .opt--block label { font-weight: 400; display: block; }
.form .opt--block input { margin-right: .55rem; vertical-align: -.1rem; }
.form input[type="radio"], .form input[type="checkbox"] { accent-color: var(--bronze); width: 1.05rem; height: 1.05rem; }
.form .hp { position: absolute; left: -9999px; }
.contact-side { background: var(--surface); border: 1px solid var(--line); padding: 1.6rem; font-family: var(--sans); }
.contact-side h2 { font-size: 1.15rem; }
.contact-side address { font-style: normal; line-height: 1.8; margin-bottom: 1.2rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Sitemap ---------- */
.sitemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2rem var(--gap); font-family: var(--sans); }
.sitemap h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.sitemap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: 1rem; }
.sitemap a { color: var(--ink); text-decoration: none; }
.sitemap a:hover { color: var(--bronze-ink); text-decoration: underline; }

/* ---------- Karte (erst nach Zustimmung) ---------- */
.map { background: var(--surface); border: 1px solid var(--line); padding: 1.4rem; }
.map p:last-child { margin-bottom: 0; }
.map iframe { width: 100%; height: 26rem; border: 0; display: block; }
.map--loaded { padding: 0; }

/* ---------- Hinweis nach dem Absenden ---------- */
.notice { padding: 1.1rem 1.3rem; border-left: 4px solid var(--bronze); background: var(--surface); margin: 2rem 0 0; }
.notice--err { border-left-color: #a33; }
.notice:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
