/* ==========================================================================
   Games slider block.
   Mobile (<48em): static 2-column grid, no scrolling, no arrows.
   Desktop (>=48em): horizontal scroll row with prev/next arrow buttons.
   ========================================================================== */

.games-slider-section h2 {
  margin-bottom: var(--space-h2-text-gap);
}

.games-slider {
  position: relative;
}

.games-slider__nav {
  display: none;
}

.games-slider__track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.games-slider__slide {
  width: auto;
}

/* Mobile grid only ever shows the first 6 cards (a clean 3x2 layout);
   the rest of the game library only appears in the desktop scroll row. */
.games-slider__slide:nth-child(n+7) {
  display: none;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  padding: 0.85rem;
}

.game-card__image-wrap {
  aspect-ratio: 301 / 180;
  border-radius: calc(var(--radius-card) - 0.5rem);
  overflow: hidden;
  background: var(--color-bg-dark);
}

.game-card__image {
  width: 100%;
  height: auto;
  display: block;
}

.game-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  min-height: 2.6em;
  color: var(--color-white);
  text-align: center;
  margin-bottom: 0;
  padding-inline: 0.25rem;
}

.game-card__play {
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
}

@media (min-width: 48em) {
  .games-slider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .games-slider__nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--color-card-bg);
    color: var(--color-heading-accent);
    font-size: 1rem;
    border: 1px solid var(--color-btn-secondary-border);
    transition: background var(--transition-fast), opacity var(--transition-fast);
  }

  .games-slider__nav:hover, .games-slider__nav:focus-visible {
    background: var(--color-bg-dark);
  }

  .games-slider__nav:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .games-slider__track {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .games-slider__track::-webkit-scrollbar {
    display: none;
  }

  .games-slider__slide {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 13rem;
  }

  .games-slider__slide:nth-child(n+7) {
    display: block;
  }

  .game-card {
    padding: 1rem;
  }

  .game-card__name {
    font-size: 1rem;
  }
}

@media (min-width: 64em) {
  .games-slider__slide {
    width: 14rem;
  }
}
