/* ============================================
   Recipe Hub - Filterable Recipe Finder
   ============================================ */

:root {
    --rh-amber-50: #fff7ed;
    --rh-amber-100: #ffedd5;
    --rh-amber-300: #fdba74;
    --rh-amber-500: #f59e0b;
    --rh-amber-700: #b45309;
    --rh-green-50: #f0fdf4;
    --rh-green-100: #dcfce7;
    --rh-green-200: #bbf7d0;
    --rh-green-700: #166534;
    --rh-rose-50: #fff1f2;
    --rh-rose-100: #ffe4e6;
    --rh-rose-500: #f43f5e;
    --rh-sky-50: #f0f9ff;
    --rh-sky-100: #e0f2fe;
    --rh-sky-500: #0ea5e9;
    --rh-violet-50: #faf5ff;
    --rh-violet-100: #f3e8ff;
    --rh-violet-500: #a855f7;
    --rh-slate-50: #f8fafc;
    --rh-slate-100: #f1f5f9;
    --rh-slate-200: #e2e8f0;
    --rh-slate-400: #94a3b8;
    --rh-slate-500: #64748b;
    --rh-slate-600: #475569;
    --rh-slate-700: #334155;
    --rh-slate-900: #0f172a;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.recipe-hub-hero {
    padding: 4.5rem 0 3.75rem;
    background:
        radial-gradient(1100px 420px at 80% 0%, rgba(245, 158, 11, 0.14), transparent 60%),
        radial-gradient(900px 420px at 10% 100%, rgba(16, 185, 129, 0.25), transparent 55%),
        linear-gradient(155deg, #0a3d20 0%, #146c43 55%, #198754 100%);
}

.recipe-hub-hero .blog-hero-label {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.recipe-hub-hero h1 {
    font-family: 'DM Serif Display', 'DM Sans', serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 0.85rem;
}

.recipe-hub-search-wrap {
    display: flex;
    gap: 0.65rem;
    max-width: 680px;
    margin: 2rem auto 0;
    align-items: stretch;
}

.recipe-hub-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.recipe-hub-search:focus-within {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26), 0 0 0 3px rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.recipe-hub-search-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--rh-slate-400);
    font-size: 1rem;
    pointer-events: none;
}

.recipe-hub-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--rh-slate-900);
    border-radius: 14px;
    min-width: 0;
}

.recipe-hub-search input::placeholder {
    color: var(--rh-slate-400);
}

.recipe-hub-search-clear {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--rh-slate-400);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.recipe-hub-search-clear:hover {
    color: var(--primary-color);
}

.recipe-hub-surprise {
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0 1.2rem;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    backdrop-filter: blur(8px);
}

.recipe-hub-surprise:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.recipe-hub-surprise:active {
    transform: scale(0.97);
}

/* ── Quick picks ───────────────────────────── */
.recipe-hub-quickpicks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    max-width: 780px;
    margin: 1.5rem auto 0;
}

.recipe-quickpick {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    backdrop-filter: blur(6px);
}

.recipe-quickpick:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.recipe-quickpick.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.recipe-quickpick-emoji {
    font-size: 1rem;
    line-height: 1;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.recipe-hub-layout {
    max-width: 1320px;
    margin: 2rem auto 1rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 295px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.recipe-hub-filters {
    position: sticky;
    top: 1.5rem;
    background: white;
    border: 1px solid var(--rh-slate-200);
    border-radius: 18px;
    padding: 1.5rem 1.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 6px 18px rgba(15, 23, 42, 0.04);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.recipe-hub-filters::-webkit-scrollbar { width: 6px; }
.recipe-hub-filters::-webkit-scrollbar-thumb {
    background: var(--rh-slate-200);
    border-radius: 3px;
}

.recipe-hub-filters-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.35rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--rh-slate-100);
}

.recipe-hub-filters-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.005em;
    color: var(--rh-slate-900);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.recipe-hub-filters-title i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.recipe-hub-clear-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.recipe-hub-clear-btn:hover {
    background: var(--rh-green-50);
    color: #146c43;
}

/* ── Filter group ──────────────────────────── */
.recipe-filter-group {
    border: none;
    padding: 0;
    margin: 0 0 1.6rem;
}

.recipe-filter-group:last-child {
    margin-bottom: 0;
}

.recipe-filter-legend {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rh-slate-600);
    margin-bottom: 0.7rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.recipe-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

.recipe-filter-dot[data-accent="course"]    { background: #16a34a; }
.recipe-filter-dot[data-accent="time"]      { background: #0ea5e9; }
.recipe-filter-dot[data-accent="difficulty"]{ background: var(--rh-amber-500); }
.recipe-filter-dot[data-accent="cuisine"]   { background: #a855f7; }
.recipe-filter-dot[data-accent="tag"]       { background: var(--rh-slate-500); }

.recipe-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.recipe-filter-chips--tags {
    max-height: none;
    padding: 0.15rem;
}

/* ── Chip ─────────────────────────────────── */
.recipe-filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    background: var(--rh-slate-50);
    color: var(--rh-slate-700);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
    user-select: none;
    line-height: 1.2;
}

.recipe-filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.recipe-filter-chip-label {
    font-weight: 600;
}

.recipe-filter-chip-count {
    font-size: 0.72rem;
    font-weight: 600;
    /* slate-400 (#94a3b8) failed AA at 10px; slate-600 clears 5:1 on the page bg. */
    color: #475569;
    font-variant-numeric: tabular-nums;
    transition: color 0.15s ease;
}

.recipe-filter-chip:hover {
    background: var(--rh-slate-100);
    color: var(--rh-slate-900);
    border-color: var(--rh-slate-200);
}

.recipe-filter-chip:has(input:checked) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.recipe-filter-chip:has(input:checked) .recipe-filter-chip-count {
    color: rgba(255, 255, 255, 0.72);
}

.recipe-filter-chip:has(input:focus-visible) {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.recipe-filter-chip:active {
    transform: scale(0.96);
}

/* Disabled (dead-end) chips — muted but still AA-readable. Previously used opacity:0.5
   which compressed text contrast to ~2.5:1 (axe flagged 23 nodes). Now relies on a
   single mid-slate color + strikethrough-style italic on the label so state is still
   obvious visually. */
.recipe-filter-chip.is-disabled {
    background: #f8fafc;
    color: #64748b;
    border-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
    font-style: italic;
}

.recipe-filter-chip.is-disabled .recipe-filter-chip-count {
    color: #64748b;
}

/* Difficulty chip color coding */
.recipe-filter-chip--easy:has(input:checked) {
    background: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.recipe-filter-chip--medium:has(input:checked) {
    background: var(--rh-amber-500);
    border-color: var(--rh-amber-500);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.recipe-filter-chip--hard:has(input:checked) {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Hidden tag chips */
.recipe-filter-chip--tag.is-extra {
    display: none;
}

.recipe-filter-chip--tag.is-extra.revealed {
    display: inline-flex;
}

.recipe-filter-chip--tag.is-hidden-by-search {
    display: none !important;
}

.recipe-tag-search {
    width: 100%;
    padding: 0.5rem 0.8rem 0.5rem 2.2rem;
    border: 1.5px solid var(--rh-slate-200);
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
    outline: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
    font-family: inherit;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat left 0.7rem center;
}

.recipe-tag-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

.recipe-tag-expand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s ease;
    border-radius: 8px;
}

.recipe-tag-expand:hover {
    color: #146c43;
    background: var(--rh-green-50);
}

.recipe-tag-expand i {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.recipe-tag-expand[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.recipe-tag-expand .recipe-tag-expand-less { display: none; }
.recipe-tag-expand[aria-expanded="true"] .recipe-tag-expand-more { display: none; }
.recipe-tag-expand[aria-expanded="true"] .recipe-tag-expand-less { display: inline; }

/* ============================================================
   RESULTS AREA
   ============================================================ */
.recipe-hub-results {
    min-width: 0;
}

.recipe-hub-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.recipe-hub-filters-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.05rem;
    border-radius: 100px;
    background: white;
    border: 1.5px solid var(--rh-slate-200);
    color: var(--rh-slate-700);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.recipe-hub-filters-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.recipe-hub-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.45rem;
    background: var(--primary-color);
    color: white;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

.recipe-hub-filter-count[hidden],
.recipe-hub-search-clear[hidden],
.recipe-hub-grid[hidden],
.recipe-hub-empty[hidden],
.recipe-hub-active-filters[hidden],
.recipe-hub-clear-btn[hidden] {
    display: none !important;
}

.recipe-hub-count {
    font-size: 0.92rem;
    color: var(--rh-slate-500);
    flex: 1;
}

.recipe-hub-count strong {
    color: var(--rh-slate-900);
    font-weight: 700;
    font-size: 1.02rem;
}

.recipe-hub-sort-select {
    padding: 0.6rem 2.4rem 0.6rem 1rem;
    border: 1.5px solid var(--rh-slate-200);
    border-radius: 100px;
    background: white;
    color: var(--rh-slate-700);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 10px;
    transition: all 0.15s ease;
}

.recipe-hub-sort-select:hover,
.recipe-hub-sort-select:focus {
    border-color: var(--primary-color);
    color: var(--rh-slate-900);
    outline: none;
}

/* ── Active filter chips ──────────────────── */
.recipe-hub-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, var(--rh-green-50), #ecfdf5);
    border: 1px solid var(--rh-green-200);
    border-radius: 14px;
    align-items: center;
}

.recipe-hub-active-label {
    font-size: 0.8rem;
    color: var(--rh-green-700);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.3rem;
}

.recipe-hub-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem 0.35rem 0.75rem;
    background: white;
    border: 1px solid #86efac;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rh-green-700);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.recipe-hub-active-chip:hover {
    background: var(--rh-green-50);
    border-color: #16a34a;
    transform: translateY(-1px);
}

.recipe-hub-active-chip i:first-of-type {
    font-size: 0.72rem;
    opacity: 0.8;
}

.recipe-hub-active-chip i:last-of-type {
    font-size: 0.7rem;
    opacity: 0.6;
    padding-left: 0.15rem;
    border-left: 1px solid #bbf7d0;
    margin-left: 0.1rem;
    padding: 0 0 0 0.45rem;
}

/* ============================================================
   RECIPE CARDS
   ============================================================ */
.recipe-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
}

.recipe-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 3px 12px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--rh-slate-100, #f1f5f9);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(10px);
    animation: recipeFadeIn 0.35s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes recipeFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    border-color: rgba(25, 135, 84, 0.25);
    color: inherit;
}

.recipe-card-featured-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.recipe-card-time-pill {
    background: var(--rh-slate-100, #f1f5f9);
    color: var(--rh-slate-600, #475569);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    flex-shrink: 0;
}

.recipe-card-time-pill i {
    color: var(--primary-color);
    font-size: 0.68rem;
}

.recipe-card-body {
    padding: 1.35rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.recipe-card-meta-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
}

.recipe-card-course {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
}

.recipe-card-course-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    margin-left: 0.1rem;
    opacity: 0.5;
}

.recipe-card-cuisine {
    font-size: 0.72rem;
    color: var(--rh-slate-500);
    font-weight: 500;
}

.recipe-card-title {
    font-family: 'DM Serif Display', 'DM Sans', serif;
    font-size: 1.32rem;
    font-weight: 400;
    margin: 0 0 0.55rem;
    line-height: 1.25;
    color: var(--rh-slate-900);
    letter-spacing: -0.005em;
}

.recipe-card-summary {
    font-size: 0.88rem;
    color: var(--rh-slate-500);
    line-height: 1.55;
    flex: 1;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-stats {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rh-slate-100);
    font-size: 0.82rem;
    color: var(--rh-slate-500);
    flex-wrap: wrap;
}

.recipe-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.recipe-card-stat i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.recipe-card-difficulty {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px solid;
    margin-left: auto;
}

/* Difficulty badge text was failing AA on their tinted backgrounds at ~10px.
   Darkened each color one step to clear 4.5:1. */
.recipe-card-difficulty--easy {
    color: #15803d;   /* green-700: 5.1:1 on green-50 */
    border-color: #bbf7d0;
    background: var(--rh-green-50);
}

.recipe-card-difficulty--medium {
    color: #92400e;   /* amber-800: 5.4:1 on amber-50 */
    border-color: #fde68a;
    background: var(--rh-amber-50);
}

.recipe-card-difficulty--hard {
    color: #b91c1c;   /* red-700: 5.3:1 on red-50 */
    border-color: #fecaca;
    background: #fef2f2;
}

.recipe-card-match-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0 0 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.65rem;
    background: var(--rh-amber-50);
    border: 1px solid var(--rh-amber-100);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--rh-amber-700);
    font-weight: 500;
    line-height: 1.35;
}

.recipe-card-match-hint i {
    color: var(--rh-amber-500);
    flex-shrink: 0;
}

/* Highlighted text in matches */
mark.recipe-match {
    background: #fef08a;
    color: #713f12;
    padding: 0 0.18em;
    border-radius: 3px;
    font-weight: 700;
}

/* Stagger entrance */
.recipe-card:nth-child(1)  { animation-delay: 0ms; }
.recipe-card:nth-child(2)  { animation-delay: 30ms; }
.recipe-card:nth-child(3)  { animation-delay: 60ms; }
.recipe-card:nth-child(4)  { animation-delay: 90ms; }
.recipe-card:nth-child(5)  { animation-delay: 120ms; }
.recipe-card:nth-child(6)  { animation-delay: 150ms; }
.recipe-card:nth-child(7)  { animation-delay: 180ms; }
.recipe-card:nth-child(8)  { animation-delay: 210ms; }
.recipe-card:nth-child(9)  { animation-delay: 240ms; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.recipe-hub-empty {
    text-align: center;
    padding: 4.5rem 2rem;
    background: white;
    border: 2px dashed var(--rh-slate-200);
    border-radius: 18px;
}

.recipe-hub-empty-icon {
    font-size: 3rem;
    color: var(--rh-slate-200);
    margin-bottom: 1rem;
}

.recipe-hub-empty h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--rh-slate-900);
    margin: 0 0 0.5rem;
}

.recipe-hub-empty p {
    color: var(--rh-slate-500);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.recipe-hub-empty-reset {
    padding: 0.7rem 1.6rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    box-shadow: 0 3px 10px rgba(25, 135, 84, 0.2);
}

.recipe-hub-empty-reset:hover {
    background: #146c43;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25, 135, 84, 0.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .recipe-hub-layout {
        grid-template-columns: 260px 1fr;
        gap: 1.75rem;
    }
}

@media (max-width: 860px) {
    .recipe-hub-hero {
        padding: 3.5rem 0 3rem;
    }

    .recipe-hub-search-wrap {
        flex-direction: column;
        padding: 0 1rem;
    }

    .recipe-hub-surprise {
        padding: 0.85rem 1rem;
    }

    .recipe-hub-quickpicks {
        padding: 0 1rem;
    }

    .recipe-hub-layout {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin-top: 1.5rem;
    }

    .recipe-hub-filters-toggle {
        display: inline-flex;
    }

    .recipe-hub-filters {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(360px, 92vw);
        max-height: 100vh;
        max-width: none;
        border-radius: 0;
        border-right: none;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
        box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18);
    }

    .recipe-hub-filters.open {
        transform: translateX(0);
    }

    .recipe-hub-filters-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }

    .recipe-hub-filters-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .recipe-hub-toolbar {
        gap: 0.65rem;
    }

    .recipe-hub-count {
        order: 3;
        flex-basis: 100%;
        font-size: 0.85rem;
    }
}

@media (max-width: 520px) {
    .recipe-hub-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .recipe-hub-toolbar {
        flex-direction: row;
        align-items: stretch;
    }

    .recipe-hub-sort-select {
        flex: 1;
    }

    .recipe-quickpick {
        font-size: 0.82rem;
        padding: 0.5rem 0.85rem;
    }

    .recipe-card-title {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recipe-card,
    .recipe-hub-search,
    .recipe-hub-filters,
    .recipe-hub-surprise,
    .recipe-quickpick {
        animation: none !important;
        transition: none !important;
    }
    .recipe-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   Dark mode — Recipe hub (/recipes)
   ============================================================ */

.is-dark .recipe-hub-filters {
    background: #1a1f26;
    border-color: #2a3039;
    color: #c3c7cd;
}
.is-dark .recipe-hub-filters-title { color: #e5e7eb; }
.is-dark .recipe-hub-filters-title i { color: #4ddbb1; }
.is-dark .recipe-hub-filters-head { border-bottom-color: #2a3039; }

.is-dark .recipe-filter-group legend { color: #e5e7eb; }
.is-dark .recipe-filter-chip {
    background: #0f1419;
    color: #c3c7cd;
    border-color: #2a3039;
}
.is-dark .recipe-filter-chip:hover {
    background: #1f262e;
    color: #e5e7eb;
}
.is-dark .recipe-filter-chip:has(input:checked) {
    background: #146c43;
    color: #fff;
    border-color: #146c43;
}

/* Sort select + view toggles */
.is-dark .recipe-hub-sort-select {
    background: #1a1f26;
    color: #e5e7eb;
    border-color: #2a3039;
}
.is-dark .recipe-hub-results { color: #a5abb3; }
.is-dark .recipe-hub-filters-toggle {
    background: #1a1f26;
    color: #c3c7cd;
    border-color: #2a3039;
}
.is-dark .recipe-hub-filters-toggle:hover { background: #1f262e; }

.is-dark .recipe-hub-clear-btn { color: #4ddbb1; }

/* Recipe cards on hub */
.is-dark .recipe-card {
    background: #1a1f26;
    border-color: #2a3039;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.is-dark .recipe-card:hover {
    background: #1f262e;
    border-color: #4ddbb1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.is-dark .recipe-card-title { color: #e5e7eb; }
.is-dark .recipe-card-summary { color: #a5abb3; }
.is-dark .recipe-card-meta,
.is-dark .recipe-card-time,
.is-dark .recipe-card-servings { color: #a5abb3; }
.is-dark .recipe-card-tag {
    background: #0f1419;
    color: #c3c7cd;
    border-color: #2a3039;
}

/* Course label */
.is-dark .recipe-card-course { color: #4ddbb1; }
.is-dark .recipe-card-cuisine { color: #a5abb3; }

/* Surprise-me + tag search */
.is-dark .recipe-hub-search {
    background: #1a1f26;
    border-color: #2a3039;
}
.is-dark .recipe-hub-search input { color: #e5e7eb; }
.is-dark .recipe-hub-search input::placeholder { color: #6c757d; }
.is-dark .recipe-hub-search-icon { color: #6c757d; }
.is-dark .recipe-hub-surprise {
    background: #1a1f26;
    color: #e5e7eb;
    border-color: #2a3039;
}
.is-dark .recipe-hub-surprise:hover { background: #146c43; color: #fff; border-color: #146c43; }

/* Empty state card */
.is-dark .recipe-hub-empty {
    background: #1a1f26;
    border-color: #2a3039;
    color: #c3c7cd;
}
.is-dark .recipe-hub-empty h3 { color: #e5e7eb; }

/* Pagination + count labels */
.is-dark .recipe-hub-pagination a,
.is-dark .recipe-hub-pagination span {
    background: #1a1f26;
    color: #c3c7cd;
    border-color: #2a3039;
}

/* Tag expand toggle */
.is-dark .recipe-filter-tag-toggle { color: #4ddbb1; }

/* Featured ribbon on cards */
.is-dark .recipe-card-featured-badge {
    background: #2a1f0a;
    color: #fbbf24;
}
