/* ============================================
   LIVING STREET Niederuzwil – Stylesheet
   Headlines: Maharlika (H1, H2) / Cormorant Garamond (H3, H4)
   Body: Montserrat
   Farben: #546158 (Grün) / #f4f1ec (Beige)
   ============================================ */

@font-face {
  font-family: 'Maharlika';
  src: url('../assets/Schriftart/Maharlika-Regular.woff2') format('woff2'),
       url('../assets/Schriftart/Maharlika-Regular.woff') format('woff'),
       url('../assets/Schriftart/Maharlika-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #546158;
  --green-dark: #3f4a44;
  --beige: #f4f1ec;
  --beige-dark: #e8e3da;
  /* Terracotta: zweite Akzentfarbe aus den Print-Unterlagen (Exposé, Druckfassung),
     dort für Eyebrow-Labels, Grundriss-Varianten und nummerierte Marker genutzt.
     Auf der Website bewusst nur für nummerierte Marker/Badges eingesetzt (25.09.26),
     nicht als Ersatz für Grün. */
  --terracotta: #9c3b30;
  --white: #ffffff;
  --black: #1a1a1a;
  --grey: #6b6b6b;
  --grey-light: #b8b8b8;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1400px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

/* Anchor-Ziele der Nav-Links sonst zur Hälfte unter der fixen Nav versteckt */
section[id] { scroll-margin-top: 90px; }
/* CTA "Besichtigung vereinbaren": Anker bewusst auf der Formular-Überschrift,
   nicht auf den Fotos – so ist der Sprung unabhängig vom Bilder-Ladezustand
   auf allen Geräten zuverlässig gleich. */
#besichtigung { scroll-margin-top: 90px; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--green);
  background: var(--beige);
  overflow-x: hidden;
}

/* On green/dark sections, body text switches to beige */
.section--green,
.section--green p,
.section--green a:not(.cta-box):not(.contact__cta),
.section--green .lead,
.section--green .eyebrow { color: var(--beige); }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--green);
}
h1 { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: 6px; font-weight: 500; }
h2 {
  font-family: 'Maharlika', 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  letter-spacing: 1px;
}
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: 2px; }

/* On dark/green sections, headings switch to beige */
.section--green h1,
.section--green h2,
.section--green h3,
.section--green h4 { color: var(--beige); }

p { font-weight: 300; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  transition: all var(--transition);
  background: transparent;
}
.nav.scrolled {
  background: rgba(244, 241, 236, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem var(--gutter);
}
.nav__logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  letter-spacing: 4px;
  color: var(--beige);
  transition: color var(--transition);
}
.nav.scrolled .nav__logo { color: var(--green); }
.nav__links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav__links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beige);
  transition: color var(--transition);
}
.nav.scrolled .nav__links a { color: var(--green); }
.nav__toggle { display: none; }
.nav__mobile-actions { display: none; }

/* "Besichtigung vereinbaren" – als eigenständiger, gefüllter Button in der Nav */
.nav__links .nav__cta {
  padding: 0.6rem 1.2rem;
  background: var(--beige);
  color: var(--green) !important;
  border: 1.5px solid var(--green);
  font-weight: 500;
}
.nav.scrolled .nav__links .nav__cta {
  background: var(--green);
  color: var(--beige) !important;
}
.nav__links .nav__cta:hover { opacity: 0.85; }

@media (max-width: 768px) {
  /* Kompakte, immer sichtbare CTA in der Nav-Leiste (neben dem Menü-Button) */
  .nav__mobile-actions { display: flex; align-items: center; gap: 0.65rem; }
  .nav__cta-mobile {
    padding: 0.45rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green) !important;
    background: var(--beige);
    border: 1.5px solid var(--green);
    white-space: nowrap;
  }
  .nav.scrolled .nav__cta-mobile { background: var(--green); color: var(--beige) !important; }

  /* Die CTA im ausklappbaren Menü entfällt auf Mobile – ersetzt durch die
     kompakte Variante oben, verhindert auch das Überlappen mit "Kontakt". */
  .nav__links .nav__cta { display: none; }

  .nav__links {
    position: fixed; top: 0; right: -100%;
    width: 80%; height: 100vh;
    background: var(--green);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2.5rem; transition: right var(--transition);
    z-index: 100;
  }
  .nav__links.open { right: 0; }
  .nav__links a { color: var(--white) !important; font-size: 1.1rem; }

  /* Menü-Button: eigener Stacking-Context (position: relative), damit er
     immer über dem ausklappenden Panel bleibt und zum Schliessen anklickbar ist */
  .nav__toggle {
    position: relative;
    display: block; background: none; border: none;
    width: 32px; height: 32px; cursor: pointer; z-index: 101;
  }
  .nav__toggle span {
    display: block; width: 100%; height: 2px;
    background: var(--beige); margin: 6px 0;
    transition: all var(--transition);
  }
  .nav.scrolled .nav__toggle span { background: var(--green); }

  /* Wenn Menü offen: Balken zu "X" formen, damit klar ist, dass man hier schliesst */
  .nav__toggle.open span { background: var(--white); }
  .nav__toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--beige);
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero__overlay {
  position: absolute; inset: 0;
  /* Schwarzer Layer mit 39% Opazität (Canva Transparenz 39) */
  background: rgba(0, 0, 0, 0.39);
  z-index: 2;
}
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 var(--gutter);
}

/* Hero Title – Maharlika, gross wie auf der Canva-Seite, mit Aufschwung */
.hero__title {
  font-family: 'Maharlika', 'Cormorant Garamond', 'Times New Roman', serif !important;
  font-weight: 400;
  font-size: clamp(2.75rem, 10vw, 10rem);
  letter-spacing: 0 !important;
  line-height: 1.14;
  text-transform: uppercase;
  color: var(--beige) !important;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
  margin-bottom: 0.4rem; /* enger an das Subtitle, wie im Canva */

  opacity: 0;
  transform: translateY(50px);
  animation: heroRise 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

/* Hero Subtitle – etwas kleiner, näher am Title, 1:1 wie Canva-Original */
.hero__subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: clamp(0.85rem, 2.15vw, 2.15rem); /* max ~34px */
  letter-spacing: 0.32em;
  line-height: 1.14;
  text-transform: uppercase;
  color: var(--beige);
  margin-left: 0.32em;
  margin-top: 0;

  opacity: 0;
  transform: translateY(40px);
  animation: heroRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bevorzugung von reduce motion respektieren */
@media (prefers-reduced-motion: reduce) {
  .hero__title, .hero__subtitle {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.section--green { background: var(--green); color: var(--beige); }
.section--beige { background: var(--beige); }
.section--white { background: var(--white); }
.container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.container--narrow {
  max-width: 880px;
}
.section__head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

/* ============================================
   INTRO SECTION (green) – Welcome text + 2 boxes
   Skaliert 1:1 auf Canva-Live-Rendering (~1.5x ggü. Editor-Pixeln)
   ============================================ */
.intro__text {
  text-align: center;
  max-width: 760px;          /* schmaler – wie Canva live */
  margin: 0 auto 3.5rem;
}
.intro__text p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.125rem;       /* ~18px live */
  line-height: 1.65;
  letter-spacing: 0;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--beige);
}
.intro__text p:last-child { margin-bottom: 0; }

.intro__boxes {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.info-box {
  border: 1px solid var(--beige);
  padding: 1.6rem 3rem;
  text-align: center;
  min-width: 290px;
}
.info-box__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--beige);
  opacity: 0.75;
  font-weight: 400;
  margin-bottom: 0.7rem;
}
.info-box__value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.1rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: var(--beige);
  font-weight: 500;
}

@media (max-width: 540px) {
  .intro__text p { font-size: 1rem; }
  .info-box { min-width: 0; width: 100%; padding: 1.4rem 2rem; }
  .info-box__value { font-size: 1.6rem; }
}

/* ============================================
   IHRE WOHNUNG – 4 Apt Type Cards (1:1 Canva-Look)
   ============================================ */
#wohnungen .section__head h2 {
  font-family: 'Maharlika', 'Cormorant Garamond', serif;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  letter-spacing: 0.02em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--green);
}

.apt-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.75rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem);
}
.apt-type {
  display: block;
  margin-top: 1.75rem;
  text-decoration: none;
  color: var(--green);
  text-align: center;
  transition: transform var(--transition);
}
.apt-type:hover { opacity: 1; transform: translateY(-4px); }

/* Kleiner "Vermietet"-Hinweis auf Kartenbild (z.B. wenn Typ ausverkauft) */
.apt-type__sold-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  background: #9c3b30;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.5rem 0.95rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.apt-type__key {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--green);
}
.apt-type__submeta {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--green);
  opacity: 0.75;
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* "Ihre Wohnung": Creme an die Wohnungsblätter (Canva-Export) angeglichen,
   damit Karten/Karussell und Grundriss-Bilder farblich nahtlos ineinander
   übergehen (gleicher Ton wie auf den Wohnungs-Detailseiten). */
#wohnungen {
  --beige: #f8f6f1;
  --beige-dark: #ece8df;
}

/* Wohnungstyp-Karte: Rondell (Visualisierung + Grundrisse) und Infos darunter */
.apt-type-cell { display: flex; flex-direction: column; }

@media (max-width: 768px) {
  .apt-types { grid-template-columns: 1fr; }
}

/* ============================================
   VERFÜGBARKEIT – 3D-Modul (echt3d)
   ============================================ */
#verfuegbarkeit .section__lead {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--green);
  max-width: 720px;
  margin: 1.25rem auto 0;
  text-align: center;
}

.echt3d-wrapper {
  background: transparent;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  min-height: 620px;
  overflow: visible;
}

/* Das Modul setzt seinen Legenden-/Filter-/Modell-Block (.ls-top) selbst auf
   position: sticky; top: 0 - das griff bei uns nicht, weil overflow: hidden
   oben jeden sticky-Nachfahren killt. Jetzt zusätzlich unter die fixe Nav
   einhängen, damit der Block nicht dahinter verschwindet. */
#verfuegbarkeit .echt3d-wrapper .ls-top {
  top: 64px;
}

/* Best-Effort-Override: falls das echt3d-Modul intern eine helle Fläche setzt,
   versuchen wir sie auf Beige zu ziehen. Greift nur, wenn das Modul kein
   Shadow-DOM verwendet und generische Selektoren erlaubt. */
.echt3d-wrapper > *,
.echt3d-wrapper [class*="livingstreet"],
.echt3d-wrapper [class*="module"],
.echt3d-wrapper table,
.echt3d-wrapper thead,
.echt3d-wrapper tbody {
  background-color: transparent !important;
}
.echt3d-wrapper tr:hover td {
  background-color: rgba(84, 97, 88, 0.06) !important;
}

/* Nebenräume laufen bei uns unter "Ihr Raum für Ideen" (zweites Modul dort),
   deshalb hier aus der Wohnungs-Verfügbarkeit ausblenden. Parkplätze bleiben. */
#verfuegbarkeit .ls-section[data-section="auxiliary"] {
  display: none !important;
}

/* Zweites Modul unter "Ihr Raum für Ideen": gleiches 3D-Gesamtgebäude (das
   Modul kann die Isometrie nicht auf ein Geschoss beschränken), aber darunter
   nur die Nebenräume-Tabelle zeigen - Wohnungen/Parkplätze ausblenden. */
#raum-3d .ls-top {
  top: 64px;
}
#raum-3d .ls-section[data-section="apartment"],
#raum-3d .ls-section[data-section="parking"] {
  display: none !important;
}

/* Mobile (Feedback 12.08.26): Der komplette Filter-Block (Status-Legende +
   Regler fuer Zimmer/Wohnflaeche/Miete) nahm auf dem Handy fast den ganzen
   ersten Screen ein, bevor das 3D-Modell sichtbar wurde. Unter 700px deshalb
   komplett ausgeblendet, es bleiben nur Gebaeude-Isometrie und Tabelle
   sichtbar. Tabelle zeigt dann automatisch alle Einheiten (kein Filter
   aktiv). Auf Desktop unveraendert (Filter bleibt sichtbar). Vorherige
   30.07.-Kompaktierung (Legende als eine Zeile) damit hinfaellig, entfernt. */
@media (max-width: 700px) {
  .echt3d-wrapper .ls-filter {
    display: none !important;
  }
}

/* Mobile (Feedback 12.08.26): In der Tabelle war ohne horizontales Scrollen
   nur Status/Wohnung/Etage/Zimmer sichtbar, die Bruttomiete lag ausserhalb.
   Basis-Layout hier (Fixed Table + kompaktes Padding); welche Spalten auf
   dem Handy sichtbar bleiben bzw. wie breit sie sind, steuert main.js
   (dort je nach Tabellentyp - Wohnungen/Nebenraeume/Parkplaetze - anhand
   der Original-Spaltenueberschriften, da die drei echt3d-Tabellenvarianten
   unterschiedliche Spalten haben). */
@media (max-width: 700px) {
  .echt3d-wrapper .ls-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .echt3d-wrapper .ls-table th,
  .echt3d-wrapper .ls-table td {
    padding: 9px 4px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .echt3d-wrapper .ls-table th {
    font-size: 10px !important;
    letter-spacing: 0 !important;
  }
}

/* Fallback-Loading-Zustand, falls das Modul länger braucht */
.echt3d-wrapper:empty::before {
  content: 'Wohnungs-Übersicht wird geladen …';
  display: block;
  text-align: center;
  padding: 4rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.55;
}

/* ============================================
   IHR RAUM FÜR IDEEN
   ============================================ */
.raum__text {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.raum__text p { margin-bottom: 1.25rem; }
.raum__text p:last-child { margin-bottom: 0; }

/* ============================================
   DIE HÄUSER (Foto voller Breite + Info)
   ============================================ */
.haeuser__photo {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.haeuser__photo a {
  position: relative;
  display: block;
  cursor: pointer;
}
.haeuser__photo img {
  width: 100%;
  height: auto;
}
.haeuser__photo .apt-sheet-hint {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: background-color var(--transition), transform var(--transition);
}
.haeuser__photo .apt-sheet-hint svg {
  width: 17px; height: 17px;
  stroke: var(--beige);
  flex-shrink: 0;
}
.haeuser__photo a:hover .apt-sheet-hint {
  background: var(--green-dark);
  transform: scale(1.08);
}
.haeuser__info {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.haeuser__info h2 { margin-bottom: 1.5rem; }
.haeuser__address {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.divider {
  border: 0;
  border-top: 1px solid var(--green);
  width: 80px;
  margin: 1.5rem 0;
  opacity: 0.5;
}
.haeuser__info .divider {
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 600px) {
  .haeuser__photo .apt-sheet-hint {
    width: 34px; height: 34px;
    top: 0.85rem; right: 0.85rem;
  }
  .haeuser__photo .apt-sheet-hint svg { width: 15px; height: 15px; }
}

.haeuser__map {
  width: 100%;
  aspect-ratio: 21 / 7;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.haeuser__map iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
@media (max-width: 600px) {
  .haeuser__map { aspect-ratio: 4 / 3; }
}

/* Lage: Umgebungs-Grafik (Bahn-Schema + Luftbild mit nummerierten Pins).
   Pin-Positionen 1:1 aus der Original-PowerPoint "Umgebung mit Zahlen.pptx"
   übernommen (Shape-Koordinaten ausgelesen, nicht nachgemessen), 25.09.26. */
.umgebung { margin-top: clamp(2.5rem, 5vw, 4rem); }

.umgebung__route { display: block; width: 100%; height: auto; margin-bottom: clamp(2rem, 4vw, 3rem); }
.umgebung__route text { font-family: 'Montserrat', sans-serif; font-size: 15px; fill: var(--green); }
.umgebung__route .umgebung__route-ls { font-family: 'Cormorant Garamond', serif; font-size: 26px; fill: var(--green); }
.umgebung__route .umgebung__route-ls-sub { font-family: 'Montserrat', sans-serif; font-size: 13px; fill: var(--grey); }
.umgebung__route path { stroke: var(--beige-dark); stroke-width: 4; fill: none; stroke-linecap: round; }
.umgebung__route line { stroke: var(--beige-dark); stroke-width: 1.5; fill: none; }
.umgebung__route circle.stop { fill: var(--green); stroke: var(--beige); stroke-width: 2; }
.umgebung__route circle.stop--main { fill: var(--terracotta); stroke: none; }

.umgebung__photo {
  position: relative; width: 100%; aspect-ratio: 2200 / 1237;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  overflow: hidden; border-radius: 2px;
  cursor: zoom-in;
  touch-action: pan-y; /* Einzelfinger scrollt normal die Seite; Pinch/2-Finger übernimmt JS fürs Zoomen */
}
.umgebung__photo.is-zoomed { cursor: grab; touch-action: none; }
.umgebung__photo.is-panning { cursor: grabbing; }
.umgebung__stage {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform-origin: 0 0;
  transition: transform 0.25s ease;
}
.umgebung__photo.is-panning .umgebung__stage { transition: none; }
.umgebung__stage img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }

.umgebung__zoom-controls {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 3;
  display: flex; flex-direction: column; gap: 6px;
}
.umgebung__zoom-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: none; padding: 0;
  background: var(--green);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}
.umgebung__zoom-btn svg { width: 16px; height: 16px; stroke: var(--beige); flex-shrink: 0; pointer-events: none; }
.umgebung__zoom-btn:hover { background: var(--green-dark); transform: scale(1.08); }
@media (max-width: 600px) {
  .umgebung__zoom-btn { width: 32px; height: 32px; }
  .umgebung__zoom-controls { bottom: 0.75rem; right: 0.75rem; }
}
.umgebung__pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--terracotta); color: var(--beige);
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.25);
}
.umgebung__pin--main { width: 56px; height: 56px; font-size: 21px; }

.umgebung__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.umgebung__info-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.05rem;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.umgebung__info p { font-size: 0.92rem; line-height: 1.55; }

.umgebung__legend { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 18px 24px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.legend-item__num {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--terracotta); color: var(--beige);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 11px;
}

@media (max-width: 900px) {
  .umgebung__legend { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .umgebung__info { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .umgebung__pin { width: 26px; height: 26px; font-size: 11px; }
  .umgebung__pin--main { width: 42px; height: 42px; font-size: 16px; }
}

/* Lage: Video + Feature-Cards nebeneinander */
.lage-split {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.lage-split__video { position: relative; }
.lage-split__features {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
@media (max-width: 768px) {
  .lage-split { grid-template-columns: 1fr; }
  .lage-split__video { max-width: 360px; margin: 0 auto; }
}

.video-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  background: var(--green-dark);
}
.video-card__el {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}
.video-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(244, 241, 236, 0.92);
  color: var(--green);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.video-card__play svg { margin-left: 3px; }
.video-card__play:hover { transform: scale(1.08); background: var(--white); }
.video-card__play.is-hidden { display: none; }

/* ============================================
   AUSSTATTUNG (Feature-Grid, Auszug aus Baubeschrieb)
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2.25rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}
.feature-card {
  border-top: 1px solid rgba(84, 97, 88, 0.2);
  padding-top: 1.5rem;
}
.feature-card__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: var(--green);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}
.feature-card__text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--green);
  opacity: 0.85;
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================
   TALLY-KONTAKTFORMULAR (eingebettet auf Detailseiten)
   ============================================ */
.tally-embed-box {
  background: var(--green);
  max-width: 640px;
  margin: 2.5rem auto 0;
  padding: 0.75rem;
}
.tally-embed-box iframe { display: block; width: 100%; border: none; }
.contact__note {
  max-width: 480px;
  margin: 1rem auto 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

/* ============================================
   ECHT3D-MODUL: Mobile-Fix fuers Isometrie-Bild
   Das Modul erzwingt eine feste svg-Mindestbreite
   (500-760px), die auf Handys nicht ins Fenster
   passt und dadurch waagrechtes Scrollen/Stauchen
   verursacht. Fix: min-width aufheben, SVG darf
   per width:100% + height:auto sauber schrumpfen.
   ============================================ */
@media (max-width: 700px) {
  .ls-isometry svg { min-width: 0 !important; }
}

/* ============================================
   CTA-BOX (Vereinbaren Sie eine Besichtigung)
   ============================================ */
.cta-box {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--green);
  color: var(--beige) !important;
  border: 1px solid var(--green);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-align: center;
  transition: all var(--transition);
}
.cta-box:hover {
  opacity: 1;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

/* ============================================
   KRUMMENACHER IMMOBILIEN (Kontakt-Footer)
   ============================================ */
.krummenacher {
  text-align: center;
  padding-top: clamp(3rem, 6vw, 5rem);
}
.krummenacher__logo {
  margin-bottom: 3rem;
}
.krummenacher__logo-img {
  width: clamp(220px, 24vw, 320px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.krummenacher__role {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.6rem;
}
.krummenacher__contact-detail {
  display: block;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  overflow-wrap: anywhere;
}

/* Editorial Split: Bild links, Kontaktinfo rechts - beide Zeilen gleich gross,
   ca. 50% grösser als das Logo darüber, damit es zusammen "smooth" wirkt */
.krummenacher__people {
  max-width: 840px;
  margin: 0 auto 4rem;
  text-align: left;
}
.krummenacher__primary,
.krummenacher__secondary {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.krummenacher__divider {
  border: 0;
  border-top: 1px solid rgba(244, 241, 236, 0.25);
  margin: 3rem 0;
}

.krummenacher__primary-media,
.krummenacher__secondary-media {
  flex-shrink: 0;
  width: clamp(180px, 22vw, 225px);
  aspect-ratio: 297 / 352;
  overflow: hidden;
  border-radius: 6px;
}
.krummenacher__primary-media img,
.krummenacher__secondary-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.krummenacher__primary-name,
.krummenacher__secondary-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 2.2vw, 1.75rem);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  /* Auf schmalen Handy-Breiten reicht neben dem Foto nicht genug Platz für
     Name/E-Mail (Telefon-/E-Mail-Links liefen aus dem Viewport). Foto und
     Kontaktinfo werden hier gestapelt statt nebeneinander. */
  .krummenacher__primary, .krummenacher__secondary {
    flex-direction: column;
    text-align: center;
    gap: 1.1rem;
  }
  .krummenacher__primary-media,
  .krummenacher__secondary-media {
    width: clamp(160px, 55vw, 220px);
  }
}

.krummenacher__company {
  margin-top: 2rem;
}
.krummenacher__company-name {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.krummenacher__company-addr {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ============================================
   APARTMENT DETAIL PAGE
   ============================================ */
.apt-header {
  padding: 8rem var(--gutter) 3rem;
  text-align: center;
  background: var(--beige);
}
.apt-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 2rem;
}
.apt-header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--green);
  letter-spacing: 4px;
}
.apt-header__sub {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* ============================================
   WOHNUNGSBLATT (Typ-Karten auf Detailseiten)
   ============================================ */
.apt-sheets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 4vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.apt-sheets--single { grid-template-columns: 1fr; max-width: 700px; margin-left: auto; margin-right: auto; }

.apt-sheet {
  background: var(--white);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.75rem, 3vw, 2.5rem) 0;
  display: flex;
  flex-direction: column;
}

/* Fertige Wohnungsblatt-Bilder aus Canva (ein Bild pro Typ) */
.apt-sheet--image {
  padding: 0;
  background: none;
  box-shadow: none;
}
.apt-sheet--image img {
  width: 100%;
  height: auto;
  display: block;
}
.apt-sheet__eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.65;
  margin-bottom: 0.35rem;
}
.apt-sheet__units {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  letter-spacing: 0.5px;
  color: var(--green);
  text-transform: none;
  margin-bottom: 1.5rem;
  line-height: 1.35;
}

.apt-sheet__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--beige-dark);
  margin-bottom: 1.75rem;
}
.apt-sheet__stat {
  background: var(--beige);
  padding: 0.9rem 0.5rem;
  text-align: center;
}
.apt-sheet__stat-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.4rem;
}
.apt-sheet__stat-value {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  font-weight: 500;
  color: var(--green);
}

.apt-sheet__plan {
  margin-bottom: 1.25rem;
}
.apt-sheet__plan img { width: 100%; height: auto; }

.apt-sheet__position {
  max-width: 340px;
  margin: 0 auto 1.75rem;
}
.apt-sheet__position img { width: 100%; height: auto; }

.apt-sheet__price {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--green);
  padding: 1.5rem 1rem;
  gap: 0.5rem;
  margin-top: auto;
}
.apt-sheet__price-item { text-align: center; }
.apt-sheet__price-item .label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.7);
  margin-bottom: 0.5rem;
}
.apt-sheet__price-item .value {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--beige);
  line-height: 1.4;
}
.apt-sheet__price-item--main .value { font-weight: 600; font-size: 1rem; }

@media (max-width: 860px) {
  .apt-sheets { grid-template-columns: 1fr; max-width: 600px; margin-left: auto; margin-right: auto; }
  .apt-sheet__price { grid-template-columns: 1fr; gap: 1rem; }
}

/* ============================================
   CAROUSEL (Wohnungs-Detailseiten)
   ============================================ */
.carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.carousel__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--beige);
}
.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  /* Verhindert bei gebrochenen Zoomstufen/Pixel-Ratios eine hauchdünne
     Ritze am Bildrand, durch die die Nachbar-Slide durchschimmert. */
  transform: translateZ(0);
}
.carousel__slide {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--beige);
  backface-visibility: hidden;
  transform: translateZ(0);
}
.carousel__slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: var(--beige);
}
.carousel__slide.has-photo img { object-fit: cover; object-position: right center; }

/* Wohnungsblatt-Bilder: klickbar, öffnet das PDF-Datenblatt */
.carousel__slide.has-sheet a {
  position: relative;
  display: flex;
  width: 100%; height: 100%;
  min-width: 0; min-height: 0;
  overflow: hidden;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.carousel__slide.has-sheet a img {
  min-width: 0; min-height: 0;
}
.carousel__slide.has-sheet .apt-sheet-hint {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: background-color var(--transition), transform var(--transition);
}
.carousel__slide.has-sheet .apt-sheet-hint svg {
  width: 15px; height: 15px;
  stroke: var(--beige);
  flex-shrink: 0;
}
.carousel__slide.has-sheet a:hover .apt-sheet-hint {
  background: var(--green-dark);
  transform: scale(1.08);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.carousel__btn:hover { background: var(--white); transform: translateY(-50%) scale(1.05); }
.carousel__btn--prev { left: 1.25rem; }
.carousel__btn--next { right: 1.25rem; }
.carousel__btn svg { width: 22px; height: 22px; stroke: var(--green); }

.carousel__caption {
  margin-top: 1.5rem;
  text-align: center;
}
.carousel__caption-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  color: var(--green);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.carousel__caption-sub {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.7;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--beige-dark);
  border: none;
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
}
.carousel__dot.active {
  background: var(--green);
  width: 28px;
  border-radius: 4px;
}

/* ============================================
   FOOTER (Bottom site footer)
   ============================================ */
.footer {
  background: var(--green-dark);
  color: rgba(244, 241, 236, 0.7);
  padding: 2rem var(--gutter);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.footer a { color: var(--beige); }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.footer__legal a {
  color: rgba(244, 241, 236, 0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__legal a:hover { color: var(--beige); }

/* Legal pages (Impressum / Datenschutz) */
.legal-text {
  padding: 1.5rem 0 4rem;
}
.legal-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2.25rem 0 0.75rem;
  color: var(--black);
}
.legal-text h3:first-child { margin-top: 0; }
.legal-text p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--grey);
  margin-bottom: 1rem;
}
.legal-text a { color: var(--green); }

/* Legacy contact (apartment pages still use these) */
.contact { text-align: center; }
.contact__cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--green);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background var(--transition);
}
.contact__cta:hover { background: var(--green-dark); opacity: 1; }

/* ============================================
   UTILITIES
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
