/* ====== SLIDER BASE ====== */
.gs-slider {
  position: relative;
  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) */

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

/* Block title — use PRIMARYONE typography */
.gs-slider__title {
  text-align: center;
  margin-bottom: 12px;
  font-family: var(--e-global-typography-primary-font-family) !important;
  font-size: var(--e-global-typography-34f1a6b-font-size) !important;
  font-weight: var(--e-global-typography-34f1a6b-font-weight) !important;
  line-height: var(--e-global-typography-34f1a6b-line-height) !important;
  color: var(--e-global-color-0d41130);
}

/* 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 .gs-prev,
.gs-slider__nav .gs-next {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 2px solid var(--e-global-color-secondary);
  background-image: linear-gradient(
    180deg,
    rgb(0 137 137) 0%,
    rgb(20 78 78) 100%
  );
  color: var(--e-global-color-0d41130);
  position: absolute;
  top: 40%;
  z-index: 5;
  cursor: pointer;
  transition: 0.2s;
  display: grid;
  place-items: center;
}
.gs-slider__nav .gs-prev {
  left: -46px;
}
.gs-slider__nav .gs-next {
  right: -46px;
}
@media (max-width: 767px) {
  .gs-slider__nav .gs-prev {
    left: 6px;
  }
  .gs-slider__nav .gs-next {
    right: 6px;
  }
}
.gs-slider__nav .gs-prev::before,
.gs-slider__nav .gs-next::before {
  position: absolute;
  inset: 3px;
  background-image: linear-gradient(
    180deg,
    rgb(0 137 137) 0%,
    rgb(29 99 99) 100%
  );
  border-radius: 2px;
  content: '';
  z-index: -1;
}
.gs-slider__nav .gs-prev::after,
.gs-slider__nav .gs-next::after {
  position: absolute;
  inset: 4px;
  box-shadow: 0 0 8px rgba(15 54 54 / 0.5) inset;
  background-image: linear-gradient(
    180deg,
    rgb(0 137 137) 0%,
    rgb(20 78 78) 100%
  );
  border-radius: 2px;
  content: '';
  z-index: -1;
}
.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Inline SVG icons are centered by grid above */
.gs-slider__nav .gs-icon {
  pointer-events: none;
  color: var(--e-global-color-0d41130);
}
.gs-slider__nav .gs-prev:where(:hover, :focus-visible),
.gs-slider__nav .gs-next:where(:hover, :focus-visible) {
  background-image: linear-gradient(180deg, #1d6363 0%, #0f3636 100%);
}
.gs-slider__nav .gs-prev:where(:hover, :focus-visible)::after,
.gs-slider__nav .gs-next:where(:hover, :focus-visible)::after {
  background-image: linear-gradient(
    180deg,
    rgb(29 99 99) 0%,
    rgb(15 54 54) 100%
  );
}

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

/* Image container */
.gs-slide__image {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--e-global-color-secondary);
  isolation: isolate;
  aspect-ratio: var(--gs-ratio, 7/10);
  transition: 0.3s;
  border-radius: 4px;
  z-index: 1;
}
.gs-slide__image::before,
.gs-slide__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}
.gs-slide__image::before {
  background-image: var(--gs-card-bg, none);
  z-index: 0;
}
.gs-slide__image::after {
  background-image: var(--gs-star-bg, none);
  z-index: 2;
  opacity: 0;
  transition: transform 5s;
}
.gs-slide__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transition: 0.3s;
  opacity: 1;
  z-index: 1;
}
.gs-slide__link:where(:hover, :focus-visible) .gs-slide__img {
  opacity: 0;
}
.gs-slide__link:where(:hover, :focus-visible) .gs-slide__image::after {
  opacity: 1;
  transform: scale(2.5);
}

/* Button (typography from OFFER group; color uses Accent) */
.gs-slide__btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  min-height: 80px;
  font-size: 32px;
  padding: 0px 32px;
  transform: translate(-50%, -50%);
  background-image: var(--gs-play-btn-bg, none);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  overflow: visible;
  opacity: 0;
  transition: 0.2s;
  z-index: 3;
  color: transparent;
  user-select: none;
}
.gs-slide__btn::before {
  position: absolute;
  content: '';
  background-image: var(--gs-play-btn-bg-hover, none);
  filter: drop-shadow(0 1px 16px rgba(3, 252, 245, 0.4))
    drop-shadow(0 1px 0 rgb(15, 54, 54));
  width: 80px;
  height: 80px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  inset: 0;
  opacity: 0;
}
.gs-slide__btn:where(:hover, :focus)::before {
  opacity: 1;
}

.gs-slide__link:where(:hover, :focus) .gs-slide__btn {
  opacity: 1;
}

/* ====== GAME TITLE (linked to OFFER typography) ====== */
.gs-slide__name {
  margin: 0;
  padding-block: 0.5rem;
  text-align: center;
  color: var(--e-global-color-text);
  font-family: var(--e-global-typography-primary-font-family) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: 0.3s;
}

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