/* =============================================================================
   TILES component — default theme
   Card grid: icon (image or emoji) + title + description + optional URL.
   ============================================================================= */

.tile-card {
  padding: 28px 24px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}
.tile-card:hover {
  border-color: #111;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.tile-card--link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}
.tile-card--link:hover,
.tile-card--link:visited,
.tile-card--link:active,
.tile-card--link:focus {
  text-decoration: none !important;
  color: inherit;
  outline: none;
}

.tile-icon      { font-size: 2rem; display: block; margin-bottom: 12px; }
.tile-icon--img { display: block; width: 48px; height: 48px; object-fit: contain; margin: 0 0 12px; }
.tile-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; color: #111; }
.tile-desc  { font-size: 0.9rem; color: #555; line-height: 1.6; }

.tiles-section {
  padding: 32px 0;
}

.tiles-grid {
  display: grid;
  /* flexible default — overridden by inline style when card min/max set */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
/* !important needed to override inline style from TilesPage::buildGrid() */
@media (max-width: 480px) {
  .tiles-grid {
    grid-template-columns: 1fr !important;
    max-width: none !important;
    gap: 14px;
  }
  .tile-card {
    padding: 20px 16px;
  }
}

@media (min-width: 481px) and (max-width: 640px) {
  .tiles-grid {
    gap: 14px;
  }
}

@media (max-width: 960px) {
  .tiles-grid { gap: 16px; }
}
