/* Äußerer Rahmen des Carousels */
.carousel-wrapper {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  max-width: 1200px;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 100px auto;
}

/* Sichtbarer Bereich (Maskierung) */
.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

/* Track mit allen Slides */
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

/* Einzelnes Slide */
.carousel-slide {
  flex: 0 0 25%;            /* 4 Bilder pro View (wird per JS auch so gerechnet) */
  padding: 0 10px;          /* GLEICHER Innenabstand links/rechts -> gleicher Abstand zwischen Bildern */
  box-sizing: border-box;
  cursor: pointer;
}

/* Bilder in den Slides */
.carousel-slide img {
  width: 100%;              /* Bild füllt immer die gesamte Slide-Breite */
  height: 200px;            /* einheitliche Höhe */
  display: block;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

/* Hover-Effekt: Bild um 10 % vergrößern */
.carousel-slide:hover img {
  transform: scale(1.1);
}

/* Pfeil-Buttons am Rand des Containers, mittig vertikal */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.97);
}

/* Linker / rechter Button */
.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;            /* per JS auf flex setzen */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bild im Modal */
.modal-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Modal-Navigation (Pfeile im Modal) */
.modal-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-btn.prev {
  left: -50px;
}

.modal-btn.next {
  right: -50px;
}

/* Schließen-Button im Modal */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Anpassungen */
@media (max-width: 900px) {
  .modal-btn.prev {
    left: 10px;
  }

  .modal-btn.next {
    right: 10px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 700px) {
  .carousel-slide {
    flex: 0 0 50%;          /* zwei Bilder pro View */
  }
}

@media (max-width: 450px) {
  .carousel-slide {
    flex: 0 0 100%;         /* ein Bild pro View */
  }
}
