/* =========================================================================
   Sanierungs-Unterseite – page-spezifische Ergänzungen.
   Baut auf leistungen.css (.lp-* Design-System) auf und wird DANACH geladen.
   ========================================================================= */

/* ---- Hero-Bild für die Sanierungs-Seite (überschreibt einfamilienhaus.jpg) ---- */
.lp-hero__img--sanierung {
  background-image: url('./assets/sanierung-realbild.jpeg');
  /* Hochformat-Bild: Position nach oben verschieben, damit das Haus
     (oben im Bild) sichtbar ist und die Straße (unten) herausgecroppt wird */
  background-position: center center;
}

/* Überblick-Bild: Straße aus Bild bereits weggekroppt – zentrierte Darstellung */
.san-intro__figure img {
  object-position: center center;
}

/* Hinweis: Die gemeinsamen Sektionen „Überblick" (.san-intro) und
   „Was wir für Sie übernehmen" (.ld-features) liegen in leistung-detail-lp.css. */

/* =========================================================================
   VORHER / NACHHER – Galerie mit interaktivem Slider
   Slider-Mechanik angelehnt an .final-cta__slider (index/css/styles.css),
   hier eigenständig unter .lp und mit --lp-* Tokens.
   ========================================================================= */
.san-gallery { padding: 76px 0 88px; background: var(--lp-surface); }

.san-gallery__head { max-width: 620px; margin: 0 0 36px; }
.san-gallery__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lp-navy-2);
  margin: 0 0 14px;
}
.san-gallery__label::before { content: ""; width: 24px; height: 1px; background: rgba(24, 48, 84, 0.4); }
.san-gallery__title {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--lp-navy);
  margin: 0 0 12px;
}
.san-gallery__sub { font-size: 15.5px; line-height: 1.65; color: var(--lp-muted); margin: 0; }

/* ---- Viewer (zentriertes Hochkant-Frame) ---- */
.san-gallery__viewer {
  max-width: 430px;
  margin: 0 auto;
}

/* ---- Slider ---- */
.san-ba {
  position: relative;
  border-radius: var(--lp-radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(0, 8, 30, 0.5);
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #eef1f5;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  --pos: 50%;
}
.san-ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.san-ba__img--before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.san-ba__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  transform: translateX(-50%);
  z-index: 2;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.san-ba__handle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(24, 48, 84, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.san-ba__label {
  position: absolute;
  top: 18px;
  z-index: 3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  pointer-events: none;
}
.san-ba__label--left {
  left: 18px;
  background: rgba(245, 247, 250, 0.94);
  color: var(--lp-navy-2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.san-ba__label--right { right: 18px; background: var(--lp-navy-2); color: #fff; }

/* ---- Caption ---- */
.san-gallery__caption {
  font-size: 14px;
  font-weight: 600;
  color: var(--lp-navy);
  margin: 18px 0 0;
  text-align: center;
}

/* ---- Thumbnails / Projektauswahl ---- */
.san-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 28px auto 0;
}
.san-thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 40px -30px rgba(0, 8, 30, 0.4);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s ease, transform .18s ease, box-shadow .25s ease;
}
.san-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.san-thumb__name {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-navy);
  text-align: left;
}
.san-thumb:hover { transform: translateY(-2px); border-color: #b4b9c7; }
.san-thumb.is-active { border-color: var(--lp-navy-2); box-shadow: 0 18px 44px -28px rgba(0, 8, 30, 0.55); }
.san-thumb:focus-visible { outline: 2px solid var(--lp-navy-2); outline-offset: 2px; }

@media (max-width: 640px) {
  .san-gallery__thumbs { grid-template-columns: 1fr 1fr; }
}

/* ---- Desktop: Auswahl-Rail links (klein), großes Bild rechts ---- */
@media (min-width: 900px) {
  .san-gallery__stage {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
  }
  .san-gallery__thumbs {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: none;
    margin: 0;
  }
  .san-thumb__name {
    padding: 7px 10px;
    font-size: 12px;
    text-align: center;
  }
  .san-gallery__viewer {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .san-ba {
    width: auto;
    height: clamp(540px, 82vh, 840px);
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Interaktiver Preview-Slider im Überblick-Bereich
   Nutzt dieselbe .san-ba-Klasse wie der Haupt-Slider.
   .san-ba--preview überschreibt nur die Desktop-Höhe.
   ═══════════════════════════════════════════════════════════════ */
.san-intro__preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Desktop: Haupt-Slider bekommt feste Höhe — Preview behält aspect-ratio */
.san-ba--preview {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4;
}

.san-intro__more-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lp-navy-2);
  text-decoration: none;
  padding: 11px 22px;
  border: 1.5px solid rgba(24, 48, 84, 0.22);
  border-radius: 999px;
  background: rgba(24, 48, 84, 0.04);
  transition: gap 0.2s ease, background 0.2s, border-color 0.2s;
}
.san-intro__more-link:hover {
  gap: 14px;
  background: rgba(24, 48, 84, 0.08);
  border-color: rgba(24, 48, 84, 0.35);
}
.san-intro__more-link svg { flex-shrink: 0; }
