/* TJF Kids Games: compact game cards */

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 320px));
  justify-content: start;
  align-items: stretch;
  gap: clamp(16px, 2vw, 24px);
}

.game-card {
  width: 100%;
  max-width: 320px;
  height: auto;
  overflow: hidden;
  border-radius: 22px;
}

.game-card-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: 180px;
  overflow: hidden;
}

.game-card-image img,
.game-card-image .game-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  padding: 16px 18px 18px;
}

.game-card-body h3 {
  margin: 5px 0 8px;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.25;
}

.game-card-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-size: .92rem;
  line-height: 1.45;
}

.game-play {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

/* Tablet */
@media (max-width: 900px) {
  .game-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .game-card-image {
    max-height: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .game-card-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    width: min(100%, 420px);
    max-width: 420px;
  }
}

/* Full HD and television screens */
@media (min-width: 1600px) {
  .game-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 350px));
    gap: 28px;
  }

  .game-card {
    max-width: 350px;
  }

  .game-card-image {
    max-height: 197px;
  }
}

/* 4K screens */
@media (min-width: 2500px) {
  .game-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 420px));
  }

  .game-card {
    max-width: 420px;
  }

  .game-card-image {
    max-height: 236px;
  }
}
