/* ====== 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) */
  --gs-nav-next-icon: none;
  --gs-nav-prev-icon: none;
  --gs-play-icon: none;
  --gs-mask-url: none;

  /* 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-title-font-family, inherit);
  font-size: var(--e-global-typography-title-font-size, inherit);
  font-weight: var(--e-global-typography-title-font-weight, inherit);
  line-height: var(--e-global-typography-title-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;
}

/* ====== HEADER + NAV (inline with title) ====== */
.gs-slider__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.gs-slider__header .gs-slider__title {
  margin: 0;
}

.gs-slider__nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gs-slider__nav .gs-prev,
.gs-slider__nav .gs-next {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: solid 1px #ae6b2b;
  padding: 0;
  background-color: transparent;
  /* use custom SVG icons */
  background-repeat: no-repeat;
  background-position: center;
  --gs-nav-icon-size: 22px;
  background-size: var(--gs-nav-icon-size) var(--gs-nav-icon-size);
  -webkit-appearance: none;
  appearance: none;

  /* chevron styling */
  --gs-nav-size: 14px; /* chevron size */
  --gs-nav-thickness: 3px; /* chevron line thickness */
  --gs-nav-color: #c8c2ff; /* default color on dark bg */
  --gs-nav-hover: #ffffff; /* hover/focus color */
  color: var(--gs-nav-color);

  /* smooth hover */
  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

/* remove old chevrons */
.gs-slider__nav .gs-prev::before,
.gs-slider__nav .gs-next::before {
  content: none !important;
}

/* icon sources */
.gs-slider__nav .gs-next {
  background-image: var(--gs-nav-next-icon);
}
.gs-slider__nav .gs-prev {
  background-image: var(--gs-nav-prev-icon);
}

/* hover/focus polish */
.gs-slider__nav .gs-prev:hover,
.gs-slider__nav .gs-prev:focus-visible,
.gs-slider__nav .gs-next:hover,
.gs-slider__nav .gs-next:focus-visible {
  transform: scale(1.06);
  background-color: transparent !important;
  box-shadow: none !important;
  /* small brightness lift on hover */
  filter: brightness(1.1);
}

/* ensure no theme hover styles paint a background */
.gs-slider__nav .gs-prev:where(:hover, :active, :focus),
.gs-slider__nav .gs-next:where(:hover, :active, :focus) {
  background-color: transparent !important;
}

/* keep a subtle focus ring without background fill */
.gs-slider__nav .gs-prev:focus-visible,
.gs-slider__nav .gs-next:focus-visible {
  outline: 2px solid color-mix(in srgb, currentColor 60%, transparent);
  outline-offset: 2px;
}
.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.2);
}

/* Hide header navigation on tablet and mobile */
@media (max-width: 1023.98px) {
  .gs-slider__nav {
    display: none !important;
  }
}

/* ====== 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;
  /* add breathing room so first/last card borders aren't clipped */
  --gs-edge: 6px;
  padding-left: var(--gs-edge);
  padding-right: var(--gs-edge);
  box-sizing: border-box;
}

/* ====== 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;

  isolation: isolate;
  aspect-ratio: var(--gs-ratio, 7/10);
  /* corner notch size (responsive) */
  --gs-cut: clamp(8px, 1.6vmin, 14px);
  /* optional mask image via --gs-mask-url */
  /* 2px border (matches offers) */
  border: 2px solid #ae6b2b;
}

/* simple overlay border for game cards (no image) */
.gs-slide__image::before {
  /* disable decorative frame */
  content: none !important;
}

/* 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;
  /* show image as-is (no frame mask) */
}

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

/* 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;
  /* no masking */
}

/* Button (linked to Global Primary color) */
.gs-slide__btn {
  /* positioning */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  /* size */
  --gs-play-size: 40px;
  width: var(--gs-play-size);
  height: var(--gs-play-size);
  padding: 0;
  display: inline-block;

  /* base color from Elementor Global token */
  --gs-play-base: var(--e-global-color-82dcace, #0ed26b);
  --gs-play-grad-start: color-mix(in srgb, var(--gs-play-base) 92%, white);
  --gs-play-grad-end: color-mix(in srgb, var(--gs-play-base) 88%, black);
  --gs-play-stroke: color-mix(in srgb, var(--gs-play-base) 35%, black);

  /* use provided image instead of styled circle */
  background-color: transparent;
  background-image: var(--gs-play-icon);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  box-shadow: none;
  border-radius: 0;

  /* hide the PLAY text visually but keep the element */
  color: transparent;
  font-size: 0;
  line-height: 0;

  /* show/hide transitions */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease,
    filter 0.25s ease;
  z-index: 4; /* above decorative border */
}

/* remove triangle glyph when using image */
.gs-slide__btn::before {
  content: none;
}

/* ====== 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 {
  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 {
  /* show on hover */
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1.05);
}

/* responsive: slightly smaller on narrow screens */
@media (max-width: 640px) {
  .gs-slide__btn {
    --gs-play-size: 48px;
    border-radius: 0;
  }
  .gs-slide__btn::before {
    content: none;
  }
  .gs-slide__image {
    --gs-cut: 8px;
  }
}

/* ====== GAME TITLE (match global paragraph `p` style) ====== */
.gs-slide__name {
  margin-top: 8px;
  text-align: center;
  /* Use paragraph (text) typography tokens */
  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, 1em);
  font-weight: var(--e-global-typography-text-font-weight, inherit);
  line-height: var(--e-global-typography-text-line-height, 1.4);
  letter-spacing: var(--e-global-typography-text-letter-spacing, normal);
  text-decoration: var(--e-global-typography-text-text-decoration, none);

  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;
  }
}
