/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background: #fff;
    color: #333;
    font-weight: 400;
    font-style: normal;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex-shrink: 0;                    /* Impedisce al logo di restringersi eccessivamente */
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 100%;                   /* Sicurezza base */
    display: block;
}

/* Nav links desktop */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 300;
}

.nav-links a:hover {
    color: #ff0000;
}

/* Hamburger (nascosto su desktop) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section con Carousel */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    width: 100%;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel img.active {
    opacity: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero .cta {
    background: #ff0000;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
}

.hero .cta:hover {
    background: #cc0000;
}


/* Contatti fissi in basso sul hero/carousel */
.hero-contacts {
    position: absolute;
    bottom: calc(40px + env(safe-area-inset-bottom, 20px));   /* base 40px + spazio extra per la barra Android */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Su mobile alziamo ancora un po' e teniamo conto della safe area */
@media (max-width: 768px) {
    .hero-contacts {
        bottom: calc(70px + env(safe-area-inset-bottom, 30px));  /* 70px base + safe area → circa 2 righe in più */
        padding: 8px 15px;
        font-size: 0.95rem;
        max-width: 90%;
        border-radius: 5px;
    }
}

/* Per telefoni molto piccoli o con barre particolarmente alte */
@media (max-width: 480px) {
    .hero-contacts {
        bottom: calc(90px + env(safe-area-inset-bottom, 40px));  /* ancora più alto se necessario */
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}


/* Sezioni generali */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

/* Chi Siamo */
.about {
    background: #fff;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Mission */
.mission {
    background: #fff;
}

.mission ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.mission li {
    max-width: 300px;
    text-align: center;
}

/* Prodotti */
.products {
    background: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.product-card h3 {
    margin: 15px 0;
}

.product-card p {
    padding: 0 15px 20px;
}

/* Contatti */
.contact {
    background: #fff;
}

.contact p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Mappa */
.map {
    background: #fff;
    text-align: center;
}

.map iframe {
    width: 100%;
    height: 400px;
    border: none;
    filter: grayscale(100%);
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
}

@media (max-width: 768px) {
    nav {
        padding: 12px 15px;
        position: relative;
        flex-wrap: nowrap;
    }

    .logo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo img {
        height: 36px;
        max-width: 220px;
    }

    .hamburger {
        display: block;
        z-index: 1100;
        font-size: 2rem;              /* un po' più visibile e tap-friendly */
        color: #333;
    }

    .nav-links {
        position: fixed;              /* ← Cambiato in fixed per stare sopra tutto */
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff !important;
        background-color: #ffffff !important;    /* Doppio !important per sicurezza */
        box-shadow: -6px 0 15px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.35s ease;
        display: flex !important;
        flex-direction: column;
        padding: 80px 25px 40px;      /* più spazio dall'alto */
        gap: 20px;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        color: #222;
        font-size: 1.15rem;
        padding: 14px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
    }

/* Overlay per menu mobile */
.overlay {
    position: fixed;
    inset: 0;                  /* top:0; right:0; bottom:0; left:0; */
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 999;              /* sotto il menu (che ha z-index 1000) */
    pointer-events: none;      /* inizialmente non cliccabile */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;      /* permette di cliccare per chiudere */
}

/* Nascondi overlay su desktop */
@media (min-width: 769px) {
    .overlay {
        display: none;
    }
}


/* Overlay scuro quando menu aperto */
    body.menu-open {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-width: 180px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}

/* Schermi molto piccoli */
@media (max-width: 480px) {
    .logo img {
        max-width: 180px;                     /* Ancora più compatto */
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}


/* FAQ – stile semplificato: tutto centrato, domande in grassetto, risposte sempre visibili */
.faq {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.faq h2 {
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #333;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 40px;
    padding: 0 20px;
}

.faq-question {
    font-size: 1.25rem;
    font-weight: 700;              /* grassetto forte */
    color: #333;
    margin-bottom: 16px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
    max-width: 760px;
    margin: 0 auto;
}

.faq-answer p {
    margin-bottom: 16px;
}

.faq-answer ul {
    list-style: disc;
    margin: 16px auto 20px;
    padding-left: 32px;
    text-align: left;              /* lista a sinistra per leggibilità */
    max-width: 680px;
}

.faq-answer li {
    margin-bottom: 10px;
}

.faq-answer strong {
    color: #222;
}

/* Responsive */
@media (max-width: 768px) {
    .faq {
        padding: 50px 15px;
    }

    .faq h2 {
        font-size: 2.1rem;
        margin-bottom: 40px;
    }

    .faq-question {
        font-size: 1.18rem;
    }

    .faq-answer {
        font-size: 1rem;
    }

    .faq-answer ul {
        padding-left: 24px;
    }
}

@media (max-width: 480px) {
    .faq h2 {
        font-size: 1.9rem;
    }

    .faq-question {
        font-size: 1.12rem;
    }

    .faq-answer {
        font-size: 0.98rem;
    }
}


   