/* ── Recipe card ──────────────────────────────────────────────────────────────
   Same shape as the landing page's .r-card (en/index.html): photo on top, diet
   tag, title, prep time. Shared by the All recipes index and the "Related
   recipes" / "See also" grids on each recipe page, all generated by
   scripts/generate_recipe_pages.py. */

/* --accent (the tag green) and --shadow-card come from variables.css, shared
   with the app. Figma: the `brand-green` color variable and the `shadow-card`
   effect style. */

.ri-card {
    display: flex; flex-direction: column;
    background: var(--surface-container-lowest); border: 1px solid var(--outline-variant);
    border-radius: var(--radius-20); overflow: hidden; color: var(--on-surface); text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ri-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.ri-card[hidden] { display: none; }
.ri-card img { width: 100%; height: auto; aspect-ratio: 4 / 3.2; object-fit: cover; background: var(--surface-container-low); }
.ri-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--spacing-16); }
.ri-tag {
    font-family: var(--font-bold); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 6px;
}
.ri-card :is(h2, h3) { font-family: var(--font-bold); font-size: 16px; line-height: 1.3; margin: 0; color: var(--on-surface); }
.ri-meta { font-family: var(--font-regular); font-size: var(--body-small); color: var(--on-surface-variant); margin: auto 0 0; padding-top: 6px; }

/* Recipe page grids: two columns inside the 720px article. */
.ri-grid-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--spacing-16); }

@media (max-width: 520px) {
    .ri-grid-related { gap: var(--spacing-8); }
    .ri-card { border-radius: var(--radius-16); }
    .ri-card-body { padding: 12px 12px 14px; }
    .ri-tag { font-size: 11px; letter-spacing: 0.1em; }
    .ri-card :is(h2, h3) { font-size: 14px; }
    .ri-meta { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .ri-card, .ri-card:hover { transform: none; }
}
