/* Related-guides card grid — shared by the product pages (19 Nov 2026).
   Replaces the old text-only internal-link grid: each card now carries the
   guide's own OG image (1200x630), and the last row stays centred instead of
   stranding one card. Cards stretch to equal height within a row. */

.rg-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.rg-card {
  flex: 0 1 calc(33.333% - 0.84rem);
  max-width: none;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.rg-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  overflow: hidden;
}

.rg-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rg-card:hover .rg-thumb img {
  transform: scale(1.04);
}

.rg-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.15rem 1.25rem;
  flex: 1;
}

.rg-title {
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
}

.rg-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .rg-card { flex-basis: calc(50% - 0.63rem); }
}

@media (max-width: 640px) {
  .rg-grid { gap: 1rem; }
  .rg-card { flex-basis: 100%; }
}
