body {
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
}

p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
}

.cr-section.wide-text,
.cr-section .narrative-col .narrative,
.cr-section.wide-text .narrative-col,
.cr-section.overlay-left .narrative-col .narrative,
.cr-section.overlay-center .narrative-col .narrative,
.cr-section.overlay-right .narrative-col .narrative {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
  background-color: #ffffffcc;
}
.cr-section.wide-text .narrative-col {
    max-width: 800px;
    margin: 0 auto;
}

.cr-section.wide-text .narrative-col .narrative {
    font-size: 1rem;
    background-color: #ffffffcc;
    color: #111111;
    padding: 1.5em 2em;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
}

.cr-section.overlay-right {
    background-color: #ffffff;
}

.cr-section.overlay-right .narrative-col .narrative {
    font-size: 1rem;
    background-color: #ffffff99;
    color: #111111;
    padding: 0.6em 0.8em;
    border-radius: 0;
    backdrop-filter: blur(5px);
}

.cr-section.overlay-center {
    background-color: #ffffff;
}

.cr-section.overlay-center .narrative-col .narrative {
    font-size: 1rem;
    background-color: #ffffff99;
    color: #111111;
    padding: 0.6em 0.8em;
    border-radius: 0;
    backdrop-filter: blur(5px);
}

.cr-section.overlay-left {
    background-color: #ffffff;
}

.cr-section.overlay-left .narrative-col .narrative {
    font-size: 1rem;
    background-color: #ffffff99;
    color: #111111;
    padding: 0.6em 0.8em;
    border-radius: 0;
    backdrop-filter: blur(5px);
}


.numbered-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    
    background-color: #247754;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    
    position: relative;
    transform: translate(-50%, -100%);
    pointer-events: auto;
    cursor: pointer;
}


/* Full-width sticky navbar */
.custom-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid #ccc;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Links */
.custom-navbar a {
  position: relative;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  color: #111;
  padding-bottom: 5px;
  transition: color 0.3s;
}

.custom-navbar a:hover {
  color: #b30000;
}

/* Underline for current section */
.custom-navbar a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: #b30000;
}


html {
    scroll-behavior: smooth;
}





.img-compare-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.img-compare-container img {
  width: 100%;
  height: auto;
  display: block;
}

.img-compare-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.img-compare-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-compare-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  cursor: ew-resize;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transform: translateX(-50%);
}

.img-compare-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cr-effizienz {
  background-color: #f9f9f9;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.cr-effizienz table {
  width: 100%;
  border-collapse: collapse;
}

.cr-effizienz th, .cr-effizienz td {
  border: 1px solid #ccc;
  padding: 0.6rem;
  text-align: center;
}

.cr-effizienz th {
  background-color: #f0f0f0;
}

.responsive-navbar {
  background-color: #ffffffcc;
  backdrop-filter: blur(6px);
  padding: 0.5em 1em;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-radius: 0 0 12px 12px;
}

/* Toggle (Burger) verstecken bei Desktop */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  font-size: 1.5em;
  cursor: pointer;
  font-weight: bold;
}

/* Link-Liste */
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
}

.nav-links a {
  text-decoration: none;
  color: #111;
  font-weight: 600;
}

/* --- Mobile Anpassung --- */
@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
    margin-bottom: 0.5em;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }

  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    display: flex;
  }
}

@media (min-width: 769px) {
  .responsive-navbar {
    padding: 1em 2em;
  }

  .nav-links {
    gap: 1.8em;
    flex-wrap: nowrap; /* verhindert Zeilenumbruch */
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 0.4em 0.3em;
  }
}


.kontakt-block {
  display: flex;
  flex-direction: column;
  gap: 2em;
  margin-bottom: 2em;
}

.kontakt-eintrag {
  display: flex;
  flex-direction: row;
  gap: 1.5em;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.kontakt-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  min-width: 200px;
}

.kontakt-logo {
  width: 160px;
  max-width: 40%;
  height: auto;
  margin-left: auto;
}

@media (max-width: 600px) {
  .kontakt-eintrag {
    flex-direction: column;
    align-items: flex-start;
  }

  .kontakt-logo {
    margin-left: 0;
    margin-top: 1em;
    width: 100%;
    max-width: 200px;
  }
}

.responsive-iframe {
  width: 100%;
  height: 500px;
  border: 1px solid #ccc;
  border-radius: 10px;
  margin: 2rem 0;
}

.cr-section {
  scroll-margin-top: 35vh;
  padding-top: 12vh;
  padding-bottom: 10vh;
}

@media (max-width: 768px) {

  /* Sticky-Logik für Mobile ausschalten und korrekt umbrechen */
  .cr-section .sticky {
    position: static !important;
    top: auto !important;
    transform: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
  }

  /* Container anpassen – weniger Padding, keine erzwungene Höhe */
  .cr-section {
    scroll-margin-top: 0 !important;
    padding-top: 2vh !important;
    padding-bottom: 2vh !important;
    min-height: unset !important;
    height: auto !important;
    margin-bottom: 0 !important;
    overflow-anchor: none;
  }

  /* Narrativtext: kleiner Abstand nach unten */
  .cr-section .narrative-col .narrative {
    margin-bottom: 1.5rem !important;
  }

  /* Abstand zwischen Sticky-Abschnitten auf Mobilgeräten */
  .only-mobile-gap {
    height: 8vh;
  }
}

#map {
  width: 100%;
  max-width: 100vw;
  height: 70vh;
  margin: 1em auto;
  background-color: #ffffff;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Leaflet UI-Elemente (Zoom, etc.) rechts platzieren */
.leaflet-top.leaflet-left {
  left: auto;
  right: 10px;
}

/* === Leaflet-Karte per <iframe> === */
.responsive-iframe {
  width: 100%;
  max-width: 100vw;
  height: 70vh;
  border: none;
  border-radius: 10px;
  margin: 1rem 0;
  box-sizing: border-box;
  display: block;
  overflow: hidden;
}

/* === Zusätzliche Absicherung für mobile Ansicht === */
@media (max-width: 768px) {
  #map,
  .responsive-iframe,
  .leaflet-container {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    overflow: hidden !important;
  }

  .leaflet-container {
    height: 100% !important;
  }
}

/* === Bildgrößenanpassung für Bilder, die auch als Sticky ganz zu sehen sein sollen: für mobile und Desktopansicht  === */

.img-fluid-sticky-fullheight {
  height: 100dvh;
}

@media (max-width: 768px) {
  .img-fluid-sticky-fullheight {
    width: 100dvh; 
    height: auto;
    max-height: 100dvh;
    object-fit: contain;
    object-position: center bottom /* Horizontal zentriert, vertikal unten */
  }
}
