/* === Reset e base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #FAF3E0; /* crema */
    color: #333;
    opacity: 0;
    transition: opacity 1s ease-in;
}

body.loaded {
    opacity: 1;
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
        line-height: 1.7;
    }
    section {
        padding: 1.5rem 1rem;
    }
}

.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* === Navbar elegante === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

/* ========================
   COOKIE BANNER
======================== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 9999; /* molto sopra tutto il resto */
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(100%);
}

#cookie-banner.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

#cookie-banner a {
    color: #4fc3f7;
    text-decoration: underline;
    margin-left: 10px;
}

#cookie-banner button {
    background: #4fc3f7;
    color: #000;
    border: none;
    padding: 8px 12px;
    margin-left: 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* === Navbar elegante migliorata === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(
            to bottom,
            rgba(75, 30, 30, 0.95) 0%,
            rgba(75, 30, 30, 0.85) 40%,
            rgba(75, 30, 30, 0.6) 100%
    );
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #FDF5E6;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    padding: 0.5rem 1.5rem;
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 60px;
    transition: transform 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;

}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, transform 0.2s;
}
.nav-links a:hover {
    color: #1abc9c;
    transform: translateY(-2px);
}

/* === Mobile migliorato === */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {
    .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .logo {
        height: 50px;
    }

    .menu-toggle {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        color: white;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        background: transparent; /* niente sfondo */
        backdrop-filter: none; /* così si vede la sfumatura della navbar dietro */
        box-shadow: none;

        border-radius: 0 0 12px 12px;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }

    .nav-links.open {
        max-height: 500px;
        opacity: 1;
    }

    .nav-links a {
        padding: 0.8rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
}


/* Carosello */
.carousel {
    position: relative;
    width: 100%;
    height: 75vh;
    margin-top: 65px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* effetto da deckstop */
.carousel-overlay-text {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #d9cfcf;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    z-index: 10;
    pointer-events: none; /* così non interferisce con click */
}

@media (min-width: 769px) {
    .carousel {
        height: 75vh; /* <-- ripristina altezza anche su desktop */
        max-height: none;
    }

    .carousel-overlay-text {
        display: block;
    }

    .riga img,
    .galleria .item img,
    .carousel img {
        width: 100%;
        height: auto;
        max-width: 100%;
        border-radius: 0;
        object-fit: cover;
    }
}
@media (max-width: 480px) {
    .carousel {
        height: 45vh;
    }
}

.carousel-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(139, 0, 0, 0.5); /* rosso scuro con trasparenza */
    z-index: 5;
    pointer-events: none;
}

/* === Hero === */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #8B0000, #6a0000); /* rosso vino */
    color: #FAF3E0;
    border-radius: 16px;
    margin: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero-logo {
    max-width: 300px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

/* === Descrizione / Sezioni testuali === */
.descrizione {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.riga {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.riga img {
    flex: 1 1 300px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.riga .testo {
    flex: 1 1 400px;
}

.riga .testo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #8B0000; /* rosso vino */
}

.riga .testo p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.riga.inversa {
    flex-direction: row-reverse;
}

.link-dolci {
    color: #800020;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-dolci:hover {
    color: #a0002e;
    text-decoration: underline;
}

/* --- SEZIONE SERVIZI --- */

/* --- STILE ICONE SVG INLINE (Font Awesome) --- */
.servizio .fa-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    fill: black; /* colore mare o blu acceso, modificabile */
    transition: transform 0.3s ease, fill 0.3s ease;
}

.servizio:hover .fa-icon {
    transform: scale(1.1);
    fill: black; /* un tono più scuro al passaggio del mouse */
}

.servizi {
    text-align: center;
    padding: 50px 20px;

    font-family: 'Poppins', sans-serif;
}

.servizi h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.servizi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.servizio {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servizio:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.servizio img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.servizio h3 {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 8px;
}

.servizio p {
    font-size: 0.9rem;
    color: #666;
}

/* --- VERSIONE MOBILE: UNA SOLA COLONNA CENTRATA --- */
@media (max-width: 768px) {
    .servizi-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .servizio {
        background: #fff;
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        margin: 0 auto;
    }
}

.call-now {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: #8B0000;
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* === Galleria === */
.titolo-sezione {
    text-align: center;
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    color: #8B0000;
    font-weight: 700;
}

.galleria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding: 2rem;
    justify-items: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.galleria .item {
    text-align: center;
    max-width: 180px;
}

.galleria .item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.galleria .item img:hover {
    transform: scale(1.05);
}

.galleria .item p {
    margin-top: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: #333;
}

/* === Orari === */
.orari h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #556B2F; /* verde oliva */
}

.orari-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1rem;
}

.orari-table th,
.orari-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.orari-table th {
    background-color: #8B0000;
    color: white;
}

.orari-table tr:last-child td {
    border-bottom: none;
}

/* === Mappa === */
.mappa {
    text-align: center;
    padding: 30px 20px;
}

.mappa h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px; /* spazio tra testo e mappa */
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* NON troppo grande, perfetto anche su desktop */
    margin: 0 auto; /* centrato */
    padding-top: 56.25%; /* rapporto 16:9 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 480px) {
    .mappa h2 {
        font-size: 1.4rem;
    }
    .map-container {
        max-width: 90%; /* su mobile occupa quasi tutta la larghezza */
    }
}

/* === Footer === */
footer {
    text-align: center;
    padding: 20px 10px;
    background-color: #650101; /* sfondo scuro, da adattare al tuo tema */
    color: #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

footer a {
    color: #ffffff; /* un giallo caldo per risaltare */
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s ease;
}

footer a:hover,
footer a:focus {
    color: #ffffff; /* cambia colore al passaggio del mouse */
    text-decoration: underline;
    outline: none;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .riga {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        user-select: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero-logo {
        width: 70px;
    }
}

/* contatti.html */

.enhanced-contact {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background-color: #f9f5f0;
    border-top: 2px solid #a00000;
    border-bottom: 2px solid #a00000;
}


.info-box.wide a {
    color: #a00000;
    text-decoration: none;
    font-weight: 600;
}

.contact-info {
    display: flex;
    justify-content: center;
    padding: 4rem 2rem; /* Spazio sopra e sotto */
    background-color: #fdfaf6; /* crema chiaro */
}

.info-box.wide {
    max-width: 700px;
    width: 100%;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.contact-form {
    padding: 4rem 2rem;
    background-color: #f4f1ec; /* crema */
    text-align: center;
}

.contact-form h2 {
    font-size: 2rem;
    color: #4a2e2a; /* rosso vino */
    margin-bottom: 1.5rem;
}

.contact-form form {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    background-color: #802020; /* rosso vino */
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form .btn:hover {
    background-color: #a83232;
}

.privacy-consent {
    display: block;
    font-size: 0.9rem;
    margin: 1rem 0;
    color: #00303f;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.privacy-consent a {
    color: white;
    text-decoration: underline;
}

/* menu.html */
.hero-menu {
    text-align: center;
    margin-top: 100px;
    margin-bottom: 100px;
    padding: 60px 20px 40px;
    background-color: #e4cbb5; /* Colore di fallback nel caso l'immagine non si carichi */
    background-image: url("https://images.unsplash.com/photo-1599172995721-49309fff2f21?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8bWVudXxlbnwwfHwwfHx8Mg%3D%3D"); /* Percorso della tua immagine */
    background-size: cover; /* L'immagine copre tutto il contenitore */
    background-position: center; /* Centra l'immagine */
    background-repeat: no-repeat; /* Evita ripetizioni */
    color: #4a3b2b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.hero-menu h1 {
    font-size: 3rem;
    color: #ffffff;
}
.hero-menu p {
    font-size: 1.2rem;
    color: #ffffff;
    max-width: 600px;
    margin: 10px auto 0;
}

.menu-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    background-image: url('https://www.transparenttextures.com/patterns/aged-paper.png');
    background-repeat: repeat;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-category {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #ddd;
}

.menu-category h2 {
    font-family: "Times New Roman", serif;
    font-size: 1.6rem;
    color: #8b5e3c;
    border-bottom: 2px solid #8b5e3c;
    padding-bottom: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.menu-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-category li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.menu-category li strong {
    color: #444;
}

.menu-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 15px;
    max-height: 180px;
    object-fit: cover;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .menu-category {
        padding: 15px;
    }
    .menu-category h2 {
        font-size: 1.4rem;
    }
    .menu-category li {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .menu-category li strong {
        margin-bottom: 3px;
    }
    .menu-image {
        max-height: 150px;
    }
}
/* galleria */

.hero-gallery {
    background-image: url('https://media.istockphoto.com/id/104704117/it/foto/piatti-del-ristorante.jpg?s=612x612&w=0&k=20&c=g5XnViuY6ZirpT-ZMD7epg36LZmvRM9oRPbEumXw0ME='); /* Sostituisci con un'immagine tua */
    background-size: cover;
    background-position: center;
    color: #fdf7f2;
    text-align: center;
    padding: 120px 20px 100px;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 100px auto 60px;
    max-width: 1100px;
}

.hero-gallery::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(74, 59, 43, 0.5); /* overlay scuro trasparente */
    border-radius: 16px;
}

.hero-gallery-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

/* social */
.social-section {
    text-align: center;
    padding: 30px 20px;

    margin-top: 40px;
}

.social-section h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-icons a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.social-icons a:hover img,
.social-icons a:focus img {
    transform: scale(1.2);
    filter: brightness(1.2);
    outline: none;
}

@media (max-width: 480px) {
    .social-icons {
        gap: 20px;
    }
    .social-icons a img {
        width: 35px;
        height: 35px;
    }
}

/* Dolce del momento */
.dolce-momento {
    text-align: center;
    padding: 100px 20px 40px; /* aggiunto top margin extra */
    background: #fef3f3;
}

.dolce-momento-content {
    max-width: 800px;
    margin: 0 auto;
}

.dolce-momento h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #800020;
}

.dolce-momento p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 25px;
}

.dolce-momento img {
    width: 100%;
    max-width: 550px;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dolce-momento img:hover {
    transform: scale(1.03);
}

/* Sezione pasticcera */
.pasticcera {
    background: #fff0f0;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(128, 0, 32, 0.1); /* ombra leggera bordeaux */
}

.pasticcera-content {
    max-width: 800px;
    margin: 0 auto;
}

.pasticcera h2 {
    color: #800020;
    font-size: 2rem;
    margin-bottom: 20px;
}

.pasticcera p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 10px;
}

/* Titolo sopra la galleria */
.titolo-galleria {
    text-align: center;
    margin: 60px 0 30px;
}

.titolo-galleria h2 {
    font-size: 2rem;
    color: #800020;
}

/* Galleria dolci */
.galleria-dolci {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.dolce-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 280px;
}

.dolce-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.dolce-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.dolce-card h3 {
    font-size: 1.2rem;
    margin: 15px 0 5px;
    color: #800020;
}

.dolce-card p {
    font-size: 0.95rem;
    color: #555;
    padding: 0 15px 10px;
}

.dolce-card .prezzo {
    display: block;
    font-weight: bold;
    color: #800020;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Responsive media queries */
@media (max-width: 768px) {
    .dolce-momento h2,
    .pasticcera h2,
    .titolo-galleria h2 {
        font-size: 1.6rem;
    }

    .dolce-card {
        max-width: 100%;
    }

    .galleria-dolci {
        flex-direction: column;
        align-items: center;
    }

    .dolce-card img {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .dolce-card img {
        height: 140px;
    }

    .dolce-card p {
        font-size: 0.9rem;
    }

    .dolce-momento {
        padding-top: 120px;
    }
}