#screenshots {
  padding-bottom: 201px;
}

#screenshots .contenuto {
  position: relative;
  z-index: 1;
}

.gallery {
  --thumb-width: 214px;
  --thumb-gap: 12px;
  margin-top: -10px;
}

.gallery-stage {
  position: relative;
  width: min(800px, calc(100% - 48px));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}

.gallery-shot.is-shown {
  opacity: 1;
}

.gallery-strip {
  margin-top: 30px;
  height: calc(var(--thumb-width) * 9 / 16);
}

.gallery-track {
  display: flex;
  gap: var(--thumb-gap);
  width: max-content;
  margin: 0 auto;
  will-change: transform;
}

.gallery.is-looping .gallery-track {
  margin: 0 0 0 50%;
}

.gallery-track.is-sliding {
  transition: transform .6s var(--molla);
}

.gallery-thumb {
  flex: 0 0 auto;
  width: var(--thumb-width);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: none;
  opacity: .3;
  transition: opacity .4s ease;
}

.gallery-thumb.is-active {
  opacity: 1;
}

.gallery-thumb:hover {
  opacity: .6;
}

.gallery-thumb.is-active:hover {
  opacity: 1;
}

.gallery-thumb:focus-visible {
  outline: 2px solid #EED8A9;
  outline-offset: 2px;
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@media (max-width: 980px) {
  #screenshots {
    padding-bottom: 120px;
  }

  .gallery {
    --thumb-width: 128px;
    --thumb-gap: 8px;
  }

  .gallery-strip {
    margin-top: 20px;
  }
}
