/* ====== 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) */
  /* Shared CTA color used for Play button and nav buttons */
  --gs-cta-bg: var(--e-global-color-d665ab1, #d665ab);
  --gs-cta-contrast: #fff;

  /* Typography/Colors from Elementor Globals (with fallbacks) */
  color: var(--e-global-color-text);
  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);

  /* Offer typography aliases with safe fallbacks */
  --gs-offer-font-family: var(
    --e-global-typography-offer-font-family,
    var(--e-global-typography-text-font-family, inherit)
  );
  --gs-offer-font-size: var(
    --e-global-typography-offer-font-size,
    var(--e-global-typography-text-font-size, inherit)
  );
  --gs-offer-font-weight: var(
    --e-global-typography-offer-font-weight,
    var(--e-global-typography-text-font-weight, 600)
  );
  --gs-offer-line-height: var(
    --e-global-typography-offer-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  */
.gs-slider__title {
  margin-bottom: 12px;
  color: var(--e-global-color-text);
  font-family: var(--e-global-typography-primary-font-family, inherit);
  font-size: var(--e-global-typography-primary-font-size, inherit);
  font-weight: var(--e-global-typography-primary-font-weight, inherit);
  line-height: var(--e-global-typography-primary-line-height, inherit);
}

/* Header row: title + nav on one line */
.gs-slider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.gs-slider__head .gs-slider__title {
  margin: 0;
}

/* Prevent theme headings from overriding slider title
.gs-slider h1.gs-slider__title,
.gs-slider h2.gs-slider__title,
.gs-slider h3.gs-slider__title,
.gs-slider h4.gs-slider__title,
.gs-slider h5.gs-slider__title,
.gs-slider h6.gs-slider__title {
  font-family: var(
    --e-global-typography-primaryone-font-family,
    inherit
  ) !important;
  font-size: var(
    --e-global-typography-primaryone-font-size) !important;
  font-weight: var(
    --e-global-typography-primaryone-font-weight,
    inherit
  ) !important;
  line-height: var(
    --e-global-typography-primaryone-line-height,
    inherit
  ) !important;
  text-transform: none;
  letter-spacing: normal;
} */

/* 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 {
  /* shrink container to visible slide block width and center it */
  max-width: calc(
    var(--gs-visible) * var(--gs-card) + (var(--gs-visible) - 1) * var(--gs-gap)
  );
}

/* Keep card size constant when slides < per-view */
.gs-slider.is-short .swiper-slide {
  flex: 0 0 var(--gs-card);
  width: var(--gs-card) !important;
}

/* ====== NAVIGATION ====== */
.gs-slider__nav {
  display: inline-flex;
  gap: 12px;
  /* Nav color tokens tied to CTA */
  --gs-nav-border: var(--gs-cta-bg);
  --gs-nav-arrow: var(--gs-cta-contrast, #fff);
}
.gs-slider__nav .gs-prev,
.gs-slider__nav .gs-next {
  width: 40px;
  height: 25px;
  border: 1px solid var(--gs-nav-border);
  border-radius: 25px;
  background: var(--gs-cta-bg);
  z-index: 6;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative; /* needed for absolute-positioned arrow parts */
}
/* 3-line arrows: shaft (::before) + head (::after) */
/* Shaft */
.gs-slider__nav .gs-prev::before,
.gs-slider__nav .gs-next::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px; /* length of the middle line */
  height: 2px; /* match head thickness */
  background: var(--gs-nav-arrow);
  transform: translateY(-50%);
}
.gs-slider__nav .gs-next::before {
  left: 10px;
}
.gs-slider__nav .gs-prev::before {
  right: 10px;
}

/* Head */
.gs-slider__nav .gs-prev::after,
.gs-slider__nav .gs-next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--gs-nav-arrow);
  border-top: 2px solid var(--gs-nav-arrow);
}
.gs-slider__nav .gs-prev::after {
  left: 10px;
  transform: translateY(-50%) rotate(225deg);
}
.gs-slider__nav .gs-next::after {
  right: 10px;
  transform: translateY(-50%) rotate(45deg);
}
.gs-slider__nav .gs-prev:hover,
.gs-slider__nav .gs-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  filter: brightness(1.05);
}
.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;

  isolation: isolate;
  aspect-ratio: var(--gs-ratio, 7/10);
}

/* Base image layers */
.gs-slide__img,
.gs-slide__gif {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

/* Main image */
.gs-slide__img {
  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 {
  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 — textual "Play" styled with Elementor globals */
.gs-slide__btn {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  z-index: 3;

  /* textual button look */
  width: auto;
  height: auto;
  padding: 6px 30px;
  border: 0;
  border-radius: 25px;
  box-sizing: border-box;
  background: var(--e-global-color-d665ab1, #d665ab);
  box-shadow: none;

  /* typography from Elementor globals */
  color: #fff; /* white text */
  font-family: var(--e-global-typography-secondary-font-family, inherit);
  font-size: var(--e-global-typography-secondary-font-size, 14px);
  font-weight: 700;
  line-height: 1.2;
  text-indent: 0;
  overflow: visible;
  white-space: normal;

  /* reveal on hover */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

/* Remove triangle icon when using textual button */
.gs-slide__btn::after {
  content: none;
}

/* ====== HOVER ====== */
.gs-slide__image:hover::after,
.gs-slide__link:focus .gs-slide__image::after {
  background: rgba(7, 69, 242, 0.7);
}

.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;
  transform: translate(-50%, -50%) scale(1.05);
  filter: brightness(1.05);
}

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

  /* Use site Text color so it doesn't pick up Secondary/link colors */
  color: var(--e-global-color-text);

  font-family: var(--gs-primary-font-family);
  font-size: var(--gs-primary-font-size);
  font-weight: var(--gs-primary-font-weight);
  line-height: var(--gs-primary-line-height);

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

/* Game name now uses OFFER; no extra overrides needed */

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