/* Carousel Widget */

@keyframes tonext {
  75% {
    left: 0;
  }
  95% {
    left: 100%;
  }
  98% {
    left: 100%;
  }
  99% {
    left: 0;
  }
}

@keyframes tostart {
  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;
  }
}

.widget ol, .widget li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget {
  position: relative;
  perspective: 100px;
  min-width: 200px;
  min-height: 140px;
  height: 100%;
  font-size: 1.4em;
  line-height: 1em;
  overflow: hidden;
  background-color: #EEE;
}

.widget__viewport {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 0;
  margin: 0;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.widget__viewport::-webkit-scrollbar {
  display: none;
}

.widget__hide .widget__viewport {
  opacity: 0;
}

.widget__hide .widget__viewport:hover {
  opacity: 1;
}

.widget__hide:hover .widget__textbg {
  opacity: 0;
}

.widget__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}


.widget__singleslide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}

.widget__bg{
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 8px;
  right: 8px;
  scroll-snap-align: center;
  background: #AAA;
  border-radius: 10px;
  overflow: hidden;
}


.widget__bg img{
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity:  1;
  translate: -50% -50%;
  top: 50%;
  left: 50%;
  filter: grayscale(100%) contrast(70%);
}

.widget__slide:hover .widget__bg img,
.widget__singleslide:hover .widget__bg img{
  mix-blend-mode: lighten;
}


.widget__singleslide .widget__bg img{
  opacity: 1;
}

.widget__image{
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  scroll-snap-align: center;
  text-align: center;
  overflow: hidden;
}

.widget__textbg{
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: black;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.widget__content{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
}

.widget__content a:hover{
  text-decoration: none !important;
}

.widget__legend{
  flex-grow: 1;
  opacity: 100%;
  color: black;
  font-size: 0.7em;
  padding: 5px;
  background-color: #EEE;
  text-align: center;
  /*background-position: center center;
  background-repeat: no-repeat;
  background-clip: text;
  background-size: contain;
  color: transparent;
  filter: brightness(0.5) invert(90%) grayscale(100%);
  */
}


.widget__text{
  font-family: "Leaf", serif;
  letter-spacing: 0.2rem;
  line-height: 28px;
  font-size: 24px;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  text-align: center;
  color: white;
  margin: 20%;
  opacity: 1;
}

.widget__singleslide .widget__text{
  color: white;
  margin: 2%;
}


.widget__title{
  width: 100%;
  text-transform: uppercase;
  
}

.widget__subtitle{
  font-style: italic;
}

.widget__color{
  opacity: 0;
  background-color: #EEE;
}

.widget:hover .widget__color{
  opacity: 0.2;
}

@media (hover: hover) {
  
  .widget__snapper {
    animation-name: tonext, snap;
    animation-timing-function: ease;
    animation-duration: 6s;
    animation-iteration-count: infinite;
  }

  
  .widget__slide:last-child .widget__snapper {
    animation-name: tostart, snap;
  }

}

@media (prefers-reduced-motion: reduce) {
  .widget__snapper {
    animation-name: none;
  }
}

.widget:hover .widget__snapper,
.widget:focus-within .widget__snapper {
  animation-name: none;
}

.widget__prev,
.widget__next {
  font-family: "Leaf", serif;
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 0%;
  outline: 0;
  font-size: 0;
  background-size: 30px;
  background-repeat: no-repeat;
  background-position: center center;

}


.widget__next{
  right: 0;
  width: 100px;
  cursor: e-resize;
}

.widget__prev{
  left: 0;
  width: 100px;
  cursor: w-resize;
}


.widget__next::after{
  position: absolute; 
  height: 30px;
  width: 30px;
  top: 50%;
  right: 20%;
  line-height: 30px;
  transform: translateY(-50%);
  color: white;
  content: "→";
  font-size: 30px;
  /*background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' fill='%23fff'/%3E%3C/svg%3E");*/
}

.widget__prev::after{
  position: absolute;
  height: 30px;
  width: 30px;
  top: 50%;
  left: 30%;
  line-height: 30px;
  transform: translateY(-50%);
  content: "←";
  color: white;
  font-size: 30px;
  /*background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' fill='%23fff'/%3E%3C/svg%3E");*/
}