.games {
  background: url("./../images/games-bg.jpg") center/cover no-repeat;
  padding: 150px 0 80px;
}

.games__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.games__title {
  font-weight: 700;
  font-size: 40px;
  color: #ffc806;
  margin-bottom: 8px;
  line-height: 1;
}

.games__subtitle {
  font-weight: 400;
  font-size: 16px;
  color: rgba(255, 255, 255);
}

.games__count {
  font-size: 16px;
  padding: 10px 24px;
  white-space: nowrap;
  align-self: center;
}

.games__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.games__card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.games__card:nth-child(-n + 3) {
  grid-column: span 1;
}

.games__card:nth-child(-n + 3) {
  grid-column: auto;
}

.games__grid > .games__card:nth-child(1),
.games__grid > .games__card:nth-child(2),
.games__grid > .games__card:nth-child(3) {
  grid-column: auto;
}

.games__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.games__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 992px) {
  .games__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .games {
    padding: 340px 0 80px;
  }
}

@media (max-width: 768px) {
  .games {
    padding: 340px 0 50px;
  }
  .games__header {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }
  .games__title {
    font-size: 28px;
  }
  .games__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
