/* СЕКЦИЯ: Игры (rec1711016591) */

.games {
  /* 18px сверху — чтобы повёрнутые плашки «Скоро» не обрезались */
  padding-block: 18px 0;
  overflow: visible;
}

.games__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── Карточка ─────────────────────────────────────────────────── */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 31px 24px 25px;
  border-radius: var(--card-radius);
  background: var(--c-white);
}

.game-card--magenta {
  background: var(--c-magenta);
  color: #fff;
}

.game-card--navy {
  background: var(--c-navy);
  color: #fff;
}

.game-card--outline {
  border: 1px solid #000;
}

.game-card--outline-magenta {
  border: 1px solid var(--c-magenta);
}

.game-card__title {
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  font-weight: 500;
  text-transform: uppercase;
  max-width: 220px;
}

.game-card__icon {
  width: 97px;
  height: auto;
  margin-top: 12px;
}

.game-card__text {
  margin-top: auto;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
}

/* Плашка «Скоро»: повёрнута, выходит за правый верхний угол карточки.
   top/right подобраны так, чтобы центр совпал с оригиналом Tilda. */
.game-card__soon {
  position: absolute;
  right: -16px;
  top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 35px;
  border-radius: var(--card-radius);
  background: var(--c-magenta);
  color: #fff;
  font-size: 16px;
  line-height: 24.8px;
  font-weight: 600;
  transform: rotate(22deg);
  z-index: 3;
}

/* ── Круглое фото ─────────────────────────────────────────────── */
.games__circle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.games__circle img {
  width: 226px;
  height: 226px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Печать «новый формат» ────────────────────────────────────── */
.games__stamp {
  display: flex;
  align-items: center;
  justify-content: center;
}

.games__stamp img {
  width: 165px;
  height: auto;
}

/* ── Прямоугольное фото ──────────────────────────────────────── */
.games__photo {
  border-radius: var(--card-radius);
  overflow: hidden;
  min-height: 250px;
}

.games__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Декорация ───────────────────────────────────────────────── */
.games__deco {
  /* уходит далеко за правый край — в оригинале X=1720 при артборде 1200 */
  --deco-x: 1720px;
  top: -146px;
  width: 617px;
  transform: rotate(12deg);
}

/* ── 960: 3 колонки ──────────────────────────────────────────── */
@media (max-width: 1199px) {
  .games__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .games__deco {
    --deco-x: 650px;
    top: 570px;
    width: 436px;
  }
}

/* ── 640: 2 колонки ──────────────────────────────────────────── */
@media (max-width: 959px) {
  .games__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .game-card {
    padding: 26px 20px 22px;
  }

  /* правая карточка ряда: плашка не должна вылезать за край страницы */
  .games__grid > .game-card:nth-child(even) .game-card__soon {
    right: -6px;
  }

  .games__deco {
    --deco-x: -231px;
    top: 427px;
    width: 321px;
  }
}

/* ── 320: 1 колонка ──────────────────────────────────────────── */
@media (max-width: 639px) {
  .games__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .game-card {
    min-height: 200px;
    padding: 24px 24px 20px;
  }

  .game-card__title {
    max-width: none;
  }

  .game-card__soon {
    right: -6px;
  }

  .games__photo {
    min-height: 200px;
    aspect-ratio: 300 / 200;
  }

  .games__circle img {
    width: 200px;
    height: 200px;
  }

  .games__deco {
    --deco-x: 172px;
    top: 927px;
    width: 240px;
  }
}
