@import url("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css");
.block-slider {
  position: relative;
  padding-bottom: 2em;
  padding-top: 2em;
  --swiper-pagination-color: var(--fg);
  --swiper-pagination-bullet-inactive-color: var(--fg);
  --swiper-navigation-size: 1em;
  --swiper-navigation-color: var(--fg);
  --swiper-navigation-color-hover: var(--fg);
}
.block-slider__grid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 3/2;
  z-index: 9;
  top: 2em;
  pointer-events: none;
  border: 1px solid var(--fg-headline);
}
.swiper-wrapper {
  padding-bottom: 2em;
}
.swiper-slide {
  width: 100% !important;
}
.swiper-slide img {
  -o-object-fit: cover;
     object-fit: cover;
  width: 100%;
  height: 100%;
  aspect-ratio: 3/2;
}
.swiper-button-prev {
  left: 0;
}
.swiper-button-next {
  right: 0;
}
.swiper-button-prev,
.swiper-button-next {
  top: auto;
  bottom: 0.7em;
  display: none;
}
.swiper-pagination-bullet {
  position: relative;
  overflow: hidden;
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}
.high-contrast .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
}
.swiper-pagination-bullet .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--fg-headline);
  transform: scaleX(0);
  transform-origin: left;
  visibility: hidden;
  animation: none;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active {
  width: 40px;
  transition: width 0.25s ease-in;
  border-radius: 8px;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active .progress-bar {
  visibility: visible;
  animation: progress-bar-fill 3.8s linear;
}
@keyframes progress-bar-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.swiper-zoom-container {
  text-align: inherit;
}
/* ------------------------------------------------------------------
   Fullscreen-modifier: lohko n\u00e4ytet\u00e4\u00e4n koko ruudun kokoisena
   (block-hero-sliderin tapaan, mutta karsitusti).
   ------------------------------------------------------------------ */
.block-slider.is-fullscreen {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  height: 100vh;
  min-height: 320px;
  padding: 0;
  background: #000;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .block-slider.is-fullscreen {
    width: calc(100vw - var(--scrollbar-width, 0px));
    max-width: calc(100vw - var(--scrollbar-width, 0px));
  }
}
@media (max-width: 768px) {
  .block-slider.is-fullscreen {
    max-height: 580px;
  }
}
.block-slider.is-fullscreen .swiper,
.block-slider.is-fullscreen .swiper-wrapper {
  height: 100%;
  padding-bottom: 0;
}
.block-slider.is-fullscreen .swiper-slide {
  width: 100% !important;
  height: 100% !important;
}
.block-slider.is-fullscreen .swiper-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.block-slider.is-fullscreen .block-slider__overlay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 1;
  pointer-events: none;
}
.block-slider.is-fullscreen .block-slider__title {
  font-size: clamp(5rem, 8vw, 25rem) !important;
  line-height: 0.9 !important;
  position: absolute;
  left: var(--padding, 1.5rem);
  right: var(--padding, 1.5rem);
  bottom: 4rem;
  z-index: 3;
  color: #fff;
  margin: 0;
  padding: 0;
  line-height: 1.1;
  max-width: 70%;
  pointer-events: none;
}
@media (max-width: 768px) {
  .block-slider.is-fullscreen .block-slider__title {
    max-width: 100%;
    bottom: 3rem;
  }
}
.block-slider.is-fullscreen .swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0 var(--padding, 1.5rem);
  box-sizing: border-box;
}
.block-slider.is-fullscreen .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}
.high-contrast .block-slider.is-fullscreen .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
}
.block-slider.is-fullscreen .swiper-pagination-bullet .progress-bar {
  background-color: #fff;
}
.block-slider.is-fullscreen .swiper-pagination-bullet.swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 0.5);
}
/*
.wp-block-slide {
    background: black;
    position: relative;
    display: block;
    width: 100%;
    padding-top: (2/3 * 100%);
    overflow: hidden;
    > figure {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: block;
        > img {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            aspect-ratio: (3/2);
            object-fit: contain;
            object-position: center center;
        }
    }
}
*/
