/* mod_latestrecipes 6.2 - featured block and rows of cards (colour of the recipes: orange) */
.af-hero, .af-shelf { --afr-c: var(--af-btn, #D54215); --afr-soft: var(--af-c-recipes-soft, #FEEEE8); --afr-muted: #6b5e53; --afr-line: #ece4da; }

/* meta: time, difficulty, stars */
.af-rmeta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; font-size: .82rem; color: var(--afr-muted); line-height: 1.3; }
.af-rmeta__time { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.af-rmeta__time svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.af-rmeta__stars { color: #e3a008; letter-spacing: .05em; white-space: nowrap; }
.af-rmeta__off { color: #ddd5c8; }

/* featured: one big recipe + search + two small ones */
.af-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.af-hero__main { position: relative; display: block; min-height: 22rem; border-radius: .75rem; overflow: hidden; color: #fff; text-decoration: none; background: var(--afr-soft); }
.af-hero__img, .af-hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.af-hero__img img { object-fit: cover; transition: transform .4s ease; }
.af-hero__img--none img { object-fit: contain; padding: 2rem; }
.af-hero__main:hover .af-hero__img img, .af-hero__main:focus-visible .af-hero__img img { transform: scale(1.03); }
/* the text on the photo stays white (the template gives links another colour on hover) */
.af-hero__main:hover, .af-hero__main:focus, .af-hero__main:focus-visible, .af-hero__main:hover .af-hero__title { color: #fff; }
.af-hero__body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: .45rem; padding: 3.5rem 1.5rem 1.25rem;
    background: linear-gradient(to top, rgba(25, 15, 5, .85) 0%, rgba(25, 15, 5, .55) 60%, rgba(25, 15, 5, 0) 100%); }
.af-hero__kicker { align-self: flex-start; padding: .2rem .65rem; border-radius: 1rem; background: var(--afr-c); color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.af-hero__title { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.6vw, 2.1rem); line-height: 1.15; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.af-hero__text { font-size: .95rem; line-height: 1.45; color: rgba(255, 255, 255, .92); max-width: 40rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.af-hero__main .af-rmeta { color: rgba(255, 255, 255, .9); }
.af-hero__main .af-rmeta__off { color: rgba(255, 255, 255, .35); }
.af-hero__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.af-hero__search { padding: 1rem 1.1rem; border-radius: .75rem; background: var(--afr-soft); }
.af-hero__label { display: block; margin-bottom: .45rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; color: var(--af-heading, #2d2d2d); }
.af-hero__field { display: flex; gap: .4rem; }
.af-hero__field .form-control { min-width: 0; }
.af-hero__field .btn { white-space: nowrap; }
.af-hero__adv { display: inline-block; margin-top: .45rem; font-size: .85rem; color: var(--afr-c); }
.af-hero__list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; gap: .75rem; flex: 1; }
.af-hero__item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .85rem; align-items: center; height: 100%; padding: .5rem; border: 1px solid var(--afr-line); border-radius: .75rem;
    background: #fff; color: inherit; text-decoration: none; transition: box-shadow .15s, border-color .15s; }
.af-hero__item:hover, .af-hero__item:focus-visible { border-color: var(--afr-c); box-shadow: 0 3px 12px rgba(60, 40, 20, .12); }
.af-hero__thumb { display: block; aspect-ratio: 4 / 3; border-radius: .5rem; overflow: hidden; background: var(--afr-soft); }
.af-hero__thumb img { width: 100%; height: 100%; object-fit: cover; }
.af-hero__itembody { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.af-hero__itemtitle { font-weight: 700; color: var(--af-heading, #2d2d2d); line-height: 1.25; }
.af-hero__item:hover .af-hero__itemtitle { color: var(--afr-c); }
.af-hero__main:hover, .af-hero__item:hover, .af-hero__item:hover *, .af-shelf__link:hover, .af-shelf__link:hover * { text-decoration: none; }

/* shelf: a row of cards */
.af-shelf { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--af-shelf-n, 6), minmax(0, 1fr)); gap: 1rem; }
.af-shelf__link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--afr-line); border-radius: .6rem; overflow: hidden; background: #fff; color: inherit; text-decoration: none;
    box-shadow: 0 1px 3px rgba(60, 40, 20, .06); transition: box-shadow .15s, transform .15s; }
.af-shelf__link:hover, .af-shelf__link:focus-visible { box-shadow: 0 4px 14px rgba(60, 40, 20, .14); transform: translateY(-2px); }
.af-shelf__img { display: block; aspect-ratio: 4 / 3; background: var(--afr-soft); overflow: hidden; }
.af-shelf__img img { width: 100%; height: 100%; object-fit: cover; }
.af-shelf__img--none img { object-fit: contain; padding: 1rem; }
.af-shelf__body { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .7rem .75rem; flex: 1; }
.af-shelf__title { font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--af-heading, #2d2d2d); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.af-shelf__link:hover .af-shelf__title { color: var(--afr-c); }
.af-shelf__sub { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--afr-muted); }
.af-shelf .af-rmeta { margin-top: auto; }

@media (max-width: 991.98px) {
    .af-hero { grid-template-columns: minmax(0, 1fr); }
    .af-hero__main { min-height: 18rem; }
    .af-hero__side { display: grid; grid-template-columns: minmax(0, 1fr); }
    .af-hero__search { order: -1; }
    .af-shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(11.5rem, 42%); overflow-x: auto; scroll-snap-type: x mandatory;
        padding-bottom: .5rem; scrollbar-width: thin; }
    .af-shelf__item { scroll-snap-align: start; }
}
@media (max-width: 575.98px) {
    .af-hero__main { min-height: 16rem; }
    .af-hero__body { padding: 2.5rem 1rem 1rem; }
    .af-hero__text { display: none; }
    .af-hero__item { grid-template-columns: 6rem minmax(0, 1fr); }
    .af-shelf { grid-auto-columns: 62%; }
}
@media (prefers-reduced-motion: reduce) { .af-hero__img img, .af-shelf__link { transition: none; } }
