﻿/* One row of unique football photos, scrollable on smaller screens. */
.football-gallery-stage {
  position: relative;
  z-index: 0;
  margin-bottom: 2rem;
}

.football-gallery-stage + .football-grid {
  position: relative;
  z-index: 1;
}

.football-gallery {
  transform: translate3d(0, var(--gallery-offset, 0px), 0);
  opacity: var(--gallery-opacity, 1);
  -webkit-mask-image: linear-gradient(to bottom, #000 var(--gallery-fade-start, 100%), transparent var(--gallery-fade-end, 140%));
  mask-image: linear-gradient(to bottom, #000 var(--gallery-fade-start, 100%), transparent var(--gallery-fade-end, 140%));
}

.football-gallery-stage.is-faded .football-gallery {
  pointer-events: none;
}

.football-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  max-width: 100%;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--cream-dim) transparent;
}

.football-gallery:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

.football-gallery-item {
  position: relative;
  flex: 0 0 calc((100% - 3rem) / 4);
  min-width: 0;
  /* Same vertical frame as the backup, based on the tallest photograph. */
  aspect-ratio: 9 / 16;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(5, 6, 8, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  scroll-snap-align: start;
}

.football-gallery-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.football-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 760px) {
  .football-gallery-item {
    flex-basis: clamp(220px, 72vw, 320px);
  }
}


.football-gallery-stage.is-parallax 
@media (prefers-reduced-motion: reduce) { .football-gallery-stage.is-parallax .football-gallery { transform: none; opacity: 1; mask-image: none; -webkit-mask-image: none; } }
