/* === BASIC CAROUSEL STRUCTURE === */
.carousel {
  position: relative;
}
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out;
}
.carousel-item.active {
  display: block;
}

/* === Einheitliche, responsive BildhÃ¶he === */
.carousel-img {
  width: 100%;
  height: 500px;       /* Default Desktop */
  object-fit: cover;
  display: block;
}

/* Tablet */
@media (max-width: 1024px) {
  .carousel-img {
    height: 400px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .carousel-img {
    height: 300px;
  }
}

/* === Controls === */
.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 0.9;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
  filter: invert(1);
}
.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Basis-†bergang fŸr Fade-Carousels */
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  transform: none; /* verhindert Verschieben */
  z-index: 0;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  z-index: 1;
}

/* Damit beide Bilder gleichzeitig sichtbar sind */
.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active.carousel-item-start,
.carousel-fade .carousel-item.active.carousel-item-end {
  opacity: 1;
  z-index: 2;
}

/* Optional: Bild-†bergŠnge harmonischer gestalten */
.carousel-item img {
  transition: transform 1.2s ease, opacity 1s ease-in-out;
}
