/**
 * Homepage featured hero slider — 1 large + 4 small mosaic units.
 */

.featured-hero-slider {
  --fh-unit-w:  min(520px, 92vw);
  --fh-height:  248px;
  --fh-gap:     10px;
  --fh-radius:  14px;
  margin: 0 0 2rem;
  position: relative;
}

.featured-hero-slider__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.featured-hero-slider__actions {
  flex-shrink: 0;
}

.featured-hero-slider__view-all {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #8ca3b8);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.featured-hero-slider__view-all:hover {
  color: var(--primary, #10b981);
  text-decoration: none;
}

.featured-hero-slider__view-all i {
  font-size: 0.75rem;
  margin-left: 0.2rem;
}

/* Category rows inside home-game-sliders */
.home-game-sliders .home-mosaic-slider--category {
  margin-bottom: 0;
}

.home-mosaic-slider--spotlight,
.home-mosaic-slider--featured {
  margin-top: 0;
}

.featured-hero-slider__title,
.home-game-sliders .home-mosaic-slider--category .featured-hero-slider__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #f3f4f6);
  letter-spacing: 0.02em;
  text-transform: none;
}

.featured-hero-slider__row {
  position: relative;
}

.featured-hero-slider__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0 0.35rem;
  cursor: grab;
}

.featured-hero-slider__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.featured-hero-slider__viewport::-webkit-scrollbar {
  display: none;
}

.featured-hero-slider__track {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--fh-gap);
  width: max-content;
  padding: 0 2px;
}

/* One mosaic unit: big left, 2x2 small right */
.featured-mosaic-unit {
  flex: 0 0 var(--fh-unit-w);
  width: var(--fh-unit-w);
  height: var(--fh-height);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--fh-gap);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.featured-mosaic-card--big {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.featured-mosaic-unit__small-grid {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--fh-gap);
  min-height: 0;
}

.featured-mosaic-card {
  position: relative;
  display: block;
  border-radius: var(--fh-radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: var(--card, #1a232e);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-height: 0;
}

.featured-mosaic-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: #fff;
}

.featured-mosaic-card__media {
  position: absolute;
  inset: 0;
}

.featured-mosaic-card__media img,
.featured-mosaic-card__media video,
.featured-mosaic-card__media .game-media-container,
.featured-mosaic-card__media .game-media-container img,
.featured-mosaic-card__media .game-media-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-mosaic-card__media .game-media-container {
  position: absolute;
  inset: 0;
}

.featured-mosaic-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.featured-mosaic-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}

.featured-mosaic-card__title {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.5rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-mosaic-card--big .featured-mosaic-card__title {
  font-size: 0.95rem;
  bottom: 0.65rem;
}

.featured-mosaic-card__badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.featured-mosaic-card__badge i {
  font-size: 0.58rem;
}

.featured-mosaic-card__badge--hot {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.featured-mosaic-card__badge--top {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #1a1a1a;
}

.featured-mosaic-card__badge--updated {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

/* Side nav arrows (overlay) */
.featured-hero-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  backdrop-filter: blur(6px);
}

.featured-hero-slider__nav:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.featured-hero-slider__nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.featured-hero-slider__nav--prev {
  left: 0.35rem;
}

.featured-hero-slider__nav--next {
  right: 0.35rem;
}

/* Edge fade when scrollable */
.featured-hero-slider__row::before,
.featured-hero-slider__row::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.featured-hero-slider__row::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg, #0f1419) 10%, transparent);
}

.featured-hero-slider__row::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg, #0f1419) 10%, transparent);
}

.featured-hero-slider.is-scrollable:not(.is-scroll-start) .featured-hero-slider__row::before {
  opacity: 1;
}

.featured-hero-slider.is-scrollable:not(.is-scroll-end) .featured-hero-slider__row::after {
  opacity: 1;
}

@media (min-width: 801px) {
  .featured-hero-slider {
    --fh-unit-w: 540px;
    --fh-height: 260px;
  }

  .featured-hero-slider__viewport {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .featured-hero-slider__nav--prev {
    left: -0.15rem;
  }

  .featured-hero-slider__nav--next {
    right: -0.15rem;
  }
}

@media (max-width: 800px) {
  .featured-hero-slider {
    --fh-unit-w: min(340px, 88vw);
    --fh-height: 188px;
    --fh-gap: 8px;
    --fh-radius: 12px;
    margin-bottom: 1.5rem;
  }

  .featured-hero-slider__title {
    font-size: 1.15rem;
  }

  .featured-hero-slider__nav {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .featured-mosaic-card__title {
    font-size: 0.65rem;
  }

  .featured-mosaic-card--big .featured-mosaic-card__title {
    font-size: 0.8rem;
  }
}

[dir="rtl"] .featured-hero-slider__nav--prev {
  left: auto;
  right: 0.35rem;
}

[dir="rtl"] .featured-hero-slider__nav--next {
  right: auto;
  left: 0.35rem;
}

[dir="rtl"] .featured-hero-slider__view-all i {
  transform: scaleX(-1);
}

/* Listing grids — titles inside cards (homepage, new games, category) */
div#main-games.games-grid article.game-card,
.games-grid.games-grid--overlay-titles article.game-card {
  gap: 0;
}

div#main-games.games-grid article.game-card .game-card__external-title,
.games-grid.games-grid--overlay-titles article.game-card .game-card__external-title {
  display: none !important;
}

div#main-games.games-grid article.game-card .game-card__link,
.games-grid.games-grid--overlay-titles article.game-card .game-card__link {
  position: absolute;
  inset: 0;
}

div#main-games.games-grid article.game-card .game-card__shade,
.games-grid.games-grid--overlay-titles article.game-card .game-card__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
}

div#main-games.games-grid article.game-card .game-card__overlay-title,
.games-grid.games-grid--overlay-titles article.game-card .game-card__overlay-title {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.4rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

div#main-games.games-grid article.game-card .game-card__badge,
.games-grid.games-grid--overlay-titles article.game-card .game-card__badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

div#main-games.games-grid article.game-card .game-card__badge i,
.games-grid.games-grid--overlay-titles article.game-card .game-card__badge i {
  font-size: 0.52rem;
}

div#main-games.games-grid article.game-card .game-card__badge--hot,
.games-grid.games-grid--overlay-titles article.game-card .game-card__badge--hot {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

div#main-games.games-grid article.game-card .game-card__badge--top,
.games-grid.games-grid--overlay-titles article.game-card .game-card__badge--top {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #1a1a1a;
}

div#main-games.games-grid article.game-card .game-card__badge--updated,
.games-grid.games-grid--overlay-titles article.game-card .game-card__badge--updated {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.section-title--hero {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #f3f4f6);
  letter-spacing: 0.02em;
  text-transform: none;
}

@media (max-width: 800px) {
  div#main-games.games-grid article.game-card .game-card__overlay-title,
  .games-grid.games-grid--overlay-titles article.game-card .game-card__overlay-title {
    font-size: 0.62rem;
    bottom: 0.32rem;
    left: 0.35rem;
    right: 0.35rem;
  }

  div#main-games.games-grid article.game-card .game-card__badge,
  .games-grid.games-grid--overlay-titles article.game-card .game-card__badge {
    top: 0.3rem;
    left: 0.3rem;
    font-size: 0.52rem;
    padding: 0.14rem 0.35rem;
  }

  .section-title--hero {
    font-size: 1.15rem;
  }
}

