@charset "UTF-8";
/* CSS Document */
/* =========================================================
   HERO SLIDER
   Gjenbrukbar i Artikkel 1 og Artikkel 2
========================================================= */

.heroSlider {
  width: 100%;
  margin: 28px 0 36px;
}

.heroSlider__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.heroSlider__track {
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}

.heroSlider__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
}


/* BILDER */

.heroSlider__frame {
  width: 100%;
  padding: 6px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(10, 25, 45, .09);
  box-sizing: border-box;
}

.heroSlider__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}


/* BILDETEKST */

.heroSlider__slide figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}


/* PILER */

.heroSlider__button {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  transform: translateY(-50%);

  border: 1px solid rgba(0, 43, 95, .14);
  border-radius: 50%;

  background: rgba(255, 255, 255, .94);
  color: var(--navy);

  box-shadow: 0 3px 10px rgba(10, 25, 45, .12);

  font: inherit;
  font-size: 1.7rem;
  line-height: 1;

  cursor: pointer;
  z-index: 2;
}

.heroSlider__button:hover {
  background: var(--navy);
  color: #fff;
}

.heroSlider__button--prev {
  left: 14px;
}

.heroSlider__button--next {
  right: 14px;
}


/* NAVIGASJON UNDER BILDET */

.heroSlider__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 12px;
}

.heroSlider__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.heroSlider__dot {
  width: 8px;
  height: 8px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(0, 43, 95, .24);

  cursor: pointer;
}

.heroSlider__dot.is-active {
  background: var(--teal);
}

.heroSlider__count {
  color: var(--muted);
  font-size: .75rem;
}


/* MOBIL */

@media (max-width: 680px) {

  .heroSlider {
    margin: 22px 0 30px;
  }

  .heroSlider__track {
    touch-action: pan-y;
  }

  .heroSlider__frame {
    padding: 5px;
  }

  .heroSlider__frame img {
    aspect-ratio: 3 / 2;
  }

  .heroSlider__button {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }

  .heroSlider__button--prev {
    left: 8px;
  }

  .heroSlider__button--next {
    right: 8px;
  }
}


/* REDUSERT BEVEGELSE */

@media (prefers-reduced-motion: reduce) {

  .heroSlider__track {
    transition: none;
  }

}
