/* The clipper prevents page-wide horizontal scroll */
.games-carousel-clip {
  overflow: hidden;
  position: relative; /* for safety if you absolutely-position arrows */
}

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

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

.games-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.games-category-divider {
  border: 1px solid var(--e-global-color-6b9151f);
  width: 70%;
}

@media (max-width: 1024px) {
  .games-category-divider {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .games-category-divider {
    border: 0;
    width: 0;
  }
}

.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-6b9151f);
}

.games-category-nav {
  display: flex;
  gap: 16px;
}

.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 {
  background-color: var(--e-global-color-secondary);
  padding: 5px 10px;
  line-height: 1.15;
  font-size: 16px;
  font-weight: 900;
  color: var(--e-global-color-6b9151f);
  border-radius: 6px;
  transition: 0.2s;
}

.games-category-nav .swiper-button-prev:where(:hover, :focus-visible)::after,
.games-category-nav .swiper-button-next:where(:hover, :focus-visible)::after {
  color: var(--e-global-color-47a4176);
}

.game-card-inner {
  display: block;
  box-sizing: border-box;
  z-index: 8;
}

.game-card--games .game-card-inner {
  max-width: 195px;
  max-height: 265px;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 3px solid var(--e-global-color-6b9151f);
  transition: 0.2s;
}

.game-card--games .game-card-inner::before {
  content: '';
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
  background-image: var(--games-thumb-more-bg, none);
  background-position: center;
  background-repeat: no-repeat;
}

.game-card--games .game-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: var(--games-thumb-more-mask, none),
    var(--games-thumb-more-animation, none);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: color;
}

.game-card--sports .game-card-inner {
  max-width: 220px;
  max-height: 360px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px 6px 0px 0px;
  border: 3px solid var(--e-global-color-6b9151f);
}

.game-card--promotions .game-card-inner {
  width: 100%;
  height: 100%;
  max-width: 545px;
  min-width: 320px;
  max-height: 370px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 3px solid var(--e-global-color-6b9151f);
}

@media (min-width: 1024px) {
  .game-card--promotions .game-card-inner {
    min-width: 0;
  }
}

.game-card--promotions .game-card-inner::before {
  content: '';
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
  background-image: var(--games-thumb-more-bg, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.game-card--promotions .game-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: var(--games-thumb-more-mask, none),
    var(--games-thumb-more-animation, none);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: color;
}

.game-card-inner img {
  opacity: 1;
  width: 100%;
  display: block;
  transition: 0.2s;
  z-index: 5;
}

.game-card--games .game-card-inner:where(:hover, :focus-visible) img,
.game-card--games
  .game-card-inner.is-disabled:where(:hover, :focus-visible)
  img {
  opacity: 0;
}

.game-card--games .game-card-inner:where(:hover, :focus-visible)::before,
.game-card--games
  .game-card-inner.is-disabled:where(:hover, :focus-visible)::before {
  opacity: 1;
}

.game-card--games .game-card-inner:where(:hover, :focus-visible)::after,
.game-card--games
  .game-card-inner.is-disabled:where(:hover, :focus-visible)::after {
  opacity: 0.3;
}

.game-card--promotions .game-card-inner:where(:hover, :focus-visible) img,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  img {
  opacity: 0;
}

.game-card--promotions .game-card-inner:where(:hover, :focus-visible) .ribbon,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  .ribbon {
  opacity: 0;
}
.game-card--promotions
  .game-card-inner:where(:hover, :focus-visible)
  .promotion-description,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .promotion-description {
  opacity: 0;
}

.game-card--promotions .game-card-inner:where(:hover, :focus-visible)::before,
.game-card--promotions
  .game-card-inner.is-disabled:where(:hover, :focus-visible)::before {
  opacity: 1;
}

.game-card--promotions .game-card-inner:where(:hover, :focus-visible)::after,
.game-card--promotions
  .game-card-inner.is-disabled:where(:hover, :focus-visible)::after {
  opacity: 0.3;
}

.game-card-inner:where(:hover, :focus-visible) img {
  transition: 0.5s;
  transform: scale(1.2);
}

.promotion-description {
  font-family: var(--e-global-typography-text-font-family) !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1a1a1ad1;
  z-index: 6;
  padding: 5px;
  font-size: 24px;
  font-weight: 700;
  color: var(--e-global-color-47a4176);
  border-top: 1px solid var(--e-global-color-6b9151f);
  word-wrap: break-word;
}

@media (max-width: 767px) {
  .promotion-description {
    font-size: 16px;
  }
}

.promotion-description p {
  margin-block-end: 0rem !important;
}

.game-card--games .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  line-height: 1.4;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 195px;
  text-overflow: ellipsis;
  color: var(--e-global-color-6b9151f);
}

.game-card--promotions .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  line-height: 1.4;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 545px;
  text-overflow: ellipsis;
  color: var(--e-global-color-6b9151f);
}

.game-card--sports .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  background-color: var(--e-global-color-811dfee);
  /* border: solid 1px var(--e-global-color-e465ca5); */
  color: var(--e-global-color-b964cec);
  border-radius: 0px 0px 6px 6px;
  padding: 10px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
  width: 100%;
  text-overflow: ellipsis;
}

.slide-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.2s;
  width: 48px;
  height: 48px;
  background-color: transparent !important;
  background-image: var(--games-play-btn-bg, none),
    var(--games-play-icon, none);
  background-size: cover, 24px 24px;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: color;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  z-index: 12;
  overflow: hidden;
}

.slide-play-btn::before {
  position: absolute;
  inset: 0;
  opacity: 0;
  content: '';
  width: 48px;
  height: 48px;
  background-image: var(--games-play-btn-bg-hover, none),
    var(--games-play-icon-hover, none);
  background-size: cover, 24px 24px;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: color;
  overflow: hidden;
}

.slide-play-btn:where(:hover, :focus-visible) {
  opacity: 0;
}

.slide-play-btn:where(:hover, :focus-visible)::before {
  opacity: 1;
}

.game-card-inner:where(:hover, :focus-visible) .slide-play-btn,
.game-card-inner.is-disabled:where(:hover, :focus-visible) .slide-play-btn {
  opacity: 1;
}

.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: 1;
}

/* Animation for fade in up effect */
@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;
  }
}
