.perfect_carousel {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 100vh;
  position: relative;
  margin: auto;
  /* height: 600px; <-- entfernen! */
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}


.perfect_carousel_track {
  display: flex;
  position: relative;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.perfect_carousel_item {
  position: absolute;
  width: 80%;
  max-width: 100%;
  transition: all 0.6s ease;
  opacity: 0;
  transform: scale(0.8);
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.perfect_carousel_item img {
  width: 100%;
  height: auto; /* Wichtig für responsive Höhe */
  display: block;
  object-fit: contain;
  border-radius: 4px;
  border:10px solid #ffffff; 
}

.perfect_carousel_item.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
}

.perfect_carousel_item.prev {
  transform: translateX(-40%) scale(0.85);
  opacity: 1;
  z-index: 2; /* links etwas höher, also vor dem rechten */
  pointer-events: auto;
}

.perfect_carousel_item.next {
  transform: translateX(40%) scale(0.85);
  opacity: 1;
  z-index: 1; /* hinter dem zentralen Bild */
  pointer-events: auto;
}

.perfect_carousel_item {
  position: absolute;
  transition: all 0.6s ease;
  opacity: 0;
  transform: scale(0.8);
  z-index: 0;
  pointer-events: none;
  text-align: center;
  width: 90vw;
  max-width: 100%;
}

/* Für größere Bildschirme */
@media (min-width: 768px) {
  .perfect_carousel_item {
    width: 600px;
  }
}

@media (min-width: 1200px) {
  .perfect_carousel_item {
    width: 980px;
  }
}

/* Neue Klasse für Text */
.perfect_carousel_caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff !important;
  font-size: 1.5rem;
  padding: 1rem 2rem;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}

.perfect_carousel_caption *{
	color:#ffffff !important;
}

.perfect_carousel_item,
.perfect_carousel_inner,
.perfect_carousel_item img {
  max-width: 100vw;
  box-sizing: border-box;
}


