/* ====== SLIDER BASE ====== */
.gs-slider {
  margin: 24px 0;
  position: relative; /* anchor nav when moved outside Swiper */

  /* configurable variables */
  --gs-per: 8; /* number of cards on desktop (overwritten by JS if needed) */
  --gs-gap: 16px; /* gap between cards (overwritten by JS if needed) */
  --gs-gif-opacity: 0.85; /* GIF opacity on hover (0..1) */
}

/* Block title — linked to global heading typography (Secondary) */
.gs-slider__title {
  margin-bottom: 12px;
  color: var(--e-global-color-accent, inherit);
  font-family: var(--e-global-typography-accent-font-family, inherit);
  font-size: var(--e-global-typography-accent-font-size, inherit);
  font-weight: var(--e-global-typography-accent-font-weight, inherit);
  line-height: var(--e-global-typography-accent-line-height, inherit);
}

/* Swiper container */
.gs-slider .gs-slider__swiper {
  position: relative;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Card */
.gs-slider .swiper-slide {
  overflow: visible;
  box-sizing: border-box;
}

/* When slides ≤ --gs-per — center and disable transform */
.gs-slider.is-short .swiper-wrapper {
  justify-content: center !important;
  transform: none !important;
}
.gs-slider.is-short .gs-slider__swiper {
  max-width: none;
}

/* ====== NAVIGATION ====== */
.gs-slider__nav .gs-prev,
.gs-slider__nav .gs-next {
  /* Square button container */
  width: 36px;
  height: 36px;
  background-color: var(--gs-nav-bg, var(--e-global-color-846be6f));
  border: 1px solid var(--e-global-color-accent);
  border-radius: 6px;

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  cursor: pointer;
  transition: 0.2;
}
.gs-slider__nav .gs-prev {
  left: -40px;
}
.gs-slider__nav .gs-next {
  right: -40px;
}
@media (max-width: 767px) {
  .gs-slider__nav .gs-prev {
    left: 10px;
  }
  .gs-slider__nav .gs-next {
    right: 5px;
  }
}
/* Triangle arrows inside the square */
.gs-slider__nav .gs-prev::before,
.gs-slider__nav .gs-next::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
}
.gs-slider__nav .gs-prev::before {
  /* Left-pointing triangle */
  border-width: 10px 16px 10px 0;
  border-color: transparent var(--gs-nav-arrow, #fff) transparent transparent;
  transform: translate(-50%, -50%);
}
.gs-slider__nav .gs-next::before {
  /* Right-pointing triangle */
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--gs-nav-arrow, #fff);
  transform: translate(-50%, -50%);
}
.gs-slider__nav .gs-prev:where(:hover, :focus-visible)::before {
  border-color: transparent var(--gs-nav-arrow, var(--e-global-color-secondary))
    transparent transparent;
}
.gs-slider__nav .gs-next:where(:hover, :focus-visible)::before {
  border-color: transparent transparent transparent
    var(--gs-nav-arrow, var(--e-global-color-secondary));
}
.gs-slider__nav .gs-prev:where(:hover, :focus-visible),
.gs-slider__nav .gs-next:where(:hover, :focus-visible) {
  border: 1px solid var(--e-global-color-secondary);
}
.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ====== ROW/SLIDES ====== */
.gs-slider .swiper-wrapper {
  display: flex;
  align-items: stretch;
  justify-content: flex-start !important;
  /* gap: var(--gs-gap); */
}
.gs-slider .swiper {
  --swiper-theme-color: currentColor;
  overflow: hidden;
}

/* ====== SLIDE CONTENT ====== */
.gs-slide {
  overflow: visible;
}

.gs-slide__link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  transition: 0.2s;
}

/* Image container */
.gs-slide__image {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  isolation: isolate;
  aspect-ratio: var(--gs-ratio, 7/10);
  border: 1px solid var(--e-global-color-47815d6);
  transition: 0.2s;
}

/* Base image */
.gs-slide__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transition: 0.2s;
  z-index: 0;
}

/* Button (linked to Global Primary color) */
.gs-slide__btn {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  line-height: 2;
  padding: 5px 25px;
  white-space: nowrap;
  border: 1px solid var(--e-global-color-accent, currentColor);
  background: var(--e-global-color-primary);
  border: 2px solid #e5a749a8;
  text-shadow: 2px 2px #0000004d;
  color: var(--e-global-color-accent);
  font-family: var(--e-global-typography-text-font-family);
  font-size: var(--e-global-typography-text-font-size);
  font-weight: var(--e-global-typography-text-font-weight);
  border-radius: 6px;

  opacity: 0;
  transition: 0.2s;
  z-index: 3;
}

/* ====== HOVER ====== */
.gs-slide__link:where(:hover, :focus-visible) .gs-slide__image img {
  transform: scale(1.09);
  opacity: 0.2;
}

.gs-slide__link:where(:hover, :focus-visible) .gs-slide__image {
  border: 1px solid var(--e-global-color-secondary);
}

.gs-slide__link:where(:hover, :focus-visible) .gs-slide__btn {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.gs-slide__btn:where(:hover, :focus-visible) {
  color: var(--e-global-color-secondary);
}

/* ====== GAME TITLE (linked to global heading typography) ====== */
.gs-slide__name {
  margin-top: 8px;
  text-align: center;

  color: var(--e-global-color-accent);
  font-family: var(--e-global-typography-text-font-family, inherit);
  font-size: var(--e-global-typography-text-font-size, 1em);
  font-weight: var(--e-global-typography-text-font-weight, 600);
  line-height: var(--e-global-typography-text-line-height, 1.2);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

/* ====== PAGINATION ====== */
.gs-pagination {
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

/* ====== LINKS ====== */
.gs-slide__link:hover,
.gs-slide__link:focus,
.gs-slide__link:visited {
  text-decoration: none !important;
}

/* ====== RESPONSIVE GAPS ====== */
@media (max-width: 639.98px) {
  .gs-slider {
    --gs-gap: 12px;
  }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .gs-slider {
    --gs-gap: 14px;
  }
}

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) {
  .gs-slide__img,
  .gs-slide__image::after,
  .gs-slide__btn,
  .gs-slider__nav .gs-prev,
  .gs-slider__nav .gs-next,
  .gs-slide__gif {
    transition: none !important;
  }
}
