/* Misure prese dallo slider di prima: foto 720x450, in proporzione sotto i 720 px. */
.chs {
  position: relative;
  height: min(450px, 62.5vw);
  overflow: hidden;
  background: #111;
  touch-action: pan-y;
}

.chs-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(720px, 100%);
  height: 100%;
  transform: translateX(calc((var(--chs-d) - .5) * 100%));
  transition: transform .8s cubic-bezier(.77, 0, .175, 1), opacity .8s cubic-bezier(.77, 0, .175, 1);
  will-change: transform, opacity;
}

.chs.chs-still .chs-slide { transition: none; }

.chs-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.chs .chs-arrow {
  position: absolute;
  top: 50%;
  z-index: 120;
  width: 50px;
  height: 50px;
  margin: -25px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  line-height: 0;
  transition: opacity .3s;
}

.chs .chs-arrow:hover,
.chs .chs-arrow:focus { background: transparent; opacity: .75; }
.chs .chs-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.chs .chs-prev { left: 30px; }
.chs .chs-next { right: 30px; }

@media (max-width: 599px) {
  .chs .chs-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chs-slide { transition: none; }
}
