.carousel {
  width: 500px;
  height: 400px;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  overflow: hidden;
  margin: 15px;
  box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.2);
}
.carouselParent {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: 200ms opacity ease-in-out;
  transition-delay: 200ms;
}
.carousel > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.slide > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Use "cover" instead of "contain" */
  object-position: center;
  max-width: 100%;
  max-height: 100%;
  box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.2);
}
.slide[data-active] {
  opacity: 1;
  z-index: 1;
  transition-delay: 0ms;
}
.carousel-button {
  position: absolute;
  z-index: 2;
  background: none;
  border: none;
  font-size: 1.9rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  border-radius: 50px;
  padding: 0 0.5rem;
  color: rgb(116, 116, 116);
}
.carousel-button:hover,
.carousel-button:focus {
  color: #ff914de7;
  background-color: rgba(0, 0, 0, 0.1);
}
.carousel-button:focus {
  outline: 1px solid black;
}
.carousel-button.prev {
  right: 1rem;
}
.carousel-button.next {
  left: 1rem;
}
