/* The clipper prevents page-wide horizontal scroll */
.games-carousel-clip {
  overflow: hidden;
  position: relative;
}

/* Keep Swiper’s overflow INSIDE the clipper */
.games-carousel-clip .swiper {
  overflow: visible; /* slides can peek, but are clipped by parent */
}

.swiper-wrapper {
  justify-content: flex-start;
}

/* Ensure spacing between slides (all carousels) */
/* spacing is controlled via Swiper's spaceBetween (JS). */

/* Slides stay fluid on small screens */
.games-category .swiper .swiper-slide:has(.game-card--games .game-card-inner) {
  width: clamp(160px, 33vw, 195px);
}
.games-category .swiper .swiper-slide:has(.game-card--sports .game-card-inner) {
  width: clamp(160px, 33vw, 220px);
}
.games-category
  .swiper
  .swiper-slide:has(.game-card--promotions .game-card-inner) {
  width: clamp(320px, 33vw, 545px);
}

/* Desktop: Swiper controls width via slidesPerView */
@media (min-width: 1024px) {
  .games-category .swiper .swiper-slide {
    width: auto;
  }
}

.games-category {
  margin-top: 1.5rem;
  background-color: var(--e-global-color-primary);
  border-radius: 8px;
  padding: 8px 30px;
}

.games-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.games-category-divider {
  border: 0;
  width: 70%;
  height: var(--games-divider-height, 2px);
  background-image: var(--games-divider-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% var(--games-divider-height, 2px);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

@media (max-width: 1024px) {
  .games-category-divider {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .games-category-divider {
    border: 0;
    width: 0;
    height: 0;
    background: none;
  }
}

.games-category-title {
  font-family: var(--e-global-typography-text-font-family) !important;
  font-size: var(--e-global-typography-text-font-size) !important;
  font-weight: var(--e-global-typography-text-font-weight) !important;
  margin: 0;
  padding: 1rem 0rem;
  color: var(--e-global-color-accent);
}

.games-category-nav {
  display: flex;
  gap: 30px; /* increased space between prev/next */
}

.games-category-nav .swiper-button-prev,
.games-category-nav .swiper-button-next {
  margin-top: 0 !important;
  z-index: 99;
  position: static;
  background: none;
}

.games-carousel-nav .swiper-button-prev::after,
.games-category-nav .swiper-button-prev::after {
  z-index: 99;
  font-family: "Font Awesome 6 Free";
  content: "\f104";
}

.games-carousel-nav .swiper-button-next::after,
.games-category-nav .swiper-button-next::after {
  z-index: 99;
  font-family: "Font Awesome 6 Free";
  content: "\f105";
}

.games-category-nav .swiper-button-prev::after,
.games-category-nav .swiper-button-next::after {
  /* remove legacy border/pill styles; arrow icon handled below */
  border: 0 !important;
  background: transparent;
}

.games-category-nav .swiper-button-prev:where(:hover, :focus-visible)::after,
.games-category-nav .swiper-button-next:where(:hover, :focus-visible)::after {
  border: 0 !important;
  color: var(--e-global-color-6b9151f);
}

/* Circular next/prev buttons (override defaults) */
.games-category-nav .swiper-button-prev,
.games-category-nav .swiper-button-next {
  width: 35px;
  height: 35px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Outer circle background */
.games-category-nav .swiper-button-next::before,
.games-category-nav .swiper-button-prev::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--e-global-color-secondary);
  box-shadow: none;
  filter: none;
  border-radius: 50%;
}
/* no triangle clip-path; use a circle */

/* Inner arrow icon */
.games-category-nav .swiper-button-prev::after,
.games-category-nav .swiper-button-next::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none;
  filter: none;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 20px;
  color: var(--e-global-color-text);
  border-radius: 50%;
}
/* keep FA content from earlier rules; no triangle clip-path */

/* Remove borders applied on hover from earlier rules */
.games-category-nav .swiper-button-prev:where(:hover, :focus-visible)::after,
.games-category-nav .swiper-button-next:where(:hover, :focus-visible)::after {
  border: 0 !important;
}

/* Hover/focus lift */
.games-category-nav .swiper-button-prev:where(:hover, :focus-visible)::before,
.games-category-nav .swiper-button-next:where(:hover, :focus-visible)::before {
  filter: brightness(1.06) saturate(1.06);
  transform: translateY(-1px);
}

/* Disabled state */
.games-category-nav .swiper-button-disabled::before,
.games-category-nav .swiper-button-disabled::after {
  filter: grayscale(0.4) opacity(0.55);
}

/* ========= Cards / Titles ========= */

.game-card {
  display: block;
  position: relative;
  background-color: transparent;
  border-radius: 12px;
  padding: 8px;
  box-shadow: none;
  cursor: pointer;
}

/* Rounded card container for promotions */
.game-card--promotions {
  border-radius: 12px;
  overflow: hidden; /* clip inner to rounded corners */
}

.game-card-inner {
  z-index: 8; /* base stacking context holder */
  display: block;
  box-sizing: border-box;
}

.game-card--games .game-card-inner {
  max-width: 195px;
  max-height: 265px;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: transparent; /* no inner background */
}

.game-card--promotions .game-card-inner {
  max-width: 545px;
  max-height: 370px;
  aspect-ratio: 545 / 370;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: transparent;
}

/* Desktop adjustments */
@media (min-width: 1024px) {
  .game-card--promotions .game-card-inner {
    min-width: 0;
  }
}

.game-card--sports .game-card-inner {
  max-width: 220px;
  max-height: 360px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid #ffc107;
}

/* Title inside the card (games/promotions) */
.game-card .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  line-height: 1.3;
  font-size: 16px;
  font-weight: 700;
  color: var(--e-global-color-secondary);
  position: absolute;
  left: 50%;
  top: calc(50% - 60px);
  transform: translateX(-50%);
  width: calc(100% - 16px);
  padding: 4px 6px;
  text-align: center;
  background: transparent;
  clip-path: none;
  z-index: 13; /* above button */
  pointer-events: none;
  opacity: 0;
  transition: 0.2s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card--promotions .swiper-game-name {
  position: static;
  transform: none;
  width: 100%;
  padding: 8px 10px;
  margin: 0;
  text-align: center;
  background: transparent;
  z-index: 1;
  pointer-events: auto;
  opacity: 1;
  color: var(--e-global-color-30a95ac);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 545px;
  min-width: 320px;
}

/* Games: caption below image, original card size, with ellipsis */
.game-card--games .swiper-game-name {
  position: static;
  transform: none;
  width: 100%;
  max-width: 195px;
  padding: 0;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  opacity: 1;
  color: var(--e-global-color-30a95ac);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card:where(:hover, :focus-visible) .swiper-game-name,
.game-card.is-disabled:where(:hover, :focus-visible) .swiper-game-name {
  opacity: 1;
}

/* Sports: title below the image, always visible */
.game-card--sports .swiper-game-name {
  position: static;
  transform: none;
  width: 100%;
  max-width: 220px;
  padding: 0;
  margin-top: 8px;
  text-align: center;
  opacity: 1;
  color: var(--e-global-color-30a95ac);
}

/* Cursors for sports */
.game-card--sports,
.game-card--sports .game-card-inner,
.game-card--sports .game-card-inner img,
.game-card--sports .swiper-game-name {
  cursor: pointer !important;
}
.game-card--sports.is-disabled,
.game-card--sports.is-disabled .game-card-inner,
.game-card--sports.is-disabled .game-card-inner img,
.game-card--sports.is-disabled .swiper-game-name {
  cursor: pointer !important;
}

/* ========= Image & Hover Tint (no .overlay element needed) ========= */

.game-card-inner img {
  width: 100%;
  display: block;
  transition: 0.2s;
  z-index: 5; /* below the tint ::before */
  position: relative;
}

/* Promotions: ensure image fits inside container */
.game-card--promotions .game-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* games image sizing uses default rules */

/* Base for tint via ::before (games) */
.game-card--games .game-card-inner {
  position: relative;
}
.game-card--games .game-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Semi-transparent blue hover tint */
  background: rgba(88, 140, 243, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 7; /* above img (5), below btn (12) & title (13) */
  pointer-events: none;
}
.game-card--games .game-card-inner:where(:hover, :focus-visible)::before {
  opacity: 1;
}
/* optional: dim the image a bit */
.game-card--games .game-card-inner:where(:hover, :focus-visible) img {
  opacity: 0.6;
}

/* Base for tint via ::before (promotions) */
.game-card--promotions .game-card-inner {
  position: relative;
}
.game-card--promotions .game-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Semi-transparent blue hover tint */
  background: rgba(88, 140, 243, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 7;
  pointer-events: none;
}
.game-card--promotions .game-card-inner:where(:hover, :focus-visible)::before {
  opacity: 1;
}
.game-card--promotions .game-card-inner:where(:hover, :focus-visible) img {
  opacity: 0.6;
}

/* Sports hover effect (no tint) */
.game-card--sports:where(:hover, :focus-visible) .game-card-inner img,
.game-card--sports.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  img {
  transition: 0.5s;
  transform: scale(1.2);
}

/* ========= Promotions description ========= */

.promotion-description {
  font-family: var(--e-global-typography-text-font-family) !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 23%;
  background: linear-gradient(180deg, rgba(26,26,26,0.85) 0%, rgba(14,14,14,0.94) 100%);
  z-index: 9; /* above tint (7) and image (5), below title (13) */
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--e-global-color-text);
}

.promotion-description p {
  margin: 0 !important;
}

/* ========= Play button ========= */

.slide-play-btn {
  font-family: var(
    --e-global-typography-34b1e0c-font-family,
    var(--e-global-typography-text-font-family)
  ) !important;
  font-size: var(--e-global-typography-34b1e0c-font-size, 20px) !important;
  font-weight: var(--e-global-typography-34b1e0c-font-weight, 700) !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.2s ease-in-out;
  width: 64px;
  height: 64px;
  padding: 0 !important;
  background-color: transparent !important;
  background-image: radial-gradient(
    circle at 40% 20%,
    #ffe36a 0%,
    #ffd84a 30%,
    #ffb300 65%,
    #f48a00 100%
  ) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  border: 0 !important;
  border-radius: 50% !important;
  color: transparent !important;
  fill: transparent !important;
  cursor: pointer;
  z-index: 12; /* over tint (7) and image (5) */
}

/* White play triangle */
.slide-play-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 34%;
  transform: translate(-45%, -50%);
  background: #fff;
  clip-path: polygon(20% 15%, 85% 50%, 20% 85%);
}

/* Center Play button for games and promotions */
.game-card--games .slide-play-btn,
.game-card--promotions .slide-play-btn {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.slide-play-btn:where(:hover, :focus-visible) {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  filter: brightness(1.05) saturate(1.05);
}

.game-card-inner:where(:hover, :focus-visible) .slide-play-btn,
.game-card-inner.is-disabled:where(:hover, :focus-visible) .slide-play-btn {
  opacity: 1;
}

/* Sports: hide Play button; whole card is clickable */
.game-card--sports .slide-play-btn {
  display: none !important;
}

/* ========= Ribbon ========= */

.game-card--sports .ribbon,
.game-card--games .ribbon {
  display: none;
}

.ribbon {
  --f: 0.5em; /* control the folded part */
  position: absolute;
  top: 0;
  left: 0;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  line-height: 1.8;
  padding-inline: 1lh;
  padding-bottom: var(--f);
  border-image: conic-gradient(#0008 0 0) 51% / var(--f);
  clip-path: polygon(
    100% calc(100% - var(--f)),
    100% 100%,
    calc(100% - var(--f)) calc(100% - var(--f)),
    var(--f) calc(100% - var(--f)),
    0 100%,
    0 calc(100% - var(--f)),
    999px calc(100% - var(--f) - 999px),
    calc(100% - 999px) calc(100% - var(--f) - 999px)
  );
  transform: translate(calc((cos(45deg) - 1) * 100%), -100%) rotate(-45deg);
  transform-origin: 100% 100%;
  background-color: red;
  z-index: 9; /* above tint (7) */
}

/* ========= Animations ========= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 80px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-in-up {
  animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.fade-in-up-init {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .fade-in-up-init {
    opacity: 1;
    transform: none;
  }
}

/* Hide next/prev arrows on tablet and below */
@media (max-width: 1024px) {
  .games-category-nav {
    display: none !important;
  }
}
