/* ═══════════════════════════════════════════════════════
   In cucina con Angelone — style.css
   incucinaconangelone.com
═══════════════════════════════════════════════════════ */

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary:   #463B31;
            --secondary: #6B5B4A;
            --accent:    #B68B58;
            --charcoal:  #2F2A23;
            --cream:     #F3E9DF;
            --beige:     #ECE0D4;
            --warm-gray: #847A6D;
            --light-cream: #FEF7F0;
            --t-bg:           #F6F0E6;
            --t-bg-deep:      #E7D9C9;
            --t-bg-card:      #FBF4EB;
            --t-bg-surface:   #F0E4D5;
            --t-bg-surface2:  #E8D9C9;
            --t-bg-hover:     #E4D3C1;
            --t-bg-active:    #D5BEA8;
            --t-text:         #2F2A23;
            --t-text-inv:     #FFFFFF;
            --t-muted:        #857865;
            --t-gold:         #9C7A4F;
            --t-gold-l:       #BE9A6F;
            --t-border:       rgba(108, 88, 63, 0.16);
            --t-border-md:    rgba(108, 88, 63, 0.28);
            --t-border-hi:    #D9C8B4;
            --t-overlay:      rgba(47, 38, 27, 0.14);
            --t-header-text:  #2F2A23;
            --t-shadow:       rgba(52, 42, 32, 0.12);
            --t-ingredient:   rgba(108, 88, 63, 0.20);
            --t-step-num-bg:  #E7D9C9;
            --t-step-num-txt: #2F2A23;
            --t-tab-hover-bg: #E4D3C1;
            --t-tab-active-bg:#D5BEA8;
        }


        html {
            scroll-behavior: smooth;
            overflow-x: hidden;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            line-height: 1.6;
            color: var(--t-text);
            background-color: var(--t-bg);
            background-image:
                radial-gradient(circle at 20% 10%, rgba(182, 139, 88, 0.12), transparent 22%),
                radial-gradient(circle at 85% 90%, rgba(156, 122, 79, 0.08), transparent 18%);
            position: relative;
            min-height: 100vh;
            overflow-x: hidden;
            width: 100%;
            cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><circle cx='16' cy='16' r='13' fill='%23B68B58'/><ellipse cx='11' cy='10' rx='5' ry='3.5' fill='%23D4A56E' opacity='0.7'/><circle cx='12' cy='19' r='1.2' fill='%236B5B4A' opacity='0.6'/><circle cx='21' cy='15' r='1' fill='%236B5B4A' opacity='0.55'/><circle cx='18' cy='23' r='1.1' fill='%236B5B4A' opacity='0.55'/><circle cx='9' cy='15' r='0.9' fill='%236B5B4A' opacity='0.5'/><circle cx='23' cy='21' r='0.9' fill='%236B5B4A' opacity='0.5'/><circle cx='16' cy='16' r='13' fill='none' stroke='%236B5B4A' stroke-width='1.2'/></svg>") 16 16, auto;
        }

        body::before {
            content: none;
        }
        header.header-hidden {
            transform: translateY(-110%);
        }

        header.header-scrolled {
            box-shadow: 0 4px 20px var(--t-shadow);
        }

        /* ═══════════════════════════════════════════════
           LAYOUT BASE — sidebar, grid, tabs, main, titoli
           ═══════════════════════════════════════════════ */
        main {
            max-width: 1600px;
            margin: 0 auto;
            padding: 0 2rem 4rem;
        }

        .recipes-section {
            display: grid;
            grid-template-columns: 240px 1fr;
            gap: 2rem;
            margin-top: 3rem;
        }

        .recipes-sidebar {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            height: fit-content;
            position: sticky;
            top: 80px;
            align-self: start;
            overflow-y: auto;
            max-height: calc(100vh - 100px);
            scrollbar-width: none;
        }
        .recipes-sidebar::-webkit-scrollbar { display: none; }

        @media (min-width: 769px) {
            .recipes-sidebar {
                transform: translateX(-120%);
                opacity: 0;
                pointer-events: none;
                transition: transform 0.45s ease, opacity 0.35s ease;
            }
            .recipes-sidebar.visible {
                transform: translateX(0);
                opacity: 1;
                pointer-events: auto;
            }
        }

        .tab-button {
            background: transparent;
            border: 1px solid rgba(56,36,13,0.15);
            padding: 0.9rem 1.2rem;
            cursor: pointer;
            font-weight: 500;
            font-size: 0.95rem;
            color: var(--t-muted);
            transition: all 0.25s ease;
            text-align: left;
            border-radius: 8px;
            margin: 2px 0;
            font-family: inherit;
            width: 100%;
        }
        .tab-button:hover {
            background: var(--t-tab-hover-bg);
            color: var(--t-gold);
        }
        .tab-button.active {
            background: var(--t-tab-active-bg);
            color: var(--t-gold);
            font-weight: 700;
            border-left: 3px solid var(--secondary);
            padding-left: 1rem;
        }

        .recipes-content {
            min-height: 400px;
        }

        .section-title {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 700;
            color: var(--t-text);
            margin-bottom: 2rem;
        }

        .ricette-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 2rem;
        }
        /* ── PC GRANDE (≥1400px) ── */
        @media (min-width: 1400px) {
            main { max-width: 1400px; padding: 2.5rem 3rem 5rem; }
            .ricette-grid { grid-template-columns: repeat(4, 1fr); gap: 1.8rem; }
            .recipes-section { grid-template-columns: 260px 1fr; gap: 2.5rem; }
        }

/* ── PC STANDARD (1200–1399px) ── */
        @media (min-width: 1200px) and (max-width: 1399px) {
            main { padding: 2rem 2.5rem 4rem; }
            .ricette-grid { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
        }

        /* ── LAPTOP (900–1199px) ── */
        @media (min-width: 900px) and (max-width: 1199px) {
            .ricette-grid { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
            .recipes-section { grid-template-columns: 220px 1fr; }
        }

        /* ── TABLET LANDSCAPE (769–899px) ── */
        @media (min-width: 769px) and (max-width: 899px) {
            .recipes-section { grid-template-columns: 1fr; }
            .recipes-sidebar {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
                position: relative; top: 0;
                gap: 0.4rem; padding: 0.9rem;
            }
            .tab-button.active { border-left: none; border-bottom: 3px solid var(--secondary); }
            .ricette-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
            .footer-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
        }

        /* ── TABLET PORTRAIT (≤1024px) ── */
        @media (max-width: 1024px) {
            .recipes-section { grid-template-columns: 1fr; gap: 1.5rem; }
            .recipes-sidebar {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
                position: relative; top: 0; gap: 0.45rem;
            }
            .tab-button.active {
                border-left: none;
                border-bottom: 3px solid var(--secondary);
                padding-left: 1rem; margin-bottom: 0;
            }
            .ricette-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
            .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
        }
        /* ══════════════════════════════════════════════════
           MOBILE (≤768px) — iPhone 14 Pro / Galaxy S24 / Pixel 8
           ══════════════════════════════════════════════════ */
        @media (max-width: 768px) {
            .hero { margin: 2rem auto 1.5rem; padding: 2rem 1rem; width: 100%; box-sizing: border-box; overflow: hidden; }
            .hero h1 { font-size: 2rem; letter-spacing: -1px; }
            .hero p { font-size: 0.95rem; }

            /* Layout principale */
            main { padding: 0.6rem 0.75rem 4rem; width: 100%; box-sizing: border-box; }

            /* Bio section */
            .bio-container { grid-template-columns: 1fr; gap: 1.5rem; }
            .bio-image-left { height: 260px; }
            .bio-content h2 { font-size: 1.6rem; }
            .bio-accent-image { width: 140px; height: 140px; }

            /* Sidebar tab — griglia 3 colonne scrollabile */
            .recipes-sidebar {
                grid-template-columns: repeat(3, 1fr);
                gap: 0.3rem; padding: 0.6rem 0.4rem;
                max-height: none;
                width: 100%; box-sizing: border-box;
            }
            .tab-button {
                padding: 0.55rem 0.3rem;
                font-size: 0.72rem;
                text-align: center;
                border-left: none;
                border-bottom: 2px solid transparent;
            }
            .tab-button.active {
                border-left: none;
                border-bottom: 2px solid var(--secondary);
                padding-left: 0.3rem;
            }

            /* Griglia ricette — 2 colonne */
            .ricette-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

            /* Card — verticale compatta */
            .ricetta-card { flex-direction: column; padding: 0; }
            .ricetta-image {
                aspect-ratio: 4/3;
                font-size: 2rem;
                min-width: unset;
            }
            .ricetta-content { padding: 0.65rem; gap: 0.3rem; }
            .ricetta-category { font-size: 0.62rem; }
            .ricetta-title { font-size: 0.88rem; }
            .ricetta-description {
                font-size: 0.76rem;
                line-clamp: 2;
                -webkit-line-clamp: 2;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }
            .ricetta-meta { padding-top: 0.35rem; gap: 0.3rem; }
            .meta-item { font-size: 0.7rem; }
            .section-title { font-size: 1.4rem; }

            /* Modal — drawer dal basso (stile iOS/Android) */
            .recipe-modal { align-items: flex-end; }
            .recipe-modal-content {
                margin: 0; width: 100%; max-width: 100%;
                max-height: 88vh;
                border-radius: 20px 20px 0 0;
                padding: 1.3rem 1rem 1.5rem;
            }
            .recipe-modal-title { font-size: 1.15rem; }
            .recipe-section-title { font-size: 0.92rem; }
            .ingredient-item { padding: 0.5rem 0.65rem; }
            .step-number { width: 26px; height: 26px; font-size: 0.75rem; }
            .step-content { font-size: 0.86rem; }

            /* Footer */
            .footer-container { grid-template-columns: 1fr !important; gap: 1.2rem; width: 100%; max-width: 100%; }
            .footer-section { width: 100%; box-sizing: border-box; overflow: hidden; word-wrap: break-word; }
            footer { padding: 1.8rem 1rem; margin-top: 2rem; width: 100%; box-sizing: border-box; overflow: hidden; }
            .recipes-section { padding: 0; margin-top: 1.5rem; width: 100%; }
        }

        @media (max-width: 540px) {
            .ricette-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
            .ricetta-title { font-size: 0.84rem; }
            .hero h1 { font-size: 1.75rem; }
            main { padding: 0.5rem 0.65rem 4rem; }
        }

        /* ── MOBILE PICCOLO (≤375px) — iPhone SE 1/2, Galaxy A03 ── */
        @media (max-width: 375px) {
            .tab-button { font-size: 0.66rem; padding: 0.48rem 0.2rem; }
            .ricette-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
            .recipe-modal-content { padding: 1rem 0.85rem 1.3rem; }
        }
/* ── TOUCH: rimuovi hover (tutti i dispositivi touch) ── */
        @media (hover: none) and (pointer: coarse) {
            .ricetta-card:hover {
                transform: none;
                box-shadow: none;
                background: var(--t-bg-card);
                border-color: var(--t-border-md);
            }
            .tab-button:hover {
                background: transparent;
                color: var(--t-muted);
            }
            
/* Active state al tap per feedback visivo */
            .ricetta-card:active {
                background: var(--t-bg-hover);
                transform: scale(0.98);
            }
            .tab-button:active {
                background: rgba(56,36,13,0.15);
            }
        }

        /* ── iOS Safe Area — notch, Dynamic Island, home bar ── */
        @supports (padding: max(0px)) {
            header {
                padding-top: max(0.6rem, env(safe-area-inset-top));
                padding-left: max(0.9rem, env(safe-area-inset-left));
                padding-right: max(0.9rem, env(safe-area-inset-right));
            }
            footer {
                padding-bottom: max(2rem, calc(1.2rem + env(safe-area-inset-bottom)));
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
            }
            main {
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
            }
            .recipe-modal-content {
                padding-bottom: max(1.5rem, calc(0.8rem + env(safe-area-inset-bottom)));
            }
        }

        .ricetta-card {
            background: var(--t-bg-card);
            border: 1px solid var(--t-border-md);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .ricetta-card:hover {
            transform: translateY(-8px);
            background: #BFA181;
            border-color: #BFA181;
            box-shadow: 0 12px 30px rgba(191,161,129,0.35);
        }

        .ricetta-image {
            width: 100%;
            aspect-ratio: 1;
            background: var(--t-tab-hover-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            position: relative;
            overflow: hidden;
        }

        .ricetta-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .ricetta-card:hover .ricetta-image::before {
            opacity: 1;
        }

        .ricetta-content {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
            flex-grow: 1;
        }

        .ricetta-category {
            display: inline-block;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--t-text);
            letter-spacing: 1.5px;
            width: fit-content;
        }

        .ricetta-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--t-text);
            line-height: 1.3;
        }

        .ricetta-description {
            font-size: 0.85rem;
            color: var(--t-text);
            line-height: 1.4;
            flex-grow: 1;
            opacity: 0;
            transition: opacity 0.4s ease;
            max-height: 0;
            overflow: hidden;
        }

        .ricetta-card:hover .ricetta-description {
            opacity: 1;
            max-height: 200px;
        }

        .ricetta-meta {
            display: flex;
            gap: 0.8rem;
            font-size: 0.75rem;
            color: var(--t-text);
            font-weight: 600;
            padding-top: 0.8rem;
            border-top: 1px solid var(--t-border-md);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes cardClose {
            from {
                opacity: 1;
                transform: scale(1);
            }
            to {
                opacity: 0;
                transform: scale(0.95);
            }
        }

        .ricetta-card.closing {
            animation: cardClose 0.3s ease-out forwards;
        }

        /* MODAL RICETTA */
        .recipe-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--t-overlay);
            backdrop-filter: blur(4px);
            z-index: 200;
            overflow-y: auto;
            animation: fadeIn 0.3s ease;
        }

        .recipe-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .recipe-modal-content {
            background: var(--t-bg-surface);
            border-radius: 16px;
            max-width: 700px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 3rem;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
            position: relative;
        }

        .recipe-modal-close {
            background: transparent;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--t-text);
            transition: color 0.3s ease, transform 0.2s ease;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 0;
        }

        .recipe-modal-close:hover {
            color: var(--t-gold);
            transform: scale(1.15);
        }

        .recipe-modal-header {
            margin-bottom: 2.5rem;
            padding-top: 0.5rem;
        }

        .recipe-modal-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.2rem;
            font-weight: 700;
            color: var(--t-text);
            margin-bottom: 0.5rem;
        }

        .recipe-modal-meta {
            display: flex;
            gap: 1.5rem;
            font-size: 0.9rem;
            color: var(--t-muted);
        }

        .recipe-section {
            margin-bottom: 2.5rem;
        }

        .recipe-section-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--t-gold);
            margin-bottom: 1rem;
            padding-bottom: 0.8rem;
            border-bottom: 1px solid rgba(56,36,13,0.4);
        }

        .ingredients-list {
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }

        .ingredient-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.8rem;
            background: var(--t-ingredient);
            border-radius: 8px;
            border-left: 3px solid #9B6E1E;
        }

        .ingredient-name {
            font-weight: 500;
            color: var(--t-text);
        }

        .ingredient-amount {
            font-weight: 700;
            color: var(--t-gold);
            font-size: 0.95rem;
        }

        .recipe-steps {
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
        }

        .recipe-step {
            display: flex;
            gap: 1rem;
        }

        .step-number {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            background: var(--t-bg-deep);
            color: var(--t-text);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
        }

        .step-content {
            color: var(--t-muted);
            line-height: 1.7;
            padding-top: 0.3rem;
        }

        footer {
            display: block;
            position: relative;
            width: 100%;
            box-sizing: border-box;
            background: var(--t-bg-deep);
            color: var(--t-text);
            padding: 3rem 2rem;
            margin-top: 6rem;
            border-top: 1px solid var(--t-border-md);
            z-index: 1;
        }

        .footer-collab {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            flex-wrap: wrap;
            margin-top: 0.75rem;
        }
        .footer-collab a {
            color: var(--t-text);
            text-decoration: none;
            transition: color 0.2s ease, background 0.2s ease;
        }
        .footer-collab a:hover {
            color: var(--t-gold);
            background: rgba(156,122,79,0.12);
        }
        .footer-collab span {
            color: rgba(42,30,20,0.72);
        }

        .footer-container {
            max-width: 1600px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 3rem;
            margin-bottom: 2rem;
        }

        .footer-section h3 {
            font-family: 'Playfair Display', serif;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--t-text);
        }

        .footer-section p {
            font-size: 0.9rem;
            color: rgba(42,30,20,0.80);
            line-height: 1.6;
        }

        .footer-socials {
            display: flex;
            gap: 1.5rem;
            margin-top: 1.2rem;
        }

        .footer-socials a {
            color: var(--t-text);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            transition: color 0.3s ease;
        }

        .footer-socials a:hover {
            color: var(--accent);
        }

        .footer-divider {
            border: 0;
            border-top: 1px solid rgba(240,232,213,0.2);
            margin: 2rem 0;
        }

        .footer-credit {
            text-align: center;
            font-size: 0.85rem;
            color: rgba(42,30,20,0.75);
        }

        /* Light theme — footer resta scuro ma testi leggibili */
        /* Collaborazione visit_sancataldo — light theme */
        /* Mobile — wrap pulito */
        @media (max-width: 768px) {
            .footer-collab {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 0.4rem !important;
            }
        }

        /* rimosso: gestito dai media query sopra */

        /* ── Nascondi il pulsante X su touch (la modal si chiude con swipe o tap overlay) ── */
        @media (hover: none) and (pointer: coarse) {
            .recipe-modal-close {
                display: none;
            }
            /* Indicatore visivo swipe-down */
            .recipe-modal-content::before {
                content: '';
                display: block;
                width: 40px;
                height: 4px;
                background: rgba(56,36,13,0.45);
                border-radius: 2px;
                margin: 0 auto 1.1rem;
            }
        }


        /* ═══════════════════════ CARD PRIVACY (stile ricette) ═══════════════════════ */
        .privacy-trigger-card {
            background: var(--t-bg-card);
            border: 1px solid rgba(56,36,13,0.25);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            max-width: 280px;
            user-select: none;
        }
        .privacy-trigger-card:hover {
            transform: translateY(-6px);
            background: var(--t-bg-hover);
            border-color: rgba(56,36,13,0.55);
            box-shadow: 0 10px 28px rgba(0,0,0,0.22);
        }
        .privacy-trigger-image {
            width: 100%;
            aspect-ratio: 1;
            background: var(--t-bg-surface2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
        }
        .privacy-trigger-content {
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }
        .privacy-trigger-content .ricetta-category { color: var(--t-gold); font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
        .privacy-trigger-content .ricetta-title { color: var(--t-text); font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; }
        .privacy-trigger-content .ricetta-description { color: rgba(255,255,255,0.75); font-size: 0.82rem; line-height: 1.5; }
        .privacy-trigger-content .ricetta-meta { display: flex; gap: 0.5rem; padding-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0.15); margin-top: auto; }
        .privacy-trigger-content .meta-item { font-size: 0.72rem; color: rgba(255,255,255,0.7); }

        /* Modal privacy — identico alle ricette */
        .privacy-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--t-overlay);
            backdrop-filter: blur(4px);
            z-index: 200;
            overflow-y: auto;
            animation: fadeIn 0.3s ease;
        }
        .privacy-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .privacy-modal-content {
            background: var(--t-bg-surface);
            border-radius: 16px;
            max-width: 700px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 2rem 2rem 2rem;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
            position: relative;
        }
        .privacy-modal-close {
            position: absolute;
            top: 1.5rem; right: 1.5rem;
            background: transparent;
            border: none;
            font-size: 1.8rem;
            cursor: pointer;
            color: var(--t-text);
            transition: color 0.3s ease;
            width: 40px; height: 40px;
            display: flex; align-items: center; justify-content: center;
        }
        .privacy-modal-close:hover { color: var(--t-gold); }
        .privacy-modal-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.6rem;
            color: var(--t-text);
            margin-bottom: 0.3rem;
            padding-right: 2.5rem;
        }
        .privacy-modal-subtitle {
            font-size: 0.82rem;
            color: var(--t-muted);
            margin-bottom: 1.8rem;
        }
        .privacy-row {
            display: flex;
            gap: 0.85rem;
            align-items: flex-start;
            padding: 1rem 0;
            border-bottom: 1px solid rgba(56,36,13,0.1);
        }
        .privacy-row:last-child { border-bottom: none; padding-bottom: 0; }
        .privacy-row:first-child { padding-top: 0; }
        .privacy-row-icon { font-size: 1.2rem; flex-shrink: 0; width: 26px; text-align: center; margin-top: 0.1rem; }
        .privacy-row-body { flex: 1; min-width: 0; }
        .privacy-row-body h3 {
            font-family: 'Playfair Display', serif;
            font-size: 0.95rem;
            color: var(--t-gold);
            margin-bottom: 0.35rem;
        }
        .privacy-row-body p, .privacy-row-body li {
            font-size: 0.82rem;
            color: rgba(42,30,20,0.75);
            line-height: 1.7;
        }
        .privacy-row-body ul { padding-left: 1rem; margin-top: 0.3rem; }
        .privacy-row-body li { margin-bottom: 0.18rem; }
        .privacy-row-body code {
            background: rgba(56,36,13,0.15);
            color: var(--t-gold-l);
            padding: 0.08rem 0.3rem;
            border-radius: 4px;
            font-size: 0.77rem;
        }
        .privacy-row-body a { color: var(--t-gold); text-decoration: underline; }
        .privacy-row-body a:hover { color: var(--t-gold-l); }
        .privacy-footer-note {
            margin-top: 1.5rem;
            background: rgba(56,36,13,0.07);
            border: 1px solid rgba(56,36,13,0.18);
            border-radius: 8px;
            padding: 0.9rem 1rem;
            font-size: 0.78rem;
            color: rgba(240,232,213,0.55);
            text-align: center;
            line-height: 1.65;
        }
        /* Mobile drawer per privacy modal */
        @media (max-width: 768px) {
            .privacy-modal { align-items: flex-end; }
            .privacy-modal-content {
                margin: 0; width: 100%; max-width: 100%;
                max-height: 88vh;
                border-radius: 20px 20px 0 0;
                padding: 1.4rem 1.1rem 1.8rem;
            }
            .privacy-modal-content::before {
                content: ''; display: block;
                width: 40px; height: 4px;
                background: rgba(56,36,13,0.4);
                border-radius: 2px;
                margin: 0 auto 1.2rem;
            }
        }
        @media (hover: none) and (pointer: coarse) {
            .privacy-trigger-card:hover { transform: none; box-shadow: none; background: var(--t-bg-card); }
            .privacy-trigger-card:active { transform: scale(0.98); background: var(--t-bg-hover); }
            .privacy-modal-close { display: none; }
        }

        /* ── Bottone Condividi ── */
        .recipe-modal-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.2rem;
        }
        .share-btn {
            background: rgba(56,36,13,0.12);
            border: 1px solid var(--t-border-md);
            color: var(--t-gold);
            border-radius: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.15s ease;
            font-size: 1.1rem;
        }
        .share-btn:hover {
            background: rgba(56,36,13,0.25);
            transform: scale(1.08);
        }
        .share-btn:active { transform: scale(0.95); }
        /* Toast feedback */
        .share-toast {
            position: fixed;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%) translateY(80px);
            background: var(--t-bg-card);
            color: var(--t-text);
            border: 1px solid rgba(56,36,13,0.4);
            border-radius: 10px;
            padding: 0.7rem 1.3rem;
            font-size: 0.85rem;
            z-index: 999;
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            pointer-events: none;
            white-space: nowrap;
        }
        .share-toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        @media (max-width: 768px) {
            .share-btn { width: 36px; height: 36px; font-size: 1rem; }
        }

        /* ═══════════════════════ PREFERITI ═══════════════════════ */
        .fav-btn {
            position: absolute;
            bottom: 0.55rem;
            right: 0.55rem;
            background: rgba(221,208,200,0.70);
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.82rem;
            cursor: pointer;
            transition: transform 0.2s ease, background 0.2s ease;
            z-index: 10;
            backdrop-filter: blur(6px);
            line-height: 1;
            padding: 0;
            flex-shrink: 0;
        }
        .fav-btn:hover { transform: scale(1.3); background: rgba(221,208,200,0.90); }
        @media (hover: none) and (pointer: coarse) {
            .fav-btn:hover { transform: none; background: rgba(221,208,200,0.70); }
            .fav-btn:active { transform: scale(1.3); }
        }
        @keyframes heartPop {
            0%   { transform: scale(1); }
            40%  { transform: scale(1.6); }
            70%  { transform: scale(0.88); }
            100% { transform: scale(1); }
        }
        .fav-btn.fav-pop { animation: heartPop 0.38s ease forwards; }

        .fav-count {
            font-size: 0.72em;
            color: var(--t-gold);
            margin-left: 0.15rem;
            font-weight: 600;
        }

        .fav-modal-btn {
            background: rgba(56,36,13,0.12);
            border: 1px solid var(--t-border-md);
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease, transform 0.2s ease;
            padding: 0;
            flex-shrink: 0;
        }
        .fav-modal-btn:hover { background: rgba(56,36,13,0.25); transform: scale(1.08); }

        .fav-empty {
            text-align: center;
            padding: 3rem 1rem 2rem;
            color: var(--t-muted);
            font-size: 0.95rem;
            line-height: 1.9;
            width: 100%;
        }
        .fav-empty-icon { font-size: 2.8rem; display: block; margin-bottom: 0.75rem; }
        /* ═══════════════════════ PORZIONI SLIDER ═══════════════════════ */
        .portions-widget {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(56,36,13,0.07);
            border: 1px solid var(--t-border);
            border-radius: 10px;
            padding: 0.75rem 1.1rem;
            margin-bottom: 1.8rem;
            overflow: hidden;
        }
        .portions-label {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.09em;
            color: var(--t-gold);
            white-space: nowrap;
            flex-shrink: 0;
        }
        .portions-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
            min-width: 0;
        }
        .portions-step {
            background: rgba(56,36,13,0.15);
            border: 1px solid rgba(56,36,13,0.35);
            color: var(--t-gold);
            font-size: 1.1rem;
            font-weight: 700;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            transition: background 0.2s, transform 0.15s;
            flex-shrink: 0;
            padding: 0;
        }
        .portions-step:hover  { background: rgba(56,36,13,0.35); transform: scale(1.12); }
        .portions-step:active { transform: scale(0.92); }
        .portions-slider {
            flex: 1;
            min-width: 80px;
            height: 4px;
            -webkit-appearance: none;
            appearance: none;
            background: var(--t-border);
            border-radius: 4px;
            outline: none;
            cursor: pointer;
        }
        .portions-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #9B6E1E;
            cursor: pointer;
            border: 2px solid var(--t-bg-deep);
            box-shadow: 0 0 0 3px rgba(155,110,30,0.25);
            transition: box-shadow 0.2s;
        }
        .portions-slider::-webkit-slider-thumb:hover {
            box-shadow: 0 0 0 5px rgba(155,110,30,0.35);
        }
        .portions-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #9B6E1E;
            cursor: pointer;
            border: 2px solid var(--t-bg-deep);
            box-shadow: 0 0 0 3px rgba(155,110,30,0.25);
        }
        .portions-slider::-moz-range-track {
            height: 4px;
            background: var(--t-border);
            border-radius: 4px;
        }
        .portions-display {
            font-family: 'Playfair Display', serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--t-gold);
            white-space: nowrap;
            min-width: 2.4rem;
            text-align: right;
            flex-shrink: 0;
        }
        /* Highlight ingredient amounts when scaled */
        .ingredient-amount.scaled {
            color: var(--t-gold-l);
            font-weight: 800;
        }
        @media (max-width: 768px) {
            .portions-widget { padding: 0.55rem 0.75rem; gap: 0.4rem; }
            .portions-label  { font-size: 0.7rem; letter-spacing: 0.05em; }
            .portions-slider { min-width: 0; }
            .portions-step   { width: 28px; height: 28px; font-size: 1rem; }
            .portions-display { font-size: 0.95rem; min-width: 2rem; }
        }
        /* ═══════════════════════ MODALITÀ IN CUCINA ═══════════════════════ */
        .cook-btn {
            background: rgba(56,36,13,0.12);
            border: 1px solid var(--t-border-md);
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
            padding: 0;
            flex-shrink: 0;
            position: relative;
        }
        .cook-btn:hover { background: rgba(56,36,13,0.25); transform: scale(1.08); }
        .cook-btn.active {
            background: rgba(56,36,13,0.22);
            border-color: var(--t-gold);
            box-shadow: 0 0 0 3px rgba(155,110,30,0.25);
        }
        /* Pulse ring quando attiva */
        @keyframes cookPulse {
            0%   { box-shadow: 0 0 0 0   var(--t-border-hi); }
            70%  { box-shadow: 0 0 0 8px rgba(56,36,13,0); }
            100% { box-shadow: 0 0 0 0   rgba(56,36,13,0); }
        }
        .cook-btn.active { animation: cookPulse 2.5s ease-out infinite; }

        /* Banner "In cucina" visibile sopra il titolo */
        .cook-banner {
            display: none;
            align-items: center;
            gap: 0.5rem;
            background: var(--t-ingredient);
            border: 1px solid var(--t-border-md);
            border-radius: 8px;
            padding: 0.45rem 0.9rem;
            margin-bottom: 1.2rem;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--t-gold);
            letter-spacing: 0.04em;
        }
        .cook-banner.visible { display: flex; }
        .cook-banner-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: #9B6E1E;
            flex-shrink: 0;
            animation: cookPulse 1.8s ease-out infinite;
        }
        .cook-wakelockoff {
            font-size: 0.72rem;
            color: var(--t-muted);
            font-weight: 400;
            margin-left: auto;
        }

        /* Scaling del contenuto in cooking mode */
        .cooking-mode .recipe-modal-title    { font-size: 1.65rem; }
        .cooking-mode .recipe-modal-meta     { font-size: 1.05rem; gap: 1.4rem; flex-wrap: wrap; }
        .cooking-mode .recipe-section-title  { font-size: 1.2rem; }
        .cooking-mode .ingredient-name       { font-size: 1.05rem; }
        .cooking-mode .ingredient-amount     { font-size: 1.05rem; }
        .cooking-mode .ingredient-item       { padding: 1rem 1.1rem; }
        .cooking-mode .step-content          { font-size: 1.08rem; line-height: 1.85; }
        .cooking-mode .step-number           { width: 36px; height: 36px; font-size: 0.95rem; flex-shrink: 0; }
        .cooking-mode .recipe-step           { gap: 1.2rem; }
        .cooking-mode .recipe-section        { margin-bottom: 2.8rem; }
        .cooking-mode .portions-label        { font-size: 0.85rem; }
        .cooking-mode .portions-display      { font-size: 1.2rem; }
        .cooking-mode p[style]               { font-size: 1.02rem !important; line-height: 1.8 !important; }

        @media (max-width: 768px) {
            .cook-btn { width: 36px; height: 36px; font-size: 1rem; }
            .cooking-mode .recipe-modal-title   { font-size: 1.35rem; }
            .cooking-mode .step-content         { font-size: 1rem; }
            .cooking-mode .ingredient-name,
            .cooking-mode .ingredient-amount    { font-size: 1rem; }
        }

        /* ══════════════ THEME-AWARE OVERRIDES ══════════════ */

        /* Header */
        header {
            background: rgba(var(--t-header-rgb, 15,12,8), 0.97);
        }

        /* Hero */

        /* Bio */

        /* Cards */

        /* Sidebar tabs */

        /* Recipe modal */

        /* Portions widget */

        /* Cook banner & modal buttons */

        /* Chi sono modal */

        /* Privacy modal */

        /* Preferiti empty state */

        /* Toast */

        /* ── Toggle button ── */
        /* ══════════════════════════════════════════════════ */
        /* ═══════════════════════ COOKIE BANNER ═══════════════════════ */
        #cookieBanner {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 9999;
            background: #DDD0C8;
            border-top: 1px solid rgba(221,208,200,0.85);
            padding: 1.2rem 2rem;
            box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
            display: flex;
            align-items: center;
            gap: 1.5rem;
            flex-wrap: wrap;
        }
        #cookieBanner.show {
            transform: translateY(0);
        }
        /* Pill indicatore in cima */
        #cookieBanner::before {
            content: '';
            position: absolute;
            top: 0.55rem;
            left: 50%;
            transform: translateX(-50%);
            width: 36px;
            height: 3px;
            background: rgba(191,161,129,0.25);
            border-radius: 2px;
        }
        .cookie-text {
            flex: 1;
            min-width: 220px;
        }
        .cookie-title {
            font-family: 'Lora', Georgia, serif;
            font-size: 0.95rem;
            font-weight: 700;
            color: #2A1E14;
            margin-bottom: 0.3rem;
        }
        .cookie-desc {
            font-size: 0.78rem;
            color: #7A6040;
            line-height: 1.55;
        }
        .cookie-desc a {
            color: #9B6E1E;
            text-decoration: underline;
            cursor: pointer;
        }
        .cookie-actions {
            display: flex;
            gap: 0.6rem;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .cookie-btn-accept {
            background: #9B6E1E;
            color: #FFFDF2;
            border: none;
            border-radius: 8px;
            padding: 0.55rem 1.2rem;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: background 0.2s;
            white-space: nowrap;
        }
        .cookie-btn-accept:hover { background: #C8973A; }
        .cookie-btn-reject {
            background: transparent;
            color: #7A6040;
            border: 1px solid rgba(221,208,200,0.85);
            border-radius: 8px;
            padding: 0.55rem 1.2rem;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: color 0.2s, border-color 0.2s;
            white-space: nowrap;
        }
        .cookie-btn-reject:hover { color: #2A1E14; border-color: #9B6E1E; }
        @media (max-width: 768px) {
            #cookieBanner { padding: 1.3rem 1rem 1.6rem; gap: 1rem; }
            .cookie-actions { width: 100%; }
            .cookie-btn-accept, .cookie-btn-reject { flex: 1; text-align: center; }
        }
        /* ═══════════════════════ RICERCA ISTANTANEA ═══════════════════════ */
        .search-wrapper {
            max-width: 600px;
            margin: 2rem auto 2rem;
            padding: 0 1rem;
        }
        .search-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
        }
        .cultura-btn {
            background: rgba(56,36,13,0.1);
            border: 1px solid var(--t-border-md);
            border-radius: 12px;
            color: var(--t-gold);
            font-size: 0.82rem;
            font-weight: 700;
            padding: 0.65rem 0.9rem;
            cursor: pointer;
            white-space: nowrap;
            font-family: inherit;
            transition: background 0.2s, transform 0.15s;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .cultura-btn:hover { background: rgba(56,36,13,0.22); transform: scale(1.04); }
        .cultura-btn:active { transform: scale(0.96); }
        /* Nascosto su mobile — accessibile dal tab sidebar */
        @media (max-width: 1024px) {
            .cultura-btn { display: none; }
            .cultura-sidebar-btn { display: block !important; }
        }
        /* Su desktop — mostra solo il bottone affianco alla search, nascondi dalla sidebar */
        @media (min-width: 1025px) {
            .cultura-sidebar-btn { display: none !important; }
        }
        @media (max-width: 768px) {
            .cultura-btn-label { display: inline; }
        }
        .search-box {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            background: var(--t-bg-card);
            border: 1px solid var(--t-border-md);
            border-radius: 12px;
            padding: 0.65rem 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .search-box:focus-within {
            border-color: var(--t-gold);
            box-shadow: 0 0 0 3px rgba(155,110,30,0.25);
        }
        .search-icon {
            color: var(--t-muted);
            flex-shrink: 0;
        }
        .search-input {
            flex: 1;
            background: none;
            border: none;
            outline: none;
            color: var(--t-text);
            font-size: 0.95rem;
            font-family: inherit;
            min-width: 0;
        }
        .search-input::placeholder { color: var(--t-muted); opacity: 0.7; }
        .search-input::-webkit-search-cancel-button { display: none; }
        .search-clear {
            background: none;
            border: none;
            color: var(--t-muted);
            cursor: pointer;
            font-size: 0.8rem;
            padding: 0 0.2rem;
            flex-shrink: 0;
            transition: color 0.2s;
        }
        .search-clear:hover { color: var(--t-text); }
        .search-results {
            margin-top: 1.2rem;
        }
        .search-results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 1rem;
        }
        .search-no-results {
            text-align: center;
            padding: 2.5rem 1rem;
            color: var(--t-muted);
            font-size: 0.95rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
        }
        .search-no-results span { font-size: 2rem; }
        /* Evidenzia testo trovato */
        .search-highlight {
            background: rgba(56,36,13,0.25);
            border-radius: 2px;
            padding: 0 1px;
        }
        @media (max-width: 768px) {
            .search-wrapper { margin: 1rem auto 1.2rem; padding: 0 0.2rem; }
            .search-results-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
        }
        /* ═══════════════════════ CUCINA & CULTURA BLOG ═══════════════════════ */
        .blog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }
        .blog-card {
            background: var(--t-bg-card);
            border: 1px solid var(--t-border);
            border-radius: 14px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
            display: flex;
            flex-direction: column;
        }
        .blog-card:hover {
            border-color: var(--t-gold);
            box-shadow: 0 8px 28px rgba(56,36,13,0.15);
            transform: translateY(-4px);
        }
        .blog-card-emoji {
            width: 100%;
            aspect-ratio: 16/7;
            background: linear-gradient(135deg, #DDD0C8 0%, #F2EBE2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3.5rem;
            border-bottom: 1px solid var(--t-border);
        }
        .blog-card-content {
            padding: 1.2rem 1.4rem 1.4rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            flex: 1;
        }
        .blog-card-tag {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--t-gold);
        }
        .blog-card-title {
            font-family: 'Lora', Georgia, serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--t-text);
            line-height: 1.35;
        }
        .blog-card-excerpt {
            font-size: 0.82rem;
            color: var(--t-muted);
            line-height: 1.6;
            flex: 1;
        }
        .blog-card-meta {
            display: flex;
            gap: 1rem;
            font-size: 0.72rem;
            color: var(--t-muted);
            opacity: 0.75;
            padding-top: 0.6rem;
            border-top: 1px solid var(--t-border);
            margin-top: auto;
        }

        /* Blog modal body */
        .blog-modal-header {
            margin-bottom: 2rem;
            padding-top: 0.5rem;
        }
        .blog-modal-tag {
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--t-gold);
            display: block;
            margin-bottom: 0.6rem;
        }
        .blog-modal-meta {
            display: flex;
            gap: 1.2rem;
            font-size: 0.82rem;
            color: var(--t-muted);
            margin-top: 0.5rem;
            flex-wrap: wrap;
        }
        .blog-modal-body {
            line-height: 1.85;
            color: var(--t-muted);
            font-size: 0.95rem;
            overflow-x: hidden;
            overflow-y: visible;
            width: 100%;
            box-sizing: border-box;
        }
        .blog-modal-body p {
            margin-bottom: 1.2rem;
        }
        .blog-modal-body strong { color: var(--t-text); }
        .blog-modal-body em { color: var(--t-gold); font-style: italic; }
        .blog-section-title {
            font-family: 'Lora', Georgia, serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--t-gold);
            margin: 1.8rem 0 0.8rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--t-border);
        }
        .blog-footer-note {
            background: rgba(56,36,13,0.07);
            border: 1px solid var(--t-border);
            border-radius: 8px;
            padding: 0.85rem 1rem;
            font-size: 0.8rem;
            color: var(--t-muted);
            margin-top: 1.8rem;
            text-align: center;
        }
        @media (max-width: 768px) {
            .blog-grid { grid-template-columns: 1fr; gap: 1rem; }
            .blog-card-emoji { aspect-ratio: 16/6; font-size: 2.5rem; }
        }


        /* Blog images */
        .blog-img {
            display: block;
            width: 65%;
            max-width: 280px;
            margin: 1rem auto;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid rgba(56,36,13,0.2);
            box-sizing: border-box;
        }
        .blog-img img {
            width: 100%;
            display: block;
            height: 160px;
            object-fit: cover;
            object-position: center;
        }
        .blog-img figcaption {
            display: block;
            padding: 0.3rem 0.5rem;
            font-size: 0.62rem;
            color: rgba(168,144,112,0.85);
            background: transparent;
            text-align: center;
            font-family: 'Cedarville Cursive', cursive;
            font-style: normal;
        }
        
/* ═══════════════════════════════════════════════ */
/* ═══════════════ HEADER CLEAN ═══════════════ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,253,242,0.97);
    border-bottom: 1px solid rgba(191,161,129,0.15);
    padding: 0.7rem 1rem;
    backdrop-filter: blur(8px);
}
.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    gap: 0.85rem;
    min-height: 80px;
}
/* Visibilità desktop/mobile */
.desktop-only { display: flex !important; }
.mobile-only  { display: none !important; }
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only  { display: inline-flex !important; }
}
.logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    min-width: 0;
}
.logo-image {
    width: 64px; height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.logo-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-text-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
}
.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2A1E14;
    white-space: nowrap;
    letter-spacing: -0.3px;
    line-height: 1.15;
}
.logo-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(200,151,58,0.85);
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1;
}
/* Header right — desktop */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(56,36,13,0.14);
    border-radius: 12px;
    color: #7A6040;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    text-decoration: none;
    flex-shrink: 0;
}
.header-icon-btn svg {
    display: block;
    width: 18px;
    height: 18px;
}
.header-icon-btn:hover {
    background: rgba(156,122,79,0.14);
    color: #C8973A;
    transform: translateY(-1px);
}
/* Hamburger — sempre visibile per avere un solo accesso al drawer */
.hamburger-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 101;
}
/* Tema chiaro: inverte il colore dello stroke via filter */
.hamburger-icon-svg {
    display: block;
    width: 40px;
    height: 35px;
    flex-shrink: 0;
    overflow: visible;
    background: none;
    transition: opacity 0.22s ease;
}
/* Spans — nascosti di default, diventano ✕ quando .open */
.hamburger-btn span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #2A1E14;
    border-radius: 999px;
    transition: transform 0.28s ease, opacity 0.2s ease;
    transform-origin: center;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
/* Quando .open: nasconde SVG, mostra ✕ */
.hamburger-btn.open .hamburger-icon-svg {
    opacity: 0;
    pointer-events: none;
}
.hamburger-btn.open span {
    opacity: 1;
    pointer-events: auto;
}
.hamburger-btn.open span:nth-child(2) { transform: rotate(45deg); }
.hamburger-btn.open span:nth-child(3) { opacity: 0; }
.hamburger-btn.open span:nth-child(4) { transform: rotate(-45deg); }
/* ──────────────── MOBILE ──────────────── */
@media (max-width: 1024px) {
    header { padding: 0.7rem 0.85rem; }
    /* Logo centrato e ingrandito su mobile */
    .header-container {
        position: relative;
        gap: 0.65rem;
        min-height: 110px;
    }
    .hamburger-btn {
        width: 44px;
        height: 44px;
    }
    .hamburger-icon-svg {
        width: 40px;
        height: 34px;
    }
    .logo-container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        flex: 0 0 auto !important;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        cursor: pointer;
    }
    .logo-text-wrap {
        align-items: center;
        text-align: center;
    }
    .logo-text { font-size: 1.15rem; }
    .logo-tagline { font-size: 0.7rem; }
    .logo-image { width: 56px; height: 56px; }
}
@media (max-width: 375px) {
    .logo-text { font-size: 1rem; }
    .logo-tagline { font-size: 0.62rem; }
    .logo-image { width: 48px; height: 48px; }
    .hamburger-btn { width: 40px; height: 40px; }
    .hamburger-icon-svg { width: 36px; height: 30px; }
    .header-container { min-height: 100px; }
}
/* ════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   DIFESA: nessun pseudo-elemento ::after può iniettare contenuti su
   link di header, footer, drawer mobile, hero e card ricetta — usato
   come barriera contro fogli di stile di terze parti, estensioni del
   browser, o regole stampa accidentalmente lasciate fuori scope.
   ═══════════════════════════════════════════════════════════════════ */
@media screen {
  header a[href]::after,
  header a[href]::before,
  footer a[href]::after,
  footer a[href]::before,
  #mobileDrawer a[href]::after,
  #mobileDrawer a[href]::before,
  .footer-section a[href]::after,
  .footer-section a[href]::before,
  .footer-collab a[href]::after,
  .footer-collab a[href]::before,
  .footer-socials a[href]::after,
  .footer-socials a[href]::before,
  .header-icon-btn::after,
  .header-icon-btn::before,
  .header-social-btn::after,
  .header-social-btn::before {
    content: none !important;
    display: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   @media print — Stampa ricetta
   Nasconde tutto tranne il contenuto del modal aperto.
   Ottimizzato per A4: max 800px, link visibili, colori su bianco.
   ═══════════════════════════════════════════════════════════════════ */
@media print {

  /* ── Reset colori e font per stampa ─────────────────────────── */
  *, *::before, *::after {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Nascondi tutto ciò che non serve in stampa ─────────────── */
  .site-header,
  .site-hero,
  .recipes-section,
  .recipes-sidebar,
  .tab-buttons,
  .tab-button,
  .tab-content,
  .recipe-modal-close,
  .recipe-modal-actions,
  .portions-widget,
  .cook-btn,
  .fav-btn,
  .search-bar,
  .back-to-top,
  .cookie-banner,
  .privacy-modal,
  .chi-sono-modal,
  .share-toast,
  .blog-modal {
    display: none !important;
  }

  /* ── Mostra solo il modal aperto durante la stampa ──────────── */
  .recipe-modal[style*="display: flex"] {
    display: flex !important;
    position: static !important;
    z-index: auto !important;
  }

  .recipe-modal-content {
    max-width: 800px !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* ── Ottimizza dimensioni per A4 ──────────────────────────── */
  body {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .recipe-modal {
    width: 100% !important;
    height: auto !important;
  }

  /* ── Font di stampa leggibili ────────────────────────────── */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  p, li {
    page-break-inside: avoid;
  }

  .ingredients-list, .recipe-steps {
    page-break-inside: avoid;
  }

  #cookieBanner,
  footer,
  nav,
  [aria-label*="menu"],
  [aria-label*="ricerca"],
  noscript {
    display: none !important;
  }

/* ════════════════════════════════════════════════════════════════════ */

  /* ── Apri il modal come documento piatto ─────────────────────── */
  .recipe-modal {
    display: block !important;
    position: static !important;
    overflow: visible !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: auto !important;
  }

  /* Nascondi i modal NON attivi */
  .recipe-modal:not(.active) {
    display: none !important;
  }

  .recipe-modal-content {
    position: static !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 1.5rem !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    max-height: none !important;
  }

  /* ── Tipografia ottimizzata per stampa ───────────────────────── */
  .recipe-modal-title {
    font-size: 22pt !important;
    margin-bottom: 0.5rem !important;
  }

  .recipe-modal-meta {
    font-size: 10pt !important;
    margin-bottom: 1rem !important;
    border-bottom: 1pt solid #ccc !important;
    padding-bottom: 0.5rem !important;
  }

  .recipe-section-title {
    font-size: 13pt !important;
    margin-top: 1rem !important;
    border-bottom: 0.5pt solid #999 !important;
    padding-bottom: 2pt !important;
  }

  /* ── Ingredienti: lista compatta ─────────────────────────────── */
  .ingredient-list,
  .ingredients-list {
    column-count: 2 !important;
    column-gap: 1.5rem !important;
    font-size: 10pt !important;
  }

  .ingredient-item,
  .ingredient-row {
    break-inside: avoid !important;
    padding: 2pt 0 !important;
  }

  /* ── Passi: visibili e numerati ──────────────────────────────── */
  .recipe-steps {
    font-size: 10pt !important;
    line-height: 1.6 !important;
  }

  .step-item, .step {
    margin-bottom: 0.5rem !important;
    break-inside: avoid !important;
  }

  /* ── Immagini: mantieni, ma limita ───────────────────────────── */
  img {
    max-width: 100% !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }

  /* ── Link visibili in stampa (solo dentro la ricetta) ────────── */
  .recipe-modal-content a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555 !important;
  }

  .recipe-modal-content a[href^="#"]::after,
  .recipe-modal-content a[href^="javascript"]::after,
  .recipe-modal-content a[href^="mailto"]::after,
  .recipe-modal-content a[href^="tel"]::after {
    content: "" !important;
  }

  /* ── Footer di stampa con URL sito ──────────────────────────── */
  .recipe-modal-content::after {
    content: "incucinaconangelone.com";
    display: block !important;
    margin-top: 2rem !important;
    padding-top: 0.5rem !important;
    border-top: 0.5pt solid #ccc !important;
    font-size: 8pt !important;
    color: #777 !important;
    text-align: center !important;
  }

  /* ── Evita interruzioni di pagina in punti critici ───────────── */
  h1, h2, h3 { break-after: avoid !important; }
  table, figure, .step-item { break-inside: avoid !important; }
  body { margin: 0 !important; }

} /* ← fine @media print */

/* ════════════════════════════════════════════════════════
   Responsive polish e migliorie estetiche globali
   ═══════════════════════════════════════════════════════ */

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-size: clamp(0.95rem, 1vw + 0.2rem, 1.05rem);
  line-height: 1.65;
  min-height: 100vh;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  line-height: 1.4;
}

button, .tab-button, .recipe-modal-close, .share-btn, .cook-btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

button:hover, .tab-button:hover, .recipe-modal-close:hover, .share-btn:hover, .cook-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

main {
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.hero {
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.hero h1 {
  max-width: 12ch;
}

.recipes-sidebar {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 36, 13, 0.15) transparent;
}

.recipes-sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.recipes-sidebar::-webkit-scrollbar-thumb {
  background: rgba(56, 36, 13, 0.15);
  border-radius: 999px;
}

.recipes-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.recipe-modal-content {
  width: min(100%, 900px);
  max-width: min(95vw, 900px);
  margin-inline: auto;
}

@media (max-width: 1024px) {
  .recipes-sidebar {
    margin-inline: -0.75rem;
    padding: 0.75rem 0.75rem 1rem;
  }
  .tab-button {
    min-height: 48px;
  }
  .ricette-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .recipes-sidebar {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
  .recipes-section {
    gap: 1rem;
  }
  .ricette-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }
  .recipe-modal-content {
    padding: 1.4rem 1.1rem 1.6rem;
  }
  .footer-container {
    gap: 1.2rem;
  }
  .recipe-modal-close {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 420px) {
  .tab-button {
    font-size: 0.72rem;
    padding: 0.48rem 0.35rem;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 1.95rem);
  }
  .hero p,
  .section-title {
    letter-spacing: normal;
  }
  .recipe-modal-content {
    border-radius: 1.2rem;
    padding: 1rem 0.9rem 1.4rem;
  }
}
