


.carousel {
  position: relative;
  width: 100%;
  height: auto;
}

.carousel-container {
  display: block;
  height: auto;
  position: relative;
  z-index: 0;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
}
.carousel-item.prev {
  transform: translateX(-100%); /* Move the previous item out of view to the left */
}

.carousel-item.next {
  transform: translateX(100%); /* Move the next item out of view to the right */
}

.carousel-item.active {
  display: flex; /* Only the active slide is shown */
    z-index: 2;
}

.carousel-item.prev,
.carousel-item.next {
  z-index: 1; /* Put prev and next items below active item */
}

/* Ensuring the image fills the carousel item properly */
.carousel-item img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    object-position: center center;
    /* margin: 0; */

}

button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 1);
  color: black;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10; /* Make sure it’s above carousel items */
  padding: 0 8px 8px 8px;
}

button:hover {
  background-color: rgba(0, 0, 0, 0.8);
        color: white;

    
}

.prev {
    left: 0;
    display: -webkit-inline-box;
    margin:0px;
    padding: 0 8px 8px 8px;

}

.next {
    right: 0;
    display: -webkit-inline-box;
    /* margin: 0px; */
    padding: 0 8px 8px 8px;

}

/* For touch devices */
@media (max-width: 768px) {
  .prev, .next {
    display: none;
  }
}
