#ebz-home-games {
  position: relative;
  isolation: isolate;
  z-index: 1;
  overflow: hidden;
  padding: 38px 18px 24px;
  background: transparent;
}

/* Continue the hero's dark edge, then reveal the shared background by mid-card. */
#ebz-home-games::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 300px;
  background: linear-gradient(
    to bottom,
    #000 0%,
    rgba(0, 0, 0, .96) 15%,
    rgba(0, 0, 0, .70) 47%,
    rgba(0, 0, 0, .30) 73%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

#ebz-home-games .ebz-home-games__inner {
  position: relative;
  z-index: 1;
  max-width: 1310px;
  margin: 0 auto;
}

#ebz-home-games .ebz-home-games__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 490px;
  padding: 0 14px;
}

#ebz-home-games .ebz-home-games__card {
  --offset: 0px;
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 0;
  height: 425px;
  margin-left: -60px;
  overflow: hidden;
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
  background: #151920;
  color: #fff;
  text-decoration: none;
  transform: translateY(var(--offset)) scale(1);
  z-index: 1;
  transition: transform .65s cubic-bezier(.22, 1, .36, 1), filter .65s ease, z-index 0s linear .65s;
}

#ebz-home-games .ebz-home-games__card:first-child { margin-left: 0; }
#ebz-home-games .ebz-home-games__card:nth-child(1) { --offset: 12px; height: 410px; }
#ebz-home-games .ebz-home-games__card:nth-child(2) { --offset: -2px; height: 438px; }
#ebz-home-games .ebz-home-games__card:nth-child(3) { --offset: -13px; height: 458px; }
#ebz-home-games .ebz-home-games__card:nth-child(4) { --offset: 10px; height: 420px; }

#ebz-home-games .ebz-home-games__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.14) brightness(1.1);
  transform: scale(1.04);
  transition: transform .65s cubic-bezier(.2, .8, .2, 1), filter .5s ease;
}

#ebz-home-games .ebz-home-games__card--wild-rift .ebz-home-games__image { object-position: 48% center; }
#ebz-home-games .ebz-home-games__card--tft .ebz-home-games__image { object-position: 30% center; }
#ebz-home-games .ebz-home-games__card--lol .ebz-home-games__image { object-position: 52% 35%; }
#ebz-home-games .ebz-home-games__card--valorant .ebz-home-games__image { object-position: 65% 42%; }

#ebz-home-games .ebz-home-games__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .08) 28%, rgba(0, 0, 0, .04) 67%, rgba(0, 0, 0, .42));
  pointer-events: none;
}

#ebz-home-games .ebz-home-games__logo {
  position: absolute;
  top: 25px;
  left: 50%;
  width: 61%;
  height: 78px;
  object-fit: contain;
  object-position: center top;
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, .62));
  transform: translateX(-50%);
  pointer-events: none;
}

#ebz-home-games .ebz-home-games__card--lol .ebz-home-games__logo { width: 76%; height: 108px; top: 15px; }

#ebz-home-games .ebz-home-games__card--valorant .ebz-home-games__logo,
#ebz-home-games .ebz-home-games__card--wild-rift .ebz-home-games__logo {
  width: 70%;
  top: 19px;
  height: 92px;
}

#ebz-home-games .ebz-home-games__arrow {
  position: absolute;
  right: 19%;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(0, 0, 0, .48);
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

#ebz-home-games .ebz-home-games__card:hover,
#ebz-home-games .ebz-home-games__card:focus-visible {
  z-index: 2;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s ease, z-index 0s;
  transform: translateY(calc(var(--offset) - 12px)) scale(1.025);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5));
}

#ebz-home-games .ebz-home-games__card:hover .ebz-home-games__image,
#ebz-home-games .ebz-home-games__card:focus-visible .ebz-home-games__image {
  transform: scale(1.105);
  filter: saturate(1.25) brightness(1.18);
}

#ebz-home-games .ebz-home-games__card:hover .ebz-home-games__arrow,
#ebz-home-games .ebz-home-games__card:focus-visible .ebz-home-games__arrow {
  opacity: 1;
  transform: translateY(0);
}

#ebz-home-games .ebz-home-games__card:focus-visible {
  outline: 3px solid #ffd54a;
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  #ebz-home-games .ebz-home-games__grid { height: 430px; }
  #ebz-home-games .ebz-home-games__card { margin-left: -44px; height: 370px; }
  #ebz-home-games .ebz-home-games__card:nth-child(1) { height: 350px; }
  #ebz-home-games .ebz-home-games__card:nth-child(2) { height: 374px; }
  #ebz-home-games .ebz-home-games__card:nth-child(3) { height: 396px; }
  #ebz-home-games .ebz-home-games__card:nth-child(4) { height: 360px; }
}

@media (max-width: 760px) {
  #ebz-home-games { padding: 22px 0 26px; }
  #ebz-home-games::before { height: 200px; }
  #ebz-home-games .ebz-home-games__inner { max-width: none; }
  #ebz-home-games .ebz-home-games__grid {
    justify-content: flex-start;
    height: 328px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    padding: 0 18px;
    scrollbar-width: none;
  }
  #ebz-home-games .ebz-home-games__grid::-webkit-scrollbar { display: none; }
  #ebz-home-games .ebz-home-games__card,
  #ebz-home-games .ebz-home-games__card:nth-child(n) {
    flex: 0 0 232px;
    height: 302px;
    margin-left: -30px;
    scroll-snap-align: center;
  }
  #ebz-home-games .ebz-home-games__card:first-child { margin-left: 0; }
  #ebz-home-games .ebz-home-games__logo { top: 22px; height: 60px; }
  #ebz-home-games .ebz-home-games__card--valorant .ebz-home-games__logo,
  #ebz-home-games .ebz-home-games__card--wild-rift .ebz-home-games__logo { top: 18px; height: 72px; }
  #ebz-home-games .ebz-home-games__arrow { opacity: .8; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #ebz-home-games .ebz-home-games__card,
  #ebz-home-games .ebz-home-games__image,
  #ebz-home-games .ebz-home-games__arrow { transition: none; }
}

/* Match the existing order-benefits brush beneath the home game cards. */
#ebz-home-games .ebz-home-games__brush{display:block;width:100%;height:45px;margin-top:22px;overflow:visible;fill:none;stroke:#da0641;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#ebz-home-games .ebz-home-games__brush path:first-child{stroke-width:2.6}
#ebz-home-games .ebz-home-games__brush path:nth-child(2){stroke-width:2.1}
#ebz-home-games .ebz-home-games__brush path:nth-child(3){stroke-width:1.2;opacity:.9}
@media(max-width:760px){#ebz-home-games .ebz-home-games__brush{height:32px;margin-top:16px}}

/* Fine, rising starlight stays clipped inside each game card. */
#ebz-home-games .ebz-card-sparkles{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none}
#ebz-home-games .ebz-home-games__logo,#ebz-home-games .ebz-home-games__arrow{z-index:2}
#ebz-home-games .ebz-card-sparkles i{position:absolute;left:var(--x);top:var(--y);width:var(--size);height:var(--size);border-radius:50%;background:#fff1f9;box-shadow:0 0 4px #fff0fc,0 0 9px #e4a8f1;opacity:0;animation:ebz-card-starlight var(--duration) var(--delay) ease-in-out infinite;animation-play-state:paused}
#ebz-home-games .ebz-card-sparkles i:nth-child(3n){background:#d9d1ff;box-shadow:0 0 4px #e5d9ff,0 0 9px #c6a8ff}
#ebz-home-games .ebz-card-sparkles i:nth-child(4n)::after{content:"";position:absolute;left:50%;top:50%;width:1px;height:7px;background:#fff8;transform:translate(-50%,-50%)}
#ebz-home-games.ebz-sparkles-visible .ebz-card-sparkles i{animation-play-state:running}
@keyframes ebz-card-starlight{0%,100%{opacity:0;transform:translateY(9px) scale(.5)}20%{opacity:.7}48%{opacity:1;transform:translateY(-3px) scale(1)}80%{opacity:.5}95%{opacity:0;transform:translateY(-17px) scale(.65)}}
@media(prefers-reduced-motion:reduce){#ebz-home-games .ebz-card-sparkles i{animation:none;opacity:.35}}
