
:root {
    --bg-dark: #1a1a1a;
    --bg-light-section: #fdfdfd;
    --text-dark: #222;
    --text-light: #e0e0e0;
    --border-light: #eee;
    --border-dark: #444;
    
    /* Barra Mobile */
    --sticky-nav-height: 55px;
    --sticky-nav-bg: rgba(50, 50, 50, 0.95);
    --sticky-nav-link-color: #e0e0e0;
    --sticky-nav-bottom-margin: 15px;
    
    /* Popup */
    --popup-bg: rgba(50, 50, 50, 0.96);
    --popup-text: #e8e8e8;
    --popup-title-color: #ffffff;
    --popup-border: #666;
    --popup-prep-title: #bdbdbd;
    --popup-prep-text: #d0d0d0;
    --popup-toggle-btn-color: #bdbdbd;
    --popup-toggle-btn-hover: #ffffff;
    --popup-close-btn-color: #e0e0e0;
}

html { 
    scroll-padding-bottom: calc(var(--sticky-nav-height) + var(--sticky-nav-bottom-margin) + 10px); 
    scroll-behavior: smooth; 
}

body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    background-color: var(--bg-dark); 
    color: var(--text-light); 
    line-height: 1.5; 
    font-size: 16px; 
    padding-bottom: calc(var(--sticky-nav-height) + var(--sticky-nav-bottom-margin)); 
}

main { padding: 0 20px; }

header { 
    text-align: center; margin-bottom: 25px; padding-bottom: 30px; 
    position: relative; width: 100%; min-height: 190px; 
    background-size: cover; background-position: center; background-repeat: no-repeat; 
    background-image: url('https://bar-menu.github.io/Nuovo-2.jpg'); 
}
header::after { 
    content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 95%; 
    background: linear-gradient(to bottom, transparent 0%, rgba(26,26,26,0.9) 90%, var(--bg-dark) 99%); 
}
header h1 { 
    font-family: 'Poppins', sans-serif; font-size: 1.9em; color: var(--text-light); 
    margin: 0; font-weight: 600; position: absolute; bottom: 20px; left: 50%; 
    transform: translateX(-50%); z-index: 1; text-shadow: 1px 1px 4px rgba(0,0,0,0.8); 
    white-space: nowrap; 
}


/* --- LINGUA (Stile Minimal Invisibile) --- */
#lang-switch { 
    position: absolute; top: 25px; right: 20px; z-index: 10; 
    font-size: 0.9em; 
    /* Niente sfondo, niente bordi, solo testo puro */
    background: transparent;
    display: flex; align-items: center; gap: 5px;
}

.lang-btn { 
    background: none; border: none; padding: 0; cursor: pointer; 
    font-family: 'Inter', sans-serif; font-weight: 500; 
    color: rgba(255, 255, 255, 0.5); /* Grigio spento per quella non attiva */
    transition: color 0.3s; 
}

.lang-btn.active { 
    color: #fff; /* Bianco sparato per quella attiva */
    font-weight: 700; 
    text-decoration: underline; 
    text-underline-offset: 4px;
}

.lang-separator { 
    color: rgba(255, 255, 255, 0.3); 
    margin: 0 2px; 
    font-weight: 300; 
}

section { 
    position: relative; /* Serve per posizionare l'icona assoluta dentro */
    overflow: hidden;   /* Taglia l'icona se esce dai bordi arrotondati */
    z-index: 1;         /* Assicura che il testo stia sopra */
    margin-bottom: 40px; background-color: var(--bg-light-section); 
    padding: 25px; border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); color: var(--text-dark); 
}

/* 2. Il Titolo (Senza riga, più leggero) */
/* TITOLO DI SEZIONE (Stile Pulito) */
section h2 {
    font-family: 'Merriweather', serif; 
    font-size: 2.0em; 
    color: var(--text-dark); 
    
    /* Allineamento */
    display: block;
    text-align: center; 
    
    margin-top: 15px; 
    margin-bottom: 20px; 
    
    /* Nessuna riga sotto, lascia spazio all'icona */
    border-bottom: none; 
    padding-bottom: 5px; 
    
    font-weight: 700;
    position: relative; /* Fondamentale per l'icona */
}

/* ICONA SFONDO (Stile Magazine/Watermark) */
section h2::before {
    content: "";
    position: absolute;
    
    /* POSIZIONAMENTO (Sborda a sinistra) */
    top: -30px;
    left: -40px;
    
    /* DIMENSIONI GRANDI */
    width: 130px;
    height: 130px;
    
    background: linear-gradient(160deg, #d9534f 0%, #ff9a3359 100%);
    opacity: 0.15; /* Leggermente più visibile perché ruotata */
    
    
    /* ROTAZIONE */
    transform: rotate(-15deg);
    
    z-index: -1;
    pointer-events: none;
    
    /* MASCHERA SVG */
    z-index: -1; pointer-events: none;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
    margin: 0;
}

ul { list-style: none; padding: 0; margin: 0; }
li.menu-item { 
    display: flex; justify-content: space-between; flex-wrap: wrap; 
    align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--border-light); 
    padding-right: 15px; 
}
li.menu-item:last-child { border-bottom: none; }
li.menu-item:hover:not(.spirit-item) { background-color: #f5f5f5; transition: background-color 0.2s; }
.spirit-item { cursor: pointer; }
.spirit-item:hover { background-color: #ededed; transition: background-color 0.2s; }

.item-name { flex-grow: 1; padding-right: 15px; font-weight: 600; color: var(--text-dark); font-size: 1.1em; }

.item-price { 
    color: var(--text-dark); white-space: nowrap; font-weight: 700; 
    text-align: right; margin-left: auto; 
}

.item-price-multi { 
    display: flex; flex-direction: column; align-items: flex-end; 
    text-align: right; font-weight: 700; font-size: 0.9em; 
    color: var(--text-dark); margin-left: auto; line-height: 1.3;
}

.item-description { 
    display: block; width: 100%; font-size: 0.88em; color: #666; 
    margin-top: 5px; line-height: 1.4; padding-left: 0;
}

/* Stile Panini */
li.info-item { border-bottom: none; padding: 10px 0; flex-direction: column; align-items: flex-start; }
li.info-item .item-name { font-size: 1.0em; color: #333; margin-bottom: 2px; width: 100%; }
li.info-item .item-description { font-size: 0.9em; color: #666; margin-top: 0; line-height: 1.4; }



/* --- NAVIGAZIONE STICKY (Versione FIGA: Blur + X Centrata + Link Interi) --- */
#quick-nav-mobile-sticky { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    
    /* IL TOCCO DI CLASSE (BLUR) REINSERITO: */
    background-color: rgba(40, 40, 40, 0.85); /* Semitrasparente */
    backdrop-filter: blur(12px);              /* Sfocatura sfondo */
    -webkit-backdrop-filter: blur(12px);      /* Sfocatura per iPhone */
    border-top: 1px solid rgba(255,255,255,0.1); /* Righettina sottile sopra */
    
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2); z-index: 999; 
    display: flex; align-items: center; height: var(--sticky-nav-height); 
    overflow: hidden; padding: 0; 
}

#sticky-search-container { 
    display: flex; align-items: center; 
    position: static; flex-shrink: 0; height: 100%; 
    padding-left: 10px; 
}

#sticky-search-trigger { 
    background: none; border: none; color: var(--sticky-nav-link-color); 
    font-size: 1.2em; padding: 0; cursor: pointer; 
    width: 40px; height: 40px; z-index: 20; 
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transition: color 0.2s ease; 
}

/* X rossa centrata perfettamente */
#quick-nav-mobile-sticky.search-active #sticky-search-trigger { 
    color: #d9534f; 
    position: absolute; 
    left: 10px; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
}
#quick-nav-mobile-sticky.search-active #sticky-search-trigger i::before { content: "\f00d"; font-weight: 900; } 

#sticky-search-input { 
    width: 0; opacity: 0; visibility: hidden; border: none; 
    background: transparent; color: var(--text-light); 
    font-size: 16px; font-family: 'Inter', sans-serif; 
    position: absolute; left: 20px; 
    top: 50%; transform: translateY(-50%); 
    z-index: 10; border-radius: 20px; height: 38px; outline: none; padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#quick-nav-mobile-sticky.search-active #sticky-search-input { 
    width: calc(100vw - 20px); left: 10px !important; opacity: 1; visibility: visible; 
    background: #333; padding: 0 15px 0 45px; box-sizing: border-box; 
}

#quick-nav-mobile-sticky.search-active .sticky-nav-links-wrapper { opacity: 0; pointer-events: none; }

.sticky-nav-links-wrapper { 
    flex-grow: 1; overflow-x: auto; white-space: nowrap; 
    display: flex; align-items: center; margin-left: 5px; padding-right: 10px;
    height: 100%; 
}
.sticky-nav-links-wrapper::-webkit-scrollbar { display: none; }

#quick-nav-mobile-sticky ul { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; align-items: center; }

#quick-nav-mobile-sticky a { 
    color: var(--sticky-nav-link-color); text-decoration: none; font-size: 0.9em; 
    padding: 6px 12px; /* Margine interno per non tagliare il testo */
    border-radius: 15px; 
    transition: background-color 0.2s, color 0.2s; 
    display: inline-flex; align-items: center; line-height: 1; 
}
#quick-nav-mobile-sticky a:hover, #quick-nav-mobile-sticky a:focus { 
    background-color: rgba(255,255,255,0.15); color: #fff; 
}



footer { text-align: center; margin-top: 50px; padding: 25px 20px; border-top: 1px solid var(--border-dark); font-size: 0.85em; color: #999; }
footer nav#quick-nav { margin: 0 0 30px 0; padding: 0 10px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 15px; }
footer nav#quick-nav a { display: inline-block; padding: 3px 5px; color: #b0b0b0; text-decoration: none; font-size: 0.9em; }
footer nav#quick-nav a:hover { color: #fff; text-decoration: underline; }

/* LOGO FOOTER */
.footer-logo {
    display: block;           /* Fondamentale per centrarlo */
    max-width: 120px;         /* Larghezza massima: giocati questo numero se lo vuoi più grande/piccolo */
    height: auto;             /* Mantiene le proporzioni, non lo stira */
    margin: 0 auto 20px auto; /* 0 sopra, Auto (centro) lati, 20px sotto */
    
    /* Tocco di classe opzionale: */
    opacity: 0.8;             /* Leggermente meno "sparato", più elegante */
}


/* POPUP */
#gin-description-popup { 
    position: fixed; 
    bottom: calc(var(--sticky-nav-height) + var(--sticky-nav-bottom-margin)); 
    left: 15px; right: 15px; max-width: 450px; margin: auto; 
    background-color: var(--popup-bg); color: var(--popup-text); 
    border-radius: 8px; padding: 22px; padding-right: 35px;
    z-index: 1100; opacity: 0; visibility: hidden; 
    transform: translateY(20px); transition: all 0.3s ease; 
    box-shadow: 0 6px 25px rgba(0,0,0,0.45); 
    backdrop-filter: blur(6px);
}
#gin-description-popup.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.popup-content { position: relative; }

#popup-product-name { 
    color: var(--popup-title-color); border-bottom: 1px solid var(--popup-border); 
    margin: 0 0 12px 0; padding-bottom: 10px; 
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1.25em; 
    padding-right: 45px;
}
#popup-product-description { font-size: 0.95em; line-height: 1.55; margin-bottom: 15px; color: var(--popup-text); }

/* X DI CHIUSURA (La tua versione custom) */
#popup-close-btn { 
    position: absolute; 
    top: -24px;      
    right: -16px; 
    background: none; border: none; 
    padding: 16px; 
    margin: 0;
    display: block; 
    color: var(--popup-close-btn-color); 
    font-family: 'Inter', sans-serif; 
    font-size: 2.5rem; 
    font-weight: 400; 
    line-height: 1; 
    cursor: pointer; opacity: 0.8; z-index: 100;
}
#popup-close-btn:hover { opacity: 1; color: #fff; }

#toggle-prep-btn { 
    background: none; border: none; color: var(--popup-toggle-btn-color); 
    cursor: pointer; width: 100%; text-align: left; padding: 8px 0; font-size: 0.9em; font-weight: 600; 
}
#toggle-prep-btn:hover { color: var(--popup-toggle-btn-hover); }

#popup-preparation-container {
    margin-top: 10px; padding: 15px; border-radius: 4px;
    border-top: 1px dashed var(--popup-border);
    background-color: rgba(0,0,0,0.1); display: none;
}
#popup-preparation-container h5 { margin: 0 0 10px 0; color: var(--popup-prep-title); text-transform: uppercase; font-size: 0.85em; }
#popup-preparation-text { font-size: 0.9em; color: var(--popup-prep-text); margin-bottom: 10px; }

/* No Results */
#no-results { display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 20px; min-height: 200px; }
#no-results h2 { font-family: 'Merriweather', serif; font-size: 2em; margin-bottom: 20px; border-bottom: 1px solid var(--border-light); padding-bottom: 15px; width: 100%; text-align: center; display: block; }
#no-results p { font-size: 1.1em; color: #555; margin: 5px 0; max-width: 80%; }
#no-results strong { color: #d9534f; }
#no-results a { color: #007bff; text-decoration: underline; cursor: pointer; }

/* Badge Gradazione */
.strength-badge {
    display: inline-block; padding: 4px 10px; border-radius: 4px;
    color: #fff; text-transform: uppercase; font-size: 0.75em; font-weight: 700;
    margin-top: 10px; letter-spacing: 0.5px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #5bc0de;
}
.strength-leggero { background-color: #5bc0de; }
.strength-medio { background-color: #5cb85c; }
.strength-forte { background-color: #f0ad4e; }
.strength-molto-forte { background-color: #d9534f; }
.strength-percent { background-color: #5cb85c; } 

/* Indicatore "i" elegante (Fix iPhone) */
.spirit-item .item-name { position: static; padding-right: 0; }
.spirit-item .item-name::after {
    content: 'i'; font-family: 'Merriweather', serif; font-style: italic;
    display: inline-block; margin-left: 8px; color: #d9534f;
    font-size: 0.85em; font-weight: 700; opacity: 0.7; vertical-align: 1px;
    padding-right: 5px; width: 10px; text-align: left;
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default;
}
.spirit-item:active { background-color: rgba(255,255,255,0.05); }



/* --- ABBINAMENTI FILE --- */

#caffetteria h2::before { 
    -webkit-mask-image: url('icons/coffee.svg'); 
    mask-image: url('icons/coffee.svg'); 

}


/* --- ABBINAMENTI FILE ICONE --- */
#caffetteria h2::before { -webkit-mask-image: url('icons/coffee.svg'); mask-image: url('icons/coffee.svg'); left: -68px; }
#t-cioccolate h2::before, #te-cioccolate h2::before { -webkit-mask-image: url('icons/mug-tea-saucer.svg'); mask-image: url('icons/mug-tea-saucer.svg'); left: -68px; }
#bevande h2::before { -webkit-mask-image: url('icons/glass-water.svg'); mask-image: url('icons/glass-water.svg'); display: none !important; }
#spritz h2::before, #vini h2::before, #vermouth h2::before { -webkit-mask-image: url('icons/wine-glass.svg'); mask-image: url('icons/wine-glass.svg'); }
#cocktails h2::before { -webkit-mask-image: url('icons/martini-glass-citrus.svg'); mask-image: url('icons/martini-glass-citrus.svg'); left: -55px; }
#franciacorta h2::before { -webkit-mask-image: url('icons/champagne.svg'); mask-image: url('icons/champagne.svg'); }
#birre h2::before { -webkit-mask-image: url('icons/beer-mug-empty.svg'); mask-image: url('icons/beer-mug-empty.svg'); }
#gin-tonic h2::before { -webkit-mask-image: url('icons/glass-citrus.svg'); mask-image: url('icons/glass-citrus.svg'); }
#rum h2::before, #amari-e-liquori h2::before { -webkit-mask-image: url('icons/whiskey-glass-ice.svg'); mask-image: url('icons/whiskey-glass-ice.svg'); }
#whisky h2::before { display: none !important; }
#vodka h2::before { display: none !important; }
#brandy h2::before { -webkit-mask-image: url('icons/brandy.svg'); mask-image: url('icons/brandy.svg'); }
#grappe h2::before { -webkit-mask-image: url('icons/flask-round-potion.svg'); mask-image: url('icons/flask-round-potion.svg'); }
#panini-piadine h2::before { -webkit-mask-image: url('icons/burger-cheese.svg'); mask-image: url('icons/burger-cheese.svg'); }
#spuntini h2::before { display: none !important; }
#no-results h2::before {
    
    -webkit-mask-image: url('icons/search.svg'); 
    mask-image: url('icons/search.svg');

}
/* =========================================
   STILE DI STAMPA (Cartaceo)
   Si attiva solo quando fai Ctrl+P
   ========================================= */
@media print {
    /* Reset generale: Sfondo bianco, testo nero (risparmia cartuccia!) */
    body {
        background-color: #fff !important;
        color: #000 !important;
        padding-bottom: 0 !important; /* Via lo spazio per la sticky nav */
    }

    /* NASCONDI COSE INUTILI SU CARTA */
    #quick-nav-mobile-sticky, /* Barra in basso */
    #lang-switch,             /* Tasti lingua */
    #sticky-search-trigger,   /* Lente ricerca */
    footer nav,               /* Link footer */
    .lang-btn {               /* Bottoni lingua */
        display: none !important;
    }

    /* HEADER: Semplifichiamo per la stampa */
    header {
        background-image: none !important; /* Via la foto di sfondo */
        min-height: auto !important;
        padding-bottom: 10px !important;
        margin-bottom: 20px !important;
        border-bottom: 2px solid #000;
    }
    
    header h1 {
        position: static !important; /* Non più assoluto */
        transform: none !important;
        color: #000 !important;
        text-shadow: none !important; /* Via l'ombra che sgrana */
        margin-bottom: 0 !important;
    }

    /* SEZIONI: Via ombre, Tieni bordi */
    section {
        box-shadow: none !important;    /* L'ombra stampata fa schifo */
        border: 1px solid #000 !important; /* Bordo nero netto */
        page-break-inside: avoid;       /* Cerca di non tagliare le sezioni a metà pagina */
        margin-bottom: 15px !important;
        background-color: #fff !important;
    }

    /* TESTI: Nero assoluto per leggibilità */
    h2, .item-name, .item-price, .item-description, p {
        color: #000 !important;
    }

    section h2::before {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    
    /* Se le vuoi NERE per risparmiare colore, togli il commento alla riga sotto: */
    /* background-color: #000 !important; */
    }

    /* Titoli sezioni: meno spazio */
    section h2 {
        border-bottom: 1px solid #ccc !important;
        padding-bottom: 10px !important;
        margin-bottom: 15px !important;
    }

    /* Link: toglie la sottolineatura blu se c'è */
    a {
        text-decoration: none !important;
        color: #000 !important;
    }
}