/* Courtesy of: https://css-tricks.com/css-only-carousel/ */

/* Animation Sets */

@keyframes to_next {
  75% {
    left: 0;
  }
  95% {
    left: 100%;
  }
  98% {
    left: 100%;
  }
  99% {
    left: 0;
  }
}

@keyframes to_start {
  75% {
    left: 0;
  }
  95% {
    left: -300%;
  }
  98% {
    left: -300%;
  }
  99% {
    left: 0;
  }
}

@keyframes snap {
  96% {
    scroll-snap-align: center;
  }
  97% {
    scroll-snap-align: none;
  }
  99% {
    scroll-snap-align: none;
  }
  100% {
    scroll-snap-align: center;
  }
}

/* Hide scrollbar */


* {
  scrollbar-color: transparent transparent; /* thumb and track color */
  scrollbar-width: 0px;
}

*::-webkit-scrollbar {
  width: 0;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border: none;
}

* {
  -ms-overflow-style: none;
}

ol, li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Prepare carousel view */

.carousel {
  position: relative;
  padding-top: 75%;
  filter: drop-shadow(1rem 1rem 1rem #0003);
  perspective: 100px;
}

.carousel__viewport {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  overflow-x: scroll;
  counter-reset: item;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  counter-increment: item;
  
  border-radius: 1rem;
  text-decoration: none; /* no underline */
  color: inherit;        /* no blue links */
  cursor: pointer;
  transition: box-shadow 0.2s ease, filter 0.3s ease-out;
}

.carousel__slide:before {
  content: counter(item);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%,-40%,70px);
  color: #fff;
  font-size: 2em;
}

.carousel__snapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
}

@media (hover: hover) {
  .carousel__snapper {
    animation-name: to_next, snap;
    animation-timing-function: ease;
    animation-iteration-count: infinite;
  }

  .carousel__slide:last-child .carousel__snapper {
    animation-name: to_start, snap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__snapper {
    animation-name: none;
  }
}

.carousel:hover .carousel__snapper,
.carousel:focus-within .carousel__snapper {
  animation-name: none;
}

/* Navigation Layer */

.carousel__navigation {
  position: absolute;
  right: 0;
  bottom: -1rem;
  left: 0;
  text-align: center;
  z-index: 9999;
}

.carousel__navigation-list,
.carousel__navigation-item {
  display: inline-block;
  padding: 0 0.25rem;
}

.carousel__navigation-button {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-color: rgb(51, 51, 51);
  background-clip: content-box;
  border: 0.25rem solid rgb(211, 211, 211);
  border-radius: 50%;
  font-size: 0;
  transition: transform 0.1s;
  opacity: 0.8;
  pointer-events: all;
}

.carousel__navigation-button.active {
  background: rgb(25, 25, 25);
}

.carousel__navigation-button:hover {
    transform: scale(1.1);
    background: rgb(25, 25, 25);
}

/* Previous & Next Buttons Layer */

.carousel_prev,
.carousel_next {
  position: absolute;
  top: 0;
  height: 98.5%;
  width: 4rem;
  margin: 0;
  padding: 0;
  font-size: 0;
  outline: 0;
  border: 0;
  pointer-events: all;
}

.carousel_prev,
.carousel_next {
  content: '';
  z-index: 1;
  background-size: 1.5rem 1.5rem;
  color: #fff;
  text-align: center;
}

.carousel_prev:hover,
.carousel_next:hover {
    cursor:pointer;
}

.carousel_prev:hover .arrow,
.carousel_next:hover .arrow{
    transform: scale(1.25);
}


.carousel_prev {
  left: -2rem;
  background: linear-gradient(
        to left,
        rgba(31, 31, 31, 0),  /* transparent */
        rgba(31, 31, 31, 1) 50%, /* solid until 85% */
        rgba(31, 31, 31, 1) /* solid until 85% */
    );
}

.carousel_next {
  right: -2rem;
  background: linear-gradient(
        to right,
        rgba(31, 31, 31, 0),  /* transparent */
        rgba(31, 31, 31, 1) 50%, /* solid until 85% */
        rgba(31, 31, 31, 1) /* solid until 85% */
    );
    
}

.carousel .arrow {
    height: 50px;
    stroke: #d3d3d3; /* Color of the arrow */
    stroke-width: 2; /* Thickness of the line */
    fill: none; /* Important: prevents the shape from being filled */
    stroke-linejoin: round; /* Rounds the inner corner */
    stroke-linecap: round;  /* Rounds the ends of the lines */
    pointer-events: none;
}