/* ====== SLIDER BASE ====== */
.gs-slider {
  margin: 24px 0;

  /* 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) */

  /* TYPOGRAPHY/COLORS from Elementor Globals (with fallbacks) */
  color: var(--e-global-color-text, inherit);
  font-family: var(--e-global-typography-text-font-family, inherit);
  font-size: var(--e-global-typography-text-font-size, inherit);
  font-weight: var(--e-global-typography-text-font-weight, inherit);
  line-height: var(--e-global-typography-text-line-height, inherit);
}

/* Inherit typography and color for all nested elements (except svg/img) */
.gs-slider,
.gs-slider *:where(:not(svg, svg *, img)) {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Block title — linked to global heading typography (Secondary) */
.gs-slider__title {
  margin-bottom: 12px;
  color: var(--e-global-color-text, inherit);
  font-family: var(--e-global-typography-secondary-font-family, inherit);
  font-size: var(--e-global-typography-secondary-font-size, inherit);
  font-weight: var(--e-global-typography-secondary-font-weight, inherit);
  line-height: var(--e-global-typography-secondary-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 {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  position: absolute;
  top: 40%;
  z-index: 5;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s ease;
}
.gs-slider__nav .gs-prev {
  left: 6px;
}
.gs-slider__nav .gs-next {
  right: 6px;
}
.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;
}

/* Image container */
.gs-slide__image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  isolation: isolate;
  aspect-ratio: var(--gs-ratio, 7/10);
}

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

/* Overlay */
.gs-slide__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.35s ease;
  z-index: 1;
}

/* GIF layer */
.gs-slide__gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Button (linked to Global Primary color) */
.gs-slide__btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 40px;
  white-space: nowrap;
  border: 1px solid var(--e-global-color-accent, currentColor);
  background: rgba(0, 0, 0, 0.55);
  color: var(--e-global-color-accent, currentColor);
  font-family: var(--e-global-typography-text-font-family, inherit);
  font-size: var(--e-global-typography-text-font-size, inherit);
  font-weight: var(--e-global-typography-text-font-weight, 600);
  line-height: var(--e-global-typography-text-line-height, inherit);
  border-radius: 10px;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
  z-index: 3;
}

/* ====== HOVER ====== */
.gs-slide__image:hover::after,
.gs-slide__link:focus .gs-slide__image::after {
  background: rgba(174, 165, 165, 0.15);
}

.gs-slide__image:hover .gs-slide__img,
.gs-slide__link:focus .gs-slide__img {
  transform: scale(1.03);
  opacity: 1 !important;
}

.gs-slide__image:hover .gs-slide__gif,
.gs-slide__link:focus .gs-slide__gif {
  opacity: var(--gs-gif-opacity) !important;
  visibility: visible !important;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.gs-slide__image:hover .gs-slide__btn,
.gs-slide__link:focus .gs-slide__btn {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.75); /* darker on hover */
  transform: translate(-50%, -50%) scale(1.05);
}

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

  color: var(--e-global-color-text, inherit);
  font-family: var(--e-global-typography-secondary-font-family, inherit);
  font-size: var(--e-global-typography-secondary-font-size, 1em);
  font-weight: var(--e-global-typography-secondary-font-weight, 600);
  line-height: var(--e-global-typography-secondary-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;
  }
}
