/* 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;
  background-color: var(--e-global-color-secondary);
  border-radius: 8px;
  padding: 8px 30px;
}

.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);
  text-decoration-line: underline;
  text-decoration-color: var(--e-global-color-accent);
  text-decoration-style: solid;
  text-decoration-thickness: 5px;
}

.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;
  border: 1px solid var(--e-global-color-6b9151f);
  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 {
  border: 1px solid var(--e-global-color-text);
  color: var(--e-global-color-text);
}

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

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

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

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

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

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

.game-card--games .game-card-inner:where(:hover, :focus-visible) {
  background-image: var(--games-thumb-hover-bg, none);
  background-position: center;
  background-size: 195px 265px;
  background-repeat: no-repeat;
  animation: games-bg-pulse 4s ease-in-out infinite;
  will-change: background-size;
}

@keyframes games-bg-pulse {
  0%,
  100% {
    background-size: 195px 265px;
  }
  50% {
    background-size: 255px 340px;
  }
}

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

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

.game-card--promotions:where(:hover, :focus-visible) .game-card-inner {
  background-image: var(--games-thumb-hover-bg, none);
  background-position: center;
  background-size: 545px 370px;
  background-repeat: no-repeat;
  animation: promotions-bg-pulse 4s ease-in-out infinite;
  will-change: background-size;
}

@keyframes promotions-bg-pulse {
  0%,
  100% {
    background-size: 545px 370px;
  }
  50% {
    background-size: 605px 430px;
  }
}

.game-card--sports .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-secondary);
  border-top: 1px solid var(--e-global-color-b964cec);
  word-wrap: break-word;
}

.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: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 195px;
  text-overflow: ellipsis;
  color: var(--e-global-color-text);
}

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

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

.game-card--sports
  .game-card-inner:where(:hover, :focus-visible)
  + .swiper-game-name {
  text-decoration-color: var(--e-global-color-accent);
}

.slide-play-btn {
  font-family: var(--e-global-typography-text-font-family) !important;
  font-weight: var(--e-global-typography-text-font-weight) !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.2s;
  padding: 0px 20px !important;
  min-height: 48px;
  background-color: var(--e-global-color-secondary) !important;
  border: 0 !important;
  color: var(--e-global-color-e1ac330) !important;
  border-radius: 8px !important;
  font-size: 20px !important;
  cursor: pointer;
  z-index: 9;
  will-change: transform, opacity;
}

.slide-play-btn:where(:hover, :focus-visible) {
  /* border: 1px solid var(--e-global-color-e465ca5) !important; */
  background-color: var(--e-global-color-47a4176) !important;
  animation: slide-btn-pulse 1.5s ease-in-out infinite;
}

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

@keyframes slide-btn-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.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;
  }
}
