/* ==========================================================================
   Content section: prose body shared by every page (H2/H3 blocks, images,
   lists, tables, bonus/game card grids)
   ========================================================================== */

.content-section {
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

.content-section__intro,
.content-section p {
  color: var(--color-text-muted);
  line-height: var(--lh-body);
  margin-top: var(--space-md);
}

.content-section h3 {
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h3);
  margin-top: var(--space-section);
}

.content-image {
  width: 100%;
  aspect-ratio: 3 / 1;
  /* no min-height here: on narrow screens a fixed min-height would win over
     aspect-ratio, distorting the box away from 3:1 and forcing object-fit:cover
     to crop the sides of the image (this previously cut off the logo in the
     bottom-right corner on mobile). aspect-ratio alone always matches the
     source images exactly, so nothing is ever cropped at any width. */
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: var(--space-md);
}

.content-image__img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ratio matches source exactly: image is never cropped */
}

/* One-off ratio override: bonus10.webp is 600x265 (2.264:1), not the usual
   2172x724 (3:1) other content images use — override so it isn't cropped. */
.content-image--bonus10 {
  aspect-ratio: 600 / 265;
}

/* Device download cards (App page: small iOS/Android thumbnails + CTA) */
.device-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.device-card {
  background: var(--color-surface);
  border-radius: var(--radius-card-sm);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  min-width: 0; /* let the grid track shrink to its 1fr share instead of the CTA text forcing overflow */
}

.device-card .btn {
  width: 100%;
  min-width: 0;
  white-space: normal; /* allow "Scarica per Android/iOS" to wrap instead of pushing the card wider than its column */
}

.device-card__image {
  width: 40px;
  height: auto;
  object-fit: contain;
}

.device-card__name {
  color: var(--color-white);
  font-weight: var(--fw-semibold);
  font-size: 0.9375rem;
}

.device-card__desc {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: var(--lh-body);
}

.device-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.page-intro {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.page-intro p {
  color: var(--color-text-muted);
  line-height: var(--lh-body);
}

/* content-list / content-table base rules live in css/global.css to avoid
   duplicate/conflicting declarations; only the card grids are block-local. */

/* ---- Bonus / game card grids (used on Bonus, Home, Slots pages) ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.bonus-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bonus-card__media {
  width: 100%;
  aspect-ratio: 600 / 265; /* matches source exactly: nothing is cropped */
}

.bonus-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bonus-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.bonus-card__name {
  color: var(--color-white);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
}

.bonus-card__cta {
  margin-top: auto;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
