/* Ana sayfa — Alpingo Originals */
.home-games {
  width: 100%;
  min-width: 0;
  --hg-surface: #121820;
  --hg-surface-2: #0e141d;
  --hg-border: rgba(56, 89, 130, 0.22);
  --hg-border-hover: rgba(74, 127, 212, 0.38);
  --hg-text: #f4f7fb;
  --hg-muted: #8b9bb4;
  --hg-accent: #3a6cbc;
  --hg-accent-deep: #2d5696;
  --hg-accent-hover: #4578c8;
  --hg-value: #c5d4ea;
}

.home-games__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.home-games__heading {
  margin: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.home-games__all {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa8c9;
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-games__all:hover {
  color: #e8f2fc;
}

.home-games__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-games__card {
  min-width: 0;
  opacity: 0;
  animation: homeGamesCardIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--hg-i, 0) * 70ms);
}

@keyframes homeGamesCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-games__link {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr);
  gap: 0.95rem;
  align-items: stretch;
  min-height: 7.25rem;
  height: 100%;
  padding: 0.8rem;
  border: 1px solid var(--hg-border);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(74, 127, 212, 0.06), transparent 42%),
    linear-gradient(180deg, #172030 0%, var(--hg-surface) 55%, var(--hg-surface-2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 36px -26px rgba(0, 0, 0, 0.85);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.home-games__link:hover,
.home-games__link:focus-visible {
  border-color: var(--hg-border-hover);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 40px -24px rgba(15, 24, 40, 0.95),
    0 0 0 1px rgba(74, 127, 212, 0.08);
  outline: none;
}

.home-games__thumb {
  position: relative;
  display: block;
  width: 6.75rem;
  height: 100%;
  min-height: 5.65rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0a1018;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-games__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 12, 20, 0.35) 100%);
  pointer-events: none;
}

.home-games__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-games__link:hover .home-games__img,
.home-games__link:focus-visible .home-games__img {
  transform: scale(1.05);
}

.home-games__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.1rem 0.15rem 0.05rem 0;
}

.home-games__name {
  display: block;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--hg-text);
}

.home-games__bets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  margin-top: 0.65rem;
}

.home-games__bet {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.home-games__bet-divider {
  width: 1px;
  align-self: stretch;
  min-height: 2.1rem;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.14) 20%,
    rgba(255, 255, 255, 0.14) 80%,
    transparent
  );
}

.home-games__bet-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hg-muted);
}

.home-games__bet-value {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hg-value);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-games__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 0.62rem 0.85rem;
  border-radius: 0.55rem;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  /* Renk: sponsor "Siteye Git" → css/site-buttons.css */
}

@media (max-width: 1099px) {
  .home-games__grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .home-games__link {
    grid-template-columns: 7.25rem minmax(0, 1fr);
    min-height: 7.5rem;
  }

  .home-games__thumb {
    width: 7.25rem;
  }
}

@media (min-width: 700px) and (max-width: 1099px) {
  .home-games__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-games__link {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.75rem;
  }

  .home-games__thumb {
    width: 100%;
    height: 8.5rem;
    min-height: 8.5rem;
  }

  .home-games__body {
    padding: 0 0.1rem 0.05rem;
  }

  .home-games__name {
    font-size: 0.98rem;
  }
}

/* Mobil — 3 oyun tek satır: görsel + ad + oyna */
@media (max-width: 1023px) {
  .home-games__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .home-games__card {
    flex: none;
    min-width: 0;
  }

  .home-games__link {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0.45rem;
    align-items: stretch;
    min-height: 0;
    height: 100%;
    padding: 0.45rem;
    border-radius: 0.75rem;
  }

  .home-games__thumb {
    position: relative;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: 0.55rem;
  }

  .home-games__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .home-games__body {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0;
    min-width: 0;
  }

  .home-games__name {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-games__bets {
    display: none;
  }

  .home-games__play {
    margin-top: auto;
    padding: 0.42rem 0.3rem;
    border-radius: 0.4rem;
    font-size: 0.62rem;
    letter-spacing: 0;
    line-height: 1.15;
  }
}

@media (max-width: 379px) {
  .home-games__grid {
    gap: 0.4rem;
  }

  .home-games__link {
    padding: 0.35rem;
    gap: 0.35rem;
  }

  .home-games__name {
    font-size: 0.66rem;
  }

  .home-games__play {
    padding: 0.38rem 0.2rem;
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-games__card {
    opacity: 1;
    animation: none;
  }

  .home-games__link,
  .home-games__img,
  .home-games__play {
    transition: none;
  }
}

[data-theme="light"] .home-games {
  --hg-surface: #ffffff;
  --hg-surface-2: #f3f6fb;
  --hg-border: rgba(15, 23, 42, 0.1);
  --hg-border-hover: rgba(37, 99, 235, 0.35);
  --hg-text: #0f172a;
  --hg-muted: #64748b;
}

[data-theme="light"] .home-games__link {
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.05), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px -22px rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .home-games__thumb {
  background: #e8eef7;
}

[data-theme="light"] .home-games__bet-divider {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(15, 23, 42, 0.14) 20%,
    rgba(15, 23, 42, 0.14) 80%,
    transparent
  );
}

[data-theme="light"] .home-games {
  --hg-value: #334155;
  --hg-accent: #355ea8;
  --hg-accent-deep: #2a4d8c;
  --hg-accent-hover: #3f6bb8;
}

[data-theme="light"] .home-games__all {
  color: #475569;
}

[data-theme="light"] .home-games__all:hover {
  color: #0f172a;
}
