/* Hero / Über Made – fluid über alle Viewports */
#myCarousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100svh;
  overflow: hidden;
  background: #1c2e28;
}
#myCarousel .carousel-inner,
#myCarousel .carousel-item {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100svh;
  overflow: hidden;
}

#myCarousel .carousel-item video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  min-width: 0;
  min-height: 0;
}

#myCarousel .overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(16, 40, 34, 0.55) 0%, rgba(16, 40, 34, 0.45) 45%, rgba(16, 40, 34, 0.72) 100%);
}

/* Caption im Dokumentfluss – skaliert mit Inhalt, nicht abgeschnitten */
#myCarousel .carousel-caption {
  position: relative;
  z-index: 2;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: min(1100px, 92vw);
  max-width: min(1100px, 92vw);
  margin: 0 auto;
  padding:
    clamp(4.5rem, 9vh, 6.5rem)
    clamp(0.85rem, 2.5vw, 1.5rem)
    clamp(2rem, 5vh, 3.25rem);
  color: #fff;
  text-align: center;
}

#myCarousel .carousel-logo {
  width: clamp(96px, 16vw, 148px);
  max-width: 40vw;
  height: auto;
  margin: 0 auto clamp(0.75rem, 1.5vh, 1.1rem);
  display: block;
}

#myCarousel .carousel-caption h1,
#myCarousel .carousel-caption h1.display-4 {
  font-size: clamp(1.55rem, 1.05rem + 2.1vw, 2.65rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 auto clamp(0.65rem, 1.4vh, 1rem);
  max-width: 22ch;
}

#myCarousel .carousel-caption > p.lead {
  font-size: clamp(1rem, 0.92rem + 0.45vw, 1.22rem);
  line-height: 1.45;
  margin: 0 auto clamp(1rem, 2.2vh, 1.35rem);
  max-width: 38rem;
  opacity: 0.95;
}

#myCarousel .carousel-caption > .btn {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
  padding: clamp(0.55rem, 0.45rem + 0.4vw, 0.75rem) clamp(1rem, 0.8rem + 1vw, 1.4rem);
  margin-bottom: clamp(1.25rem, 3vh, 2rem) !important;
}

#myCarousel .carousel-caption,
#myCarousel .carousel-caption h1,
#myCarousel .carousel-caption h2,
#myCarousel .carousel-caption h3,
#myCarousel .carousel-caption h4,
#myCarousel .carousel-caption h5,
#myCarousel .carousel-caption h6,
#myCarousel .carousel-caption p,
#myCarousel .carousel-caption a,
#myCarousel .carousel-caption span {
  color: #fff !important;
}

#myCarousel .carousel-caption .container-fluid {
  padding-top: clamp(0.5rem, 1.5vh, 1.25rem) !important;
  padding-bottom: 0 !important;
  max-width: 960px;
  margin-inline: auto;
}

#myCarousel .carousel-caption .container-fluid .lead {
  font-size: clamp(0.98rem, 0.92rem + 0.35vw, 1.15rem);
  line-height: 1.55;
}

#myCarousel .carousel-caption img:not(.carousel-logo) {
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  max-height: clamp(220px, 38vh, 380px);
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto;
}

#myCarousel .carousel-control-prev-icon,
#myCarousel .carousel-control-next-icon {
  background-size: 20px 20px;
}
#myCarousel .carousel-control-prev,
#myCarousel .carousel-control-next {
  width: 5%;
  z-index: 3;
}

/* Tablets / mittlere Breiten */
@media (max-width: 991.98px) {
  #myCarousel,
  #myCarousel .carousel-inner,
  #myCarousel .carousel-item {
    min-height: 0;
  }
  #myCarousel .carousel-caption {
    width: min(720px, 94vw);
    max-width: min(720px, 94vw);
    padding-top: clamp(3.75rem, 8vh, 5rem);
  }
  #myCarousel .carousel-caption h1,
  #myCarousel .carousel-caption h1.display-4 {
    max-width: none;
  }
  #myCarousel .carousel-caption .col-lg-7 {
    text-align: center !important;
  }
}

/* Smartphones */
@media (max-width: 575.98px) {
  #myCarousel .carousel-caption {
    width: 94vw;
    max-width: 94vw;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  #myCarousel .carousel-caption h1,
  #myCarousel .carousel-caption h1.display-4 {
    font-size: clamp(1.4rem, 5.8vw, 1.75rem);
  }
  #myCarousel .carousel-caption img:not(.carousel-logo) {
    max-height: clamp(200px, 42vw, 280px);
  }
}

@media (min-width: 1400px) {
  #myCarousel .carousel-caption {
    width: min(1180px, 88vw);
    max-width: min(1180px, 88vw);
  }
  #myCarousel .carousel-caption h1,
  #myCarousel .carousel-caption h1.display-4 {
    max-width: 24ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  #myCarousel .carousel-item video {
    display: none;
  }
}
