.image-slider-container {
  position: relative;
  width: 80vw;
  max-width: 1000px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-slide {
  position: absolute;
  width: 230px;
  height: 230px;
  aspect-ratio: 1/1;
  border-radius: 0px;
  overflow: hidden;
  transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out, z-index 0s;
  z-index: 0;
  opacity: 0; /* Nascondo le immagini non attive */
  transform: scale(0.8);
}

.image-slide.active {
  transform: scale(1);
  opacity: 1;
  z-index: 10;
}

.image-slide.previous {
  transform: translateX(-250px) scale(0.8);
  opacity: 0.5;
  z-index: 5;
}

.image-slide.next {
  transform: translateX(250px) scale(0.8);
  opacity: 0.5;
  z-index: 5;
}

.image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.slider-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
  z-index: 20;
}

.slider-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.slider-button.previous {
  left: 10px;
}

.slider-button.next {
  right: 10px;
}

/* Animazioni per entrata e uscita */
.image-slide.enter-from-right {
  animation: slideInFromRight 0.2s ease-in-out forwards;
}

.image-slide.enter-from-left {
  animation: slideInFromLeft 0.6s ease-in-out forwards;
}

.image-slide.exit-to-right {
  animation: slideOutToRight 0.6s ease-in-out forwards;
}

.image-slide.exit-to-left {
  animation: slideOutToLeft 0.6s ease-in-out forwards;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(250px) scale(0.8);
    opacity: 0.5;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-250px) scale(0.8);
    opacity: 0.5;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(250px) scale(0.8);
    opacity: 0.5;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(-250px) scale(0.8);
    opacity: 0.5;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .image-slider-container {
    width: 90vw;
    height: 300px;
  }

  .image-slide {
    width: 150px;
    height: 150px;
  }

  .image-slide.previous {
    transform: translateX(-180px) scale(0.8);
  }

  .image-slide.next {
    transform: translateX(180px) scale(0.8);
  }
}
  @keyframes slideInFromRight {
    from {
      transform: translateX(180px) scale(0.8);
      opacity: 0.5;
    }
    to {
      transform: translateX(0) scale(1);
      opacity: 1;
    }
  }

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-180px) scale(0.8);
      opacity: 0.5;
    }
    to {
      transform: translateX(0) scale(1);
      opacity: 1;
    }
  }

  @keyframes slideOutToRight {
    from {
      transform: translateX(0) scale(1);
      opacity: 1;
    }
    to {
      transform: translateX(180px) scale(0.8);
      opacity: 0.5;
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(1);
      opacity: 1;
    }
    to {
      transform: translateX(-180px) scale(0.8);
      opacity: 0.5;
    }
  }
