.carouselTitle {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.carouselContainer {
  overflow: auto;
  display: flex;
  scroll-snap-type: x mandatory;
}

.carouselElement {
  height: 540px;
  width: 300px;
  margin-right: 1.5rem;
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.carouselElement:last-child {
  margin-right: 0;
}

.carouselImgContainer {
  position: relative;
  height: 88%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.carouselImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carouselSubtitle {
  height: 12%;
  width: 100%;
  display: flex;
  align-items: center;
}

.hoverOverlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: hsla(0, 0%, 95%, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.carouselElement:hover .hoverOverlay {
  opacity: 1;
}

.carouselImgContainer,
.carouselSubtitle {
  z-index: 0;
}

@media (min-width: 913px) and (max-width: 1025px) {
  .carouselElement {
    height: 540px;
    width: 340px;
  }
}

@media (max-width: 770px) {
  .carouselElement {
    height: 500px;
    width: 280px;
  }
}

@media (max-width: 395px) {
  .carouselElement {
    height: 500px;
    width: 265px;
  }
}
