/* Documentation filmstrip — slow, seamless auto-scroll with an enlarged centre frame */

.gallery-marquee {
  --gallery-gap: 1rem;
  --gallery-height: 11rem;
  --gallery-width: calc(var(--gallery-height) * 16 / 10);

  position: relative;
  overflow: hidden;
  padding: 2.5rem 0;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.gallery-marquee.is-dragging {
  cursor: grabbing;
}

/* Position is driven by gallery-marquee.js so a clicked frame can glide to the centre. */
.gallery-marquee__track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.gallery-marquee__item {
  position: relative;
  flex: 0 0 var(--gallery-width);
  width: var(--gallery-width);
  height: var(--gallery-height);
  margin-right: var(--gallery-gap);
  overflow: hidden;
  border-radius: 0.375rem;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.gallery-marquee__item.is-center {
  z-index: 2;
  transform: scale(1.35);
}

.gallery-marquee__item:focus-within {
  outline: 2px solid #00d1ff;
  outline-offset: 3px;
}

.gallery-marquee__link {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  outline: none;
}

.gallery-marquee__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.gallery-marquee__item--contain img {
  object-fit: contain;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .gallery-marquee {
    --gallery-height: 14rem;
    padding: 3.5rem 0;
  }
}

@media (min-width: 1024px) {
  .gallery-marquee {
    --gallery-height: 17rem;
    padding: 4.5rem 0;
  }
}

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