/* =========================================================================
   Aktionshäuser – Übersicht und Haustyp-Detailseiten
   Eigenständiges Page-CSS (Präfix .ah-). Läuft innerhalb von <main class="lp">
   und erbt dessen Tokens (--lp-navy, --lp-surface, …) aus leistungen.css.
   ========================================================================= */

.ah-accent { --ah-accent: #C8811E; }   /* Preis-/Aktionsfarbe, warm zum Navy */

/* ============================== PREIS-BADGE ==============================
   Erste Preisauszeichnung der Website. Bewusst kräftig, aber nicht schreiend –
   der Preis ist das Hauptargument der Aktionshäuser. */
.ah-price {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-weight: 700; color: var(--lp-navy);
  white-space: nowrap;
}
.ah-price__from  { font-size: .78rem; font-weight: 600; color: var(--lp-muted); letter-spacing: .04em; text-transform: uppercase; }
.ah-price__value { font-size: 1.7rem; letter-spacing: -.02em; }

.ah-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: #C8811E; color: #fff;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(200, 129, 30, .28);
}
.ah-badge .material-symbols-outlined { font-size: 16px; }

/* ============================== KARTEN-GRID ============================== */
.ah-cards {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  /* Zeilen der Karte über alle Karten hinweg ausrichten (ragged edge vermeiden):
     Bild / Kopf / Kennzahlen / Fuß landen auf gleicher Höhe. */
  grid-template-rows: auto;
  margin-top: 44px;
}
.ah-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-row: span 4;
  background: #fff; border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s cubic-bezier(.22,1,.36,1), border-color .3s;
}
@supports (grid-template-rows: subgrid) {
  .ah-cards { grid-template-rows: repeat(4, auto); }
  /* row-gap: 0 – sonst erbt die Subgrid-Karte den 28px-Rasterabstand zwischen Bild/Text/Daten/Fuß. */
  .ah-card  { grid-template-rows: subgrid; row-gap: 0; }
}
.ah-card:hover,
.ah-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
  border-color: transparent;
}
.ah-card:focus-visible { outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 3px; }
.ah-card__media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 10; background: #eef0f3;
}
.ah-card__media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.22,1,.36,1);
}
.ah-card:hover .ah-card__media img,
.ah-card:focus-visible .ah-card__media img { transform: scale(1.03); }
/* Nur ein kleines Label – der Preis steht einmal, unten im Preisfeld. */
.ah-card__badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--mz-cta-orange, #d97706); box-shadow: none;
}

/* Die Karte ist ein <a> mit <span>-Kindern (valides HTML, da kein verschachteltes
   interaktives Element). Deshalb müssen die Spans explizit blockig werden. */
.ah-card__body  { display: block; padding: 22px 24px 0; }
.ah-card__title { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.ah-card__text  {
  display: block; margin-top: 6px; color: var(--lp-muted); font-size: .95rem; line-height: 1.55;
  min-height: calc(3 * 1.55em);   /* gleiche Kartenhöhe auch bei einzeln stehenden Karten */
}

/* Kennzahlen untereinander: Wohnfläche zuerst und kräftiger, feine Trennlinien. */
.ah-card__facts {
  display: flex; flex-direction: column; align-self: end;
  padding: 14px 24px 20px; color: var(--lp-navy);
  font-size: .92rem;
}
.ah-card__fact {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
}
.ah-card__fact + .ah-card__fact { border-top: 1px solid var(--lp-line); }
.ah-card__fact .material-symbols-outlined { flex: none; width: 20px; font-size: 20px; color: var(--lp-muted); }
.ah-card__fact--main { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.ah-card__fact-label { font-size: .85rem; font-weight: 500; color: var(--lp-muted); letter-spacing: 0; }

/* Preisfeld: gesamter Kartenfuß in Marineblau, Preis in der Aktionsfarbe. */
.ah-card__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 20px 20px 20px 24px; background: var(--lp-navy-2);
}
.ah-card .ah-price__from  { color: rgba(255, 255, 255, .6); }
.ah-card .ah-price__value { color: var(--mz-cta-orange, #d97706); font-size: 1.45rem; font-weight: 800; }
.ah-card__more {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-weight: 700; font-size: 1rem; color: #fff;
  transition: color .35s ease;
}
.ah-card__more .material-symbols-outlined { font-size: 20px; }
/* Hover und Tastaturfokus: Link + Pfeil ruhig in Button-Orange, ohne Bewegung. */
.ah-card:hover .ah-card__more,
.ah-card:focus-visible .ah-card__more { color: var(--mz-cta-orange, #d97706); }

/* ==================== DETAILSEITEN-HERO ====================
   Die Detailseiten nutzen den Split-Hero mit Diagonale aus
   leistungen/leistungen.css (.lp-hero/__img/__panel/__content) – identisch zu
   allen anderen Unterseiten. Hier nur die zusätzliche Preiszeile. */
.ah-hero-preis {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 30px;
  font-size: 15px; color: rgba(255, 255, 255, .72);
}
.ah-hero-preis strong {
  font-size: clamp(28px, 2.6vw, 38px); font-weight: 800;
  letter-spacing: -.02em; color: #fff;
}

/* ========================= ANGEBOTS-SEKTION =========================
   Aufbau nach dem Vorbild der Referenzseite: links die Bilder, rechts die
   Box mit allem Kaufrelevanten (Preis, Eckdaten, Anfrage). */
.ah-angebot {
  display: grid; gap: clamp(24px, 3vw, 44px);
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  align-items: start;
}
@media (max-width: 900px) {
  .ah-angebot { grid-template-columns: 1fr; }
}

.ah-box {
  background: #fff; border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius); padding: clamp(22px, 2.6vw, 30px);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}
/* Mitlaufen lassen, solange zweispaltig – auf dem Handy waere das stoerend. */
@media (min-width: 901px) {
  .ah-box { position: sticky; top: 104px; }
}

.ah-box__claim {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ah-accent, #C8811E);
}
.ah-box__name { margin-top: 8px; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }

.ah-box__preis {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--lp-line);
}
.ah-box__preis-label { font-size: .84rem; color: var(--lp-muted); }
.ah-box__preis-wert {
  display: block; margin-top: 2px;
  font-size: clamp(1.9rem, 3vw, 2.3rem); font-weight: 800;
  letter-spacing: -.03em; color: var(--lp-navy);
}

.ah-box__eck { margin: 20px 0 0; padding: 0; list-style: none; }
.ah-box__eck li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--lp-line);
  font-size: .94rem;
}
.ah-box__eck li:last-child { border-bottom: 0; }
.ah-box__eck .material-symbols-outlined { font-size: 20px; color: var(--lp-muted); flex: none; }
.ah-box__eck strong { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.ah-box__aktion { display: grid; gap: 10px; margin-top: 22px; }
.ah-box__hinweis {
  display: flex; gap: 8px; margin-top: 16px;
  font-size: .82rem; line-height: 1.55; color: var(--lp-muted);
}
.ah-box__hinweis .material-symbols-outlined { font-size: 18px; color: var(--ah-accent, #C8811E); flex: none; }

/* Buttons der Angebots-Box */
.ah-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.ah-btn .material-symbols-outlined { font-size: 18px; }
.ah-btn--navy  { background: var(--lp-navy-2); color: #fff; border-color: var(--lp-navy-2); }
.ah-btn--navy:hover { background: var(--lp-navy); border-color: var(--lp-navy); }
.ah-btn--linie { border-color: var(--lp-line); color: var(--lp-navy); background: #fff; }
.ah-btn--linie:hover { border-color: var(--lp-navy-2); background: var(--lp-surface); }

/* ==================== ANGEBOTS-MODUL (Galerie + Panel) ====================
   Variante der Angebots-Sektion: Galerie und Info-Panel wirken als ein Modul.
   Das Panel überlappt auf Desktop den rechten Galerierand, hat einen Navy-Kopf
   mit kleiner Diagonale (wie Hero/Vertrauensband) und bündelt alle Eckdaten.
   Nur aktiv mit .ah-angebot--modul – die übrigen Hausseiten bleiben unberührt. */
.ah-section.ah-section--modul { padding-top: clamp(24px, 3vw, 40px); }

.ah-angebot--modul {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
  gap: 0; align-items: start;
}
.ah-angebot--modul .ah-slider__buehne {
  border-radius: var(--lp-radius);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

/* Tag/Abend als Teil des Bildes: dunkle Glas-Pille oben links (wie „Vergrößern“) */
.ah-angebot--modul .ah-daynight {
  position: absolute; top: 14px; left: 14px; z-index: 3; margin: 0;
  gap: 2px; padding: 3px;
  background: rgba(15, 23, 42, .72); border: 0;
  backdrop-filter: blur(4px);
}
.ah-angebot--modul .ah-daynight__btn { padding: 7px 14px; font-size: .82rem; color: rgba(255, 255, 255, .8); }
.ah-angebot--modul .ah-daynight__btn .material-symbols-outlined { font-size: 16px; }
.ah-angebot--modul .ah-daynight__btn:hover { color: #fff; }
.ah-angebot--modul .ah-daynight__btn[aria-selected="true"] { background: #fff; color: var(--lp-navy); }

/* Sichtbarer Tastaturfokus für alle Bedienelemente des Moduls */
.ah-angebot--modul :is(.ah-daynight__btn, .ah-slider__nav, .ah-slider__lupe, .ah-slider__punkt, .ah-btn):focus-visible {
  outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 2px;
}
.ah-angebot--modul .ah-slider__lupe { transition: background .25s; }
/* Rechte Bedienelemente um die Panel-Überlappung nach innen rücken */
@media (min-width: 1101px) {
  .ah-angebot--modul .ah-slider__nav--next,
  .ah-angebot--modul .ah-slider__lupe { right: 70px; }
}
.ah-angebot--modul .ah-slider__lupe:hover { background: rgba(15, 23, 42, .88); }

/* Panel */
.ah-box--modul {
  position: relative; top: auto; z-index: 2;   /* kein Sticky wie bei .ah-box */
  margin: 32px 0 0 -56px;                  /* überlappt die Galerie */
  padding: 0; overflow: hidden;
  border: 0; box-shadow: 0 14px 38px rgba(15, 23, 42, .12);
}
.ah-box--modul .ah-box__kopf {
  padding: 24px 26px 38px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, .08) 0%, transparent 48%),
    linear-gradient(145deg, var(--lp-navy-soft) 0%, var(--lp-navy-2) 50%, var(--lp-navy) 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 0 100%);
  color: #fff;
}
.ah-box--modul .ah-box__claim { color: rgba(255, 255, 255, .6); font-size: .72rem; font-weight: 700; letter-spacing: .2em; }
.ah-box--modul .ah-box__name { margin-top: 6px; font-size: 1.35rem; font-weight: 800; color: #fff; }
.ah-box--modul .ah-box__preis {
  display: flex; align-items: baseline; gap: 8px;
  margin: 14px 0 0; padding: 0; border: 0;
}
.ah-box--modul .ah-box__preis-label { font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .6); }
.ah-box--modul .ah-box__preis-wert {
  display: inline; margin: 0;
  font-size: clamp(1.9rem, 2.6vw, 2.3rem); font-weight: 800;
  color: var(--mz-cta-orange, #d97706);
}

.ah-box__daten { margin: 0; padding: 10px 26px 0; }
.ah-box__zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--lp-line);
  font-size: .94rem; color: var(--lp-navy);
}
.ah-box__zeile:last-child { border-bottom: 0; }
.ah-box__zeile dt { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; }
.ah-box__zeile dt .material-symbols-outlined { flex: none; width: 20px; font-size: 20px; color: var(--lp-muted); }
.ah-box__zeile dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ah-box__zeile--haupt { font-size: 1.02rem; }
.ah-box__zeile--haupt dd { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }

.ah-box--modul .ah-box__aktion { margin: 0; padding: 16px 26px 26px; }
.ah-btn--cta { background: var(--mz-cta-orange, #d97706); color: #fff; border-color: transparent; }
.ah-btn--cta:hover { background: #b45309; }   /* = Hover des Projektcheck-Buttons */

@media (max-width: 1100px) {
  .ah-angebot--modul { grid-template-columns: 1fr; }
  .ah-box--modul { margin: 24px 0 0; }
}

/* ======================== BASISINFORMATION ========================
   Zeilentabelle statt Kacheln: Icon und Bezeichnung links, Wert rechts. */
.ah-basis { margin: 0; max-width: 820px; }
.ah-basis__zeile {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center;
  gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--lp-line);
}
.ah-basis__zeile:last-child { border-bottom: 0; }
.ah-basis__icon { color: var(--ah-accent, #C8811E); display: flex; }
.ah-basis__icon .material-symbols-outlined { font-size: 24px; }
.ah-basis__name { margin: 0; font-weight: 500; color: var(--lp-navy); }
.ah-basis__wert {
  margin: 0; font-weight: 700; color: var(--lp-navy);
  font-variant-numeric: tabular-nums; text-align: right;
}
.ah-basis__zusatz { display: block; font-size: .84rem; font-weight: 500; color: var(--lp-muted); }

@media (max-width: 560px) {
  .ah-basis__zeile { grid-template-columns: 28px 1fr; row-gap: 2px; padding: 13px 0; }
  .ah-basis__wert  { grid-column: 2; text-align: left; }
}

/* ============================ ABSCHNITTE ============================ */
.ah-section { padding-block: clamp(48px, 7vw, 86px); }
.ah-section--tint { background: #fff; }
.ah-section__head { max-width: 62ch; }
.ah-section__eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ah-accent, #C8811E);
}
.ah-section__title { margin-top: 10px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; }
.ah-section__text  { margin-top: 14px; color: var(--lp-muted); line-height: 1.75; }
.ah-section__text + .ah-section__text { margin-top: 12px; }

/* ---- Highlight-Liste ---- */
.ah-list { display: grid; gap: 12px; margin-top: 26px; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.ah-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.ah-list .material-symbols-outlined { font-size: 20px; color: var(--ah-accent, #C8811E); flex: none; margin-top: 1px; }

/* ============================ GRUNDRISS-TABS ============================ */
.ah-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.ah-tab {
  appearance: none; border: 1px solid var(--lp-line); background: #fff;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--lp-navy);
  transition: background .25s, color .25s, border-color .25s;
}
.ah-tab:hover { border-color: var(--lp-navy-2); }
.ah-tab[aria-selected="true"] { background: var(--lp-navy-2); border-color: var(--lp-navy-2); color: #fff; }

.ah-plan { margin-top: 26px; }
.ah-plan[hidden] { display: none; }

/* 3D-Grundriss links, Raumliste rechts – mobil gestapelt */
.ah-plan__layout {
  display: grid; gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  align-items: start;
}
@media (max-width: 860px) {
  .ah-plan__layout { grid-template-columns: 1fr; }
}

.ah-plan__frame {
  display: block; background: #fff; border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius); padding: clamp(14px, 2.5vw, 28px);
  cursor: zoom-in; transition: border-color .25s, box-shadow .25s;
}
.ah-plan__frame:hover { border-color: var(--lp-navy-2); box-shadow: 0 16px 40px rgba(15,23,42,.10); }
.ah-plan__frame img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* Freigestellter 3D-Grundriss: keine weiße Karte, schwebt leicht gekippt mit
   Konturschatten über der Fläche und richtet sich bei Hover auf. */
.ah-plan__frame--frei {
  background: none; border: 0; padding: clamp(10px, 2vw, 24px) clamp(6px, 1.5vw, 16px) 0;
  perspective: 1200px;
}
.ah-plan__frame--frei:hover { border-color: transparent; box-shadow: none; }
.ah-plan__frame--frei img {
  border-radius: 0;
  transform: rotateX(7deg);
  transform-origin: 50% 100%;
  filter:
    drop-shadow(0 10px 12px rgba(15, 23, 42, .14))
    drop-shadow(0 34px 40px rgba(15, 23, 42, .22));
  transition: transform .6s cubic-bezier(.16, 1, .3, 1), filter .6s;
}
.ah-plan__frame--frei:hover img {
  transform: rotateX(0deg) translateY(-8px);
  filter:
    drop-shadow(0 14px 16px rgba(15, 23, 42, .16))
    drop-shadow(0 48px 56px rgba(15, 23, 42, .26));
}
@media (prefers-reduced-motion: reduce) {
  .ah-plan__frame--frei img, .ah-plan__frame--frei:hover img { transform: none; transition: none; }
}

.ah-plan__zoom {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; color: var(--lp-muted); font-size: .88rem;
}
.ah-plan__zoom .material-symbols-outlined { font-size: 18px; }

/* ---- Raumliste (Vorbild: Haussteckbrief der Wettbewerber) ---- */
.ah-rooms {
  background: #fff; border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius); padding: clamp(20px, 2.5vw, 28px);
}
.ah-rooms__title {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ah-accent, #C8811E);
}
.ah-rooms__list { margin: 16px 0 0; padding: 0; list-style: none; }
.ah-rooms__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--lp-line);
  font-size: .95rem;
}
.ah-rooms__list li:last-child { border-bottom: 0; }
.ah-rooms__name { color: var(--lp-navy); }
.ah-rooms__size { font-variant-numeric: tabular-nums; color: var(--lp-muted); white-space: nowrap; }

.ah-rooms__sum {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--lp-navy-2);
  font-weight: 700; color: var(--lp-navy);
}
.ah-rooms__sum span:last-child { font-variant-numeric: tabular-nums; }

/* ---- Umschalter 3D-Ansicht / bemaßter Originalplan (gleiche Optik wie der
   Tag/Abend-Schalter). Beide Ansichten liegen im Panel, die inaktive ist hidden;
   die Umschaltlogik übernimmt aktionshaeuser.js (Tabs-Pattern). ---- */
.ah-planwahl {
  display: inline-flex; gap: 4px; margin: 0 0 16px; padding: 4px;
  background: #fff; border: 1px solid var(--lp-line); border-radius: 999px;
}
.ah-planwahl__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--lp-muted);
  transition: background .25s, color .25s;
}
.ah-planwahl__btn .material-symbols-outlined { font-size: 18px; }
.ah-planwahl__btn:hover { color: var(--lp-navy); }
.ah-planwahl__btn[aria-selected="true"] { background: var(--lp-navy-2); color: #fff; }
.ah-plan__ansicht[hidden] { display: none; }

/* Link auf den bemaßten 2D-Plan (Altbestand, aktuell ohne Verwendung) */
.ah-plan__technisch {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 11px 18px;
  border: 1px solid var(--lp-line); border-radius: 999px;
  background: #fff; color: var(--lp-navy-2);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: zoom-in;
  text-decoration: none; transition: border-color .25s, background .25s;
}
.ah-plan__technisch:hover { border-color: var(--lp-navy-2); background: var(--lp-surface); }
.ah-plan__technisch .material-symbols-outlined { font-size: 18px; }

/* ============================== SLIDER ==============================
   Ein grosses Bild, durchblaetterbar. Jede Position haelt beide Tageszeiten
   uebereinander – der Tag/Abend-Schalter blendet innerhalb der aktuellen
   Position um, statt das ganze Set zu wechseln. */
.ah-slider { position: relative; }

.ah-slider__buehne {
  position: relative; display: grid;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--lp-line); background: #eef0f3;
}

.ah-slide {
  grid-area: 1 / 1; margin: 0; display: grid;
  opacity: 0; visibility: hidden;
  transition: opacity .45s cubic-bezier(.22, 1, .36, 1);
}
.ah-slide[aria-hidden="false"] { opacity: 1; visibility: visible; }

.ah-slide__bild {
  grid-area: 1 / 1;
  display: block; width: 100%; height: 100%;
  aspect-ratio: var(--ah-gal-ratio, 4 / 3); object-fit: cover;
  opacity: 0; transition: opacity .5s cubic-bezier(.22, 1, .36, 1);
}
.ah-slide__bild[data-aktiv] { opacity: 1; }

/* Blättern */
.ah-slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: var(--lp-navy);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .18);
  transition: background .25s, transform .25s;
}
.ah-slider__nav:hover { background: #fff; }
.ah-slider__nav svg { width: 22px; height: 22px; pointer-events: none; }
.ah-slider__nav--prev { left: 14px; }
.ah-slider__nav--next { right: 14px; }

/* Punkte */
.ah-slider__punkte {
  display: flex; justify-content: center; gap: 9px; margin-top: 16px;
}
.ah-slider__punkt {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: var(--lp-line); cursor: pointer;
  transition: background .25s, transform .25s;
}
.ah-slider__punkt:hover { background: var(--lp-muted); }
.ah-slider__punkt[aria-current="true"] { background: var(--lp-navy-2); transform: scale(1.3); }

/* Bildunterschrift */
.ah-slider__text {
  margin-top: 12px; text-align: center;
  font-size: .9rem; color: var(--lp-muted);
}

/* Lupe rechts unten – die Lightbox zeigt das Bild gross */
.ah-slider__lupe {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 0;
  background: rgba(15, 23, 42, .72); color: #fff; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.ah-slider__lupe .material-symbols-outlined { font-size: 17px; }

/* Technische Zeichnungen: volle Breite, natuerliches Format */
.ah-gallery--plaene {
  display: grid; gap: 18px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.ah-gallery__item {
  display: block; overflow: hidden; text-decoration: none;
  border-radius: 12px; border: 1px solid var(--lp-line); background: #fff;
  cursor: zoom-in;
}
.ah-gallery__item--plan { padding: 14px; }
.ah-gallery__item--plan img { display: block; width: 100%; height: auto; }
.ah-gallery__cap {
  display: block; padding: 12px 14px; font-size: .88rem;
  color: var(--lp-muted); text-decoration: none;
}

@media (max-width: 560px) {
  .ah-slider__nav { width: 38px; height: 38px; }
  .ah-slider__nav--prev { left: 8px; }
  .ah-slider__nav--next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ah-slide, .ah-slide__bild { transition: none; }
}

/* ============================ PREIS-HINWEIS ============================
   Pflichtangabe: worauf sich „ab“ bezieht. Steht auf jeder Seite mit Preis. */
.ah-note {
  margin-top: 30px; padding: 18px 22px;
  background: #fff; border: 1px solid var(--lp-line);
  border-left: 3px solid var(--ah-accent, #C8811E);
  border-radius: 14px;
  font-size: .88rem; line-height: 1.65; color: var(--lp-muted);
}
.ah-note strong { color: var(--lp-navy); font-weight: 600; }

/* ============================== MOBIL ============================== */
@media (max-width: 720px) {
  .ah-card__foot { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Der Hero-Text sitzt auf dem Handy UNTER dem Bild. Absolut positioniert
     wuerde er bei geringer Hero-Hoehe nach oben unter das Logo laufen. */
  .ah-hero__media { aspect-ratio: 4 / 3; min-height: 0; max-height: 44vh; }
  .ah-hero__media::after { display: none; }
  .ah-hero__inner { position: static; padding-block: 24px 30px; }
  .ah-hero__title { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .ah-hero__price { gap: 12px; }
  .ah-hero__price .ah-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-card, .ah-card__media img, .ah-gallery__item img, .ah-gallery__haupt img,
  .ah-card__more, .ah-card__more .material-symbols-outlined { transition: none; }
  .ah-card:hover, .ah-card:hover .ah-card__media img { transform: none; }
  .ah-gallery__item:hover img, .ah-gallery__haupt:hover img { transform: none; }
}

/* ========================= TAG / NACHT-GALERIE =========================
   Ein Umschalter wechselt das komplette Bildset. Beide Sets liegen in
   derselben Grid-Zelle übereinander; das inaktive wird ausgeblendet. So
   braucht das Umschalten keinen neuen Request und die Höhe springt nicht,
   weil der Container die Höhe des größeren Sets behält. */
.ah-daynight {
  display: inline-flex; gap: 4px; margin-top: 22px; padding: 4px;
  background: #fff; border: 1px solid var(--lp-line); border-radius: 999px;
}
.ah-daynight__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--lp-muted);
  transition: background .25s, color .25s;
}
.ah-daynight__btn .material-symbols-outlined { font-size: 18px; }
.ah-daynight__btn:hover { color: var(--lp-navy); }
.ah-daynight__btn[aria-selected="true"] { background: var(--lp-navy-2); color: #fff; }

.ah-sets { display: grid; margin-top: 24px; }
.ah-set {
  grid-area: 1 / 1;                    /* beide Sets stapeln sich */
  transition: opacity .45s cubic-bezier(.22, 1, .36, 1);
}
.ah-set[aria-hidden="true"] {
  opacity: 0; pointer-events: none; visibility: hidden;
}
.ah-set[aria-hidden="false"] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ah-set { transition: none; }
}

/* Ohne JavaScript bleibt das Tag-Set sichtbar und das Nacht-Set darunter
   sichtbar statt unsichtbar gestapelt. */
.ah-sets:not([data-ready]) .ah-set { grid-area: auto; opacity: 1; visibility: visible; }
.ah-sets:not([data-ready]) .ah-daynight { display: none; }

/* ========================= 3D-SKIZZE (BESCHREIBUNG) =========================
   Der Bungalow schwebt als freigestelltes 3D-Modell aus der Vogelperspektive
   rechts neben dem Beschreibungstext und ragt nach oben in die Basisinformation
   hinein – verzahnt so beide Abschnitte und gibt der Seite Tiefe.
   Rein dekorativ (aria-hidden), nur auf breiten Desktops. Die Perspektive
   steckt bereits im Rendering, deshalb keine CSS-Rotation mehr; der eigentliche
   Grundriss mit Alt-Text folgt weiter unten im Abschnitt „Grundrisse“. */
.ah-section--skizze .container { position: relative; }
/* Das Modell ragt rechts leicht über den Container hinaus; clip (nicht
   hidden) verhindert horizontales Scrollen, ohne Sticky-Elemente zu brechen. */
.lp.ah-accent { overflow-x: clip; }
.ah-skizze { display: none; }

@media (min-width: 1200px) {
  .ah-skizze {
    display: block;
    position: absolute;
    right: clamp(-90px, -5vw, -40px);
    /* Bei schmalen Desktops etwas tiefer und kleiner, damit das Modell nicht
       in die Werte-Spalte der Basisinformation hineinragt. */
    top: clamp(-200px, -11vw, -110px);
    width: clamp(440px, 38vw, 620px);
    pointer-events: none;
    z-index: 1;
  }
  .ah-skizze__platte {
    animation: ah-skizze-schweben 9s ease-in-out infinite;
    will-change: transform;
  }
  .ah-skizze__platte img {
    display: block;
    width: 100%;
    height: auto;
    /* Freigestelltes Modell: Schatten folgt der Kontur statt einem Rechteck.
       Radius bewusst moderat, damit nichts am Container-Rand abgeschnitten wird. */
    filter:
      drop-shadow(0 14px 18px rgba(15, 23, 42, .22))
      drop-shadow(0 36px 44px rgba(15, 23, 42, .18));
  }
  @keyframes ah-skizze-schweben {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .ah-skizze__platte { animation: none; }
}


/* =========================================================================
   HAUS-DETAILSEITE, NEUE FASSUNG (.ah-neu am <main>)
   Aktuell nur Bungalow. Alles hier ist an .ah-neu gebunden, damit
   Einfamilienhaus und Stadtvilla unverändert bleiben, bis sie umgestellt werden.
   ========================================================================= */

/* ---- Hero der Detailseiten: gemeinsame H1-Größe, aber die Zeilen dürfen
   umbrechen, sobald sie nicht mehr vor die Diagonale passen. Die maximale
   Breite folgt der sichtbaren Panelbreite (Panel 62vw, Schräge, Innenabstand). ---- */
@media (min-width: 900px) {
  .lp-hero__headline--schraege { width: calc(54vw - 30px); max-width: none; font-size: clamp(36px, 4.2vw, 64px); }
  .lp-hero__headline--schraege span { white-space: normal; }
}

/* ---- Seitenrhythmus: etwas kompaktere Abschnitte ---- */
.ah-neu .ah-section { padding-block: clamp(44px, 5.5vw, 72px); }
.ah-neu .ah-section.ah-section--modul { padding-top: clamp(24px, 3vw, 40px); padding-bottom: clamp(28px, 3.5vw, 44px); }
.ah-neu .ah-section__head .san-intro__title { margin-bottom: 0; }
.ah-neu .ah-section__head .ah-section__text { margin-top: 14px; }

/* ---- Das Haus: Text + drei Merkmale links (~45 %), 3D-Modell rechts (~55 %) ---- */
.ah-neu .ah-haus { padding-top: clamp(28px, 3.5vw, 44px); padding-bottom: clamp(24px, 3vw, 40px); }
.ah-haus__inner {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: clamp(24px, 4vw, 56px);
}
.ah-haus__text .ah-section__text { max-width: 54ch; }
/* Safari schneidet drop-shadow an der Box des Bild-Wrappers ab – sichtbar als
   graue rechteckige Kante unter/rechts vom Haus. Transparenter Innenabstand
   gibt dem Schatten Platz, die negativen Margins heben ihn im Layout wieder
   auf (Größe und Position des Hauses bleiben unverändert). */
.ah-haus__bild .ah-skizze__platte {
  padding: 24px 100px 110px;
  margin: -24px -100px -110px;
}
.ah-haus__bild img {
  display: block; width: 100%; height: auto;
  filter:
    drop-shadow(0 14px 18px rgba(15, 23, 42, .22))
    drop-shadow(0 36px 44px rgba(15, 23, 42, .18));
}
.ah-merkmale {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; margin: 28px 0 0; padding: 0; list-style: none;
}
.ah-merkmal { display: flex; flex-direction: column; gap: 6px; }
.ah-merkmal__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(24, 48, 84, .07); color: var(--lp-navy-2); font-size: 22px;
}
.ah-merkmal__titel { font-size: .98rem; font-weight: 700; color: var(--lp-navy); line-height: 1.3; }
.ah-merkmal__text  { font-size: .9rem; line-height: 1.55; color: var(--lp-muted); }

@media (max-width: 1000px) {
  .ah-neu .ah-haus { padding-bottom: 56px; }   /* Abstand zur Band-Diagonale */
  .ah-haus__inner { grid-template-columns: 1fr; }
  .ah-haus__bild { max-width: 560px; width: 100%; justify-self: center; }
}
@media (max-width: 600px) {
  .ah-merkmale { grid-template-columns: 1fr; gap: 16px; }
  .ah-merkmal { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 2px; }
  .ah-merkmal__icon { grid-row: span 2; margin: 0; }
}

/* ---- Grundrisse: Umschalter über dem Raster, Grundriss und Liste oben bündig ---- */
.ah-neu .ah-plan { margin-top: 22px; }
.ah-neu .ah-planwahl { margin: 0 0 18px; }
.ah-neu .ah-plan__layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
@media (max-width: 1000px) {
  .ah-neu .ah-plan__layout { grid-template-columns: 1fr; }   /* erst Grundriss, dann Raumliste */
  .ah-neu .ah-rooms { max-width: 560px; }
}
.ah-neu .ah-plan__frame { position: relative; }
.ah-neu .ah-plan__frame--frei { padding-top: 0; }
.ah-plan__lupe {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15, 23, 42, .72); color: #fff; font-size: 20px;
  pointer-events: none;
}
.ah-neu .ah-plan__frame:focus-visible { outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 3px; }
.ah-neu .ah-rooms__title { color: var(--lp-navy-2); font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.ah-neu .ah-rooms__list li { padding: 8px 0; font-size: .92rem; }
.ah-neu .ah-rooms__sum { font-size: 1rem; }
.ah-neu .ah-rooms__sum span { white-space: nowrap; }
.ah-neu .ah-rooms__sum span:last-child { font-weight: 800; }

/* ---- Geschosswahl (nur bei zwei Geschossen) über der Darstellungswahl ---- */
.ah-neu .ah-geschosswahl { margin: 0 0 12px; }
.ah-neu .ah-tab:focus-visible { outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 2px; }
.ah-neu .ah-geschosswahl[inert] { opacity: .4; }
.ah-neu .ah-plan > .ah-planwahl { margin-top: 0; }

/* ---- Dritter Tab „Ansichten & Schnitt“: ersetzt Grundriss + Raumliste ---- */
.ah-plan[data-ansicht="ansicht-zeichnungen"] .ah-plan__layout { display: none; }
.ah-neu .ah-plan__zeichnungen .ah-gallery--plaene { margin-top: 0; }
.ah-neu .ah-planwahl__btn:focus-visible { outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 2px; }
/* Schmale Screens: Tabs nicht quetschen, sondern waagerecht scrollen */
@media (max-width: 560px) {
  .ah-neu .ah-planwahl {
    display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ah-neu .ah-planwahl::-webkit-scrollbar { display: none; }
  .ah-neu .ah-planwahl__btn { flex: none; white-space: nowrap; padding: 9px 14px; }
  .ah-neu .ah-planwahl__btn .material-symbols-outlined { display: none; }
}

/* ---- Ansichten und Schnitt: zwei gleich große Karten ---- */
.ah-neu .ah-gallery--plaene { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 20px; }
.ah-neu .ah-gallery__item--plan { position: relative; display: flex; flex-direction: column; padding: 16px; border-radius: var(--lp-radius); transition: border-color .25s, box-shadow .25s; }
.ah-neu .ah-gallery__item--plan:hover { border-color: var(--lp-navy-2); box-shadow: 0 16px 40px rgba(15,23,42,.10); }
.ah-neu .ah-gallery__item--plan .ah-plan__lupe { top: 14px; bottom: auto; right: 14px; }
.ah-neu .ah-gallery__item--plan img { aspect-ratio: 16 / 10; object-fit: contain; }
.ah-neu .ah-gallery__cap { padding: 12px 2px 0; margin-top: auto; }
/* Nur ein Zeichnungsblatt (Einfamilienhaus, Stadtvilla): natürliches Format, groß */
.ah-neu .ah-gallery--einzeln { grid-template-columns: minmax(0, 1fr); }
.ah-neu .ah-gallery--einzeln .ah-gallery__item--plan { width: fit-content; max-width: 100%; }
.ah-neu .ah-gallery--einzeln .ah-gallery__item--plan img { aspect-ratio: auto; width: auto; max-width: 100%; max-height: min(78vh, 900px); }
.ah-neu .ah-gallery__item:focus-visible { outline: 2px solid var(--mz-cta-orange, #d97706); outline-offset: 3px; }

/* Preis-Hinweis unter den Zeichnungen: klein und grau statt Kasten */
.ah-neu .ah-note {
  margin-top: 22px; padding: 0; max-width: 92ch;
  background: none; border: 0; border-radius: 0;
  font-size: .82rem; line-height: 1.6;
}
.ah-neu .ah-note strong { font-weight: 600; color: var(--lp-muted); }


/* KI-Hinweis in der Galerie: rechtsbündig mit „Vergrößern“ (rückt wegen des
   überlappenden Panels nach innen); das Ausweichen darüber macht ki-kennzeichnung.js */
@media (min-width: 1101px) {
  .ah-angebot--modul .ah-slide > .mz-ki { right: 70px; }
}
