/* BERZAN Bau V10.3 — targeted corrections for references page.
   The previous ref hero inherited a one-column grid and a 650px minimum-height
   from older style sheets. The map list inherited a 490px scroll viewport.
   Scoped overrides remove those conflicting constraints, preserving all data. */

/* 1. Hero: a single, intentional horizontal project panel on desktop. */
html body.v18-references.screen-v8 .ref-hero-v44 {
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #14252d !important;
}
html body.v18-references.screen-v8 .ref-hero-layout-v44 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
  align-items: stretch !important;
  gap: clamp(26px, 3vw, 54px) !important;
  min-height: 0 !important;
}
html body.v18-references.screen-v8 .ref-hero-copy-v44 {
  align-self: center !important;
  min-width: 0;
  padding-block: clamp(55px, 6.5vw, 98px) !important;
}
html body.v18-references.screen-v8 .ref-hero-project-v44 {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(205px, .85fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-self: stretch !important;
  width: 100%;
  height: clamp(530px, 41.5vw, 680px) !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden;
  background: #223a45 !important;
}
html body.v18-references.screen-v8 .ref-hero-project-v44 figure {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  overflow: hidden;
}
html body.v18-references.screen-v8 .ref-hero-project-v44 figure img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  animation: none !important;
  transform: none !important;
}
html body.v18-references.screen-v8 .ref-hero-project-meta-v44 {
  position: relative !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center !important;
  gap: 0;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  padding: clamp(20px, 2vw, 32px) !important;
  background: #203641 !important;
  border-left: 1px solid rgba(255,255,255,.1);
}
html body.v18-references.screen-v8 .ref-hero-project-meta-v44 h2 {
  margin: 15px 0 12px !important;
  font-size: clamp(28px, 2.65vw, 40px) !important;
  line-height: 1.05 !important;
}
html body.v18-references.screen-v8 .ref-hero-project-meta-v44 p {margin: 0 0 20px !important;}
html body.v18-references.screen-v8 .ref-hero-project-meta-v44 a {
  display: inline-block;
  margin-top: 20px !important;
  align-self: flex-start;
}

/* 2. Map: remove the clipped inner scroller. Use natural document scrolling.
   Keep the selected project preview visibly below the map instead of overlaying pins. */
html body.v18-references .v73-map-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr) !important;
  align-items: start !important;
  gap: clamp(18px, 2vw, 30px) !important;
}
html body.v18-references .v73-map-stage {
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
}
/* Map markers must never depend on an intersection animation to become visible. */
html body.v18-references .v73-svg .pin {opacity: 1 !important;}
html body.v18-references .v73-svg .route {stroke-dashoffset: 0 !important;}
html body.v18-references .v73-map-stage > .v73-svg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  flex: 0 0 auto;
}
html body.v18-references .v73-map-card {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  grid-template-columns: minmax(92px, 124px) minmax(0, 1fr) !important;
  width: 100% !important;
  min-height: 106px !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: none !important;
  background: #14252d !important;
}
html body.v18-references .v73-map-card img {
  width: 100% !important;
  height: 100% !important;
  min-height: 106px !important;
  object-fit: cover;
}
html body.v18-references .v73-map-card .c-body {min-width: 0;}
html body.v18-references .v73-map-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 8px !important;
  scrollbar-width: auto !important;
}
html body.v18-references .v73-map-list li {display: block; min-width: 0;}
html body.v18-references .v73-map-list button {
  width: 100%;
  height: auto !important;
  min-height: 58px !important;
  padding: 10px 13px !important;
  gap: 10px !important;
  grid-template-columns: 26px minmax(0, 1fr) auto !important;
  transform: none !important;
}
html body.v18-references .v73-map-list .t {min-width: 0;}
html body.v18-references .v73-map-list small {font-size: 11.5px; line-height: 1.3;}
html body.v18-references .v73-map-list .km {font-size: 12px;}

/* Match the same layout on narrow laptops and tablets without forcing columns. */
@media (max-width: 1100px) {
  html body.v18-references.screen-v8 .ref-hero-layout-v44 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  html body.v18-references.screen-v8 .ref-hero-copy-v44 {padding-block: 58px 38px !important;}
  html body.v18-references.screen-v8 .ref-hero-project-v44 {
    height: 440px !important;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, .85fr) !important;
  }
  html body.v18-references .v73-map-grid {grid-template-columns: minmax(0, 1fr) !important;}
  html body.v18-references .v73-map-stage {max-width: 900px;}
  html body.v18-references .v73-map-list {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 10px !important;
  }
}
@media (max-width: 650px) {
  html body.v18-references.screen-v8 .ref-hero-copy-v44 {padding-block: 42px 32px !important;}
  html body.v18-references.screen-v8 .ref-hero-project-v44 {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }
  html body.v18-references.screen-v8 .ref-hero-project-v44 figure {
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
  }
  html body.v18-references.screen-v8 .ref-hero-project-v44 figure img {position: absolute; inset: 0;}
  html body.v18-references.screen-v8 .ref-hero-project-meta-v44 {
    height: auto !important;
    padding: 20px !important;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  html body.v18-references.screen-v8 .ref-hero-project-meta-v44 h2 {font-size: 28px !important; margin: 8px 0 !important;}
  html body.v18-references.screen-v8 .ref-hero-project-meta-v44 dl {display: grid !important;}
  html body.v18-references .v73-map-list {grid-template-columns: minmax(0, 1fr) !important;}
  html body.v18-references .v73-map-list button {min-height: 66px !important;}
  html body.v18-references .v73-map-card {grid-template-columns: 96px minmax(0,1fr) !important;}
}
@media (prefers-reduced-motion: reduce) {
  html body.v18-references .v73-map-card {transition: none !important;}
}
