/* CAROUSEL */
:root {
  --carousel-gap: 0px;
  /*  --carousel-gap: 7px; */
}

.carousel {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  transition: opacity 0.3s ease;
  border-radius: 0 0 5px 5px;
}

/* DESKTOP MODE */
.carousel.mode-desktop {
  cursor: auto;
}

.carousel.mode-desktop.cursor-left {
  cursor: w-resize;
}

.carousel.mode-desktop.cursor-right {
  cursor: e-resize;
}

.carousel.mode-desktop .carousel-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  gap: var(--carousel-gap);
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  transition: transform 0.4s ease;
  padding-left: 50vw;
}

.carousel.mode-desktop .slide {
  flex-shrink: 0;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel.mode-desktop .slide img,
.carousel.mode-desktop .slide video {
  display: block;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  width: auto;
  object-fit: contain;
}

/* MOBILE PORTRAIT MODE */
.carousel.mode-mobile-portrait {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  cursor: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
}

.carousel.mode-mobile-portrait .carousel-track {
  position: relative;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
}

.carousel.mode-mobile-portrait .slide {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.carousel.mode-mobile-portrait .slide img,
.carousel.mode-mobile-portrait .slide video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  min-width: calc(100% + 2px);
  min-height: calc(100% + 2px);
  margin-left: -1px;
  margin-top: -1px;
}

/* MOBILE LANDSCAPE MODE */
.carousel.mode-mobile-landscape {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  cursor: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
}

.carousel.mode-mobile-landscape .carousel-track {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: var(--carousel-gap);
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  width: auto;
}

.carousel.mode-mobile-landscape .slide {
  flex-shrink: 0;
  width: auto;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.carousel.mode-mobile-landscape .slide img,
.carousel.mode-mobile-landscape .slide video {
  display: block;
  width: auto;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  object-fit: contain;
}