/* RESET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* PRELOADER */
#preloader {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* LOGO AL CENTRO */
#preloader-logo {
    width: 180px;
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.8s ease, opacity 0.8s ease;
    animation: logoIntro 0.8s ease forwards;
}

/* ANIMAZIONE INIZIALE */
@keyframes logoIntro {
    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* BODY */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background: url('../img/camion.png') center/cover fixed no-repeat;
    animation: moveBg 20s ease-in-out infinite alternate;
    position: relative;
}


    /* OVERLAY */
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.55);
        z-index: -1;
    }

/* HEADER */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff00;
    backdrop-filter: blur(6px);
    border-bottom: 2px solid #1f4fa810;
    z-index: 1000;
    transition: transform 0.3s ease;
}

    .header.hide {
        transform: translateY(-100%);
    }

    .header .image img {
        height: 130px;
        width: auto;
    }

/* NAV */
.nav {
    display: flex;
    gap: 25px;
}

    .nav a {
        color: #1f4fa8;
        text-decoration: none;
        font-weight: 600;
        padding: 8px 14px;
        border-radius: 5px;
        transition: 0.3s;
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .nav a:hover {
            background: #1f4fa8;
            color: white;
        }

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

    .hamburger span {
        width: 28px;
        height: 3px;
        background: #1f4fa8;
        border-radius: 3px;
        transition: 0.3s;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

/* HERO */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

    .hero h1,
    .hero p {
        color: #fff;
        text-shadow: 0 3px 10px rgba(0,0,0,0.8);
        font-weight: 700;
    }

    .hero h1 {
        margin-bottom: 20px;
    }

    .hero p {
        margin-bottom: 35px;
    }

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}


/* BOTTONI */
button,
.btn,
.lavora-form button,
.contact-form button {
    background: #0B7A3E;
    color: white;
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

    button:hover,
    .btn:hover,
    .lavora-form button:hover,
    .contact-form button:hover {
        background: #1f4fa8;
    }

/* SEZIONI */
.section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: auto;
}


    .section h2 {
        font-size: 2.2rem;
        margin-bottom: 25px;
        color: #0B7A3E;
    }

/* Titoli verdi specifici per pagine/sezioni richieste */
.chi-mission h2,
.chi-timeline h2,
.home-chisiamo h2,
.home-logistica h2,
.logistica-item h3,
#servizi h2,
.services .card h3,
#magazzino h2,
#contatti h2 {
    color: #0B7A3E !important;
}


/* TWO COL */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

    .two-col img {
        width: 85%;
        max-width: 450px;
        margin: auto;
    }

/* SERVIZI */
.services .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.card {
    background: #F4F4F4;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #1f4fa8;
}

    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

/* DARK SECTION */
.dark {
    background: #062A18;
    color: white;
    text-align: center;
}

    .dark h2 {
        color: #12A150;
    }

/* ANIMAZIONE SFONDO */
@keyframes moveBg {
    from {
        background-position: center top;
    }

    to {
        background-position: center bottom;
    }
}

/* CONTATTI */
.contact-right {
    background: #ffffffcc;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 14px;
        border: 2px solid #1f4fa8;
        border-radius: 8px;
        background: #ffffffee;
        transition: 0.3s;
    }

        .contact-form input:focus,
        .contact-form textarea:focus {
            border-color: #397fe2;
            box-shadow: 0 0 8px rgba(31,79,168,0.3);
            outline: none;
        }

    .contact-form textarea {
        height: 160px;
        resize: vertical;
    }

/* CERTIFICAZIONI */
.page-certificazioni {
    padding-top: 160px;
}

.cert-title {
    font-size: 2.4rem;
    color: #1f4fa8;
    text-align: center;
    margin-bottom: 10px;
}

.cert-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.cert-card {
    background: #ffffffcc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    transition: 0.3s;
}

    .cert-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    }

    .cert-card img {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .cert-card h3 {
        color: #0B7A3E;
    }

.pdf-viewer {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Tablet */
@media (max-width: 992px) {
    .pdf-viewer {
        height: 400px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .pdf-viewer {
        height: 300px;
    }
}


/* ADMIN */
.page-admin {
    padding-top: 160px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .services .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: rgba(255,255,255,0.9);
        padding: 25px 0;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        border-bottom: 2px solid #1f4fa820;
        z-index: 999;
    }

        .nav.show {
            display: flex;
        }

        .nav a {
            font-size: 1.3rem;
            padding: 10px 20px;
            width: 100%;
            justify-content: center;
        }

    .header .image img {
        height: 80px;
    }
}

@media (max-width: 600px) {
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }
}

/* MAGAZZINO SENZA FASCIONE FULL-WIDTH */
#magazzino.section {
    max-width: 1200px !important;
    margin: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* SEZIONE MAGAZZINO (PULITA, SENZA SFONDO) */
#magazzino {
    text-align: center;
    padding-top: 120px;
    padding-bottom: 100px;
    background: none !important;
    width: auto !important;
    margin: auto !important;
}

    /* TITOLO */
    #magazzino h2 {
        font-size: 3rem;
        margin-bottom: 50px;
        font-weight: 800;
        color: #0B7A3E;
    }

/* CONTENITORE CARD */
.magazzino-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

/* CARD SINGOLA */
.magazzino-card {
    padding: 40px 20px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #628e3d, #547735, #b6ce8a);
    background-size: 300% 300%;
    animation: magazzinoCardGradient 12s ease infinite;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ANIMAZIONE GRADIENTE CARD */
@keyframes magazzinoCardGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* NUMERI */
.magazzino-card .counter {
    font-size: 4rem;
    font-weight: 900;
    display: block;
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(255,255,255,0.4), 0 0 20px rgba(0,0,0,0.4), 0 6px 12px rgba(0,0,0,0.35), 0 0 40px rgba(255,255,255,0.15);
}

/* TESTO */
.magazzino-card p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* HOVER */
.magazzino-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* FOOTER MINIMALE, CENTRATO, COLORE FISSO */
footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #547735;
    padding: 40px 0;
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.25);
}

    /* RIMUOVO QUALSIASI LAYER */
    footer::before {
        content: none;
    }

    /* COPYRIGHT */
    footer .copyright {
        opacity: 0.9;
        letter-spacing: 0.5px;
    }

/* FIX MOBILE — SFONDO */
@media (max-width: 768px) {
    /* rimuovo il background inline su body per usare un layer fisso dietro i contenuti */
    body {
        background: none;
        animation: none;
        background-attachment: scroll !important;
    }

        /* layer fisso con immagine mobile: rimane visibile mentre scorri */
        body::before {
            content: "";
            position: fixed;
            inset: 0;
            background-image: url('../img/mobile/hero-mobile.jpeg');
            background-position: center top;
            background-repeat: no-repeat;
            background-size: contain; /* evita zoom/crop; usa `auto 100%` se preferisci riempire verticalmente */
            z-index: -2;
            pointer-events: none;
        }

        /* overlay semi-trasparente sopra lo sfondo (come avevi prima) */
        body::after {
            content: "";
            position: fixed;
            inset: 0;
            background: rgba(255,255,255,0.55);
            z-index: -1;
            pointer-events: none;
        }

    /* conserva qui le altre regole mobile già presenti (logo, nav, ecc.) */
}

/* FIX MOBILE — LOGO PIÙ GRANDE */
@media (max-width: 768px) {
    .header .image img {
        height: 110px !important;
    }
}

/* FIX MOBILE — HAMBURGER NON DIVENTA BLU */
.hamburger,
.hamburger:focus,
.hamburger:active {
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
}

    .hamburger span {
        background: #12A150 !important;
    }

/* RESPONSIVE CARD */
@media (max-width: 768px) {
    .magazzino-cards {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .magazzino-card .counter {
        font-size: 3.5rem;
    }
}
/* MINI CHI SIAMO */
.home-chisiamo {
    text-align: center;
    max-width: 900px;
    margin-top: 60px;
}

    .home-chisiamo p {
        font-size: 1.25rem;
        margin-bottom: 25px;
        color: white;
        font-weight: 500;
    }

/* MINI LOGISTICA */
.home-logistica {
    text-align: center;
    margin-top: 40px;
}

.logistica-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin: 40px 0;
}

.logistica-item {
    background: #ffffffdd;
    padding: 35px 20px;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .logistica-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    }

    .logistica-item h3 {
        color: #1f4fa8;
        font-size: 2.2rem;
        margin-bottom: 10px;
        font-weight: 800;
    }

    .logistica-item p {
        font-size: 1.1rem;
        color: #062A18;
        font-weight: 500;
    }

/* ============================
   CERTIFICAZIONI — VERSIONE FINALE CORRETTA
   ============================ */

.home-certificazioni {
    max-width: 900px;
    margin: 80px auto;
    text-align: center;
    background: #ffffffcc;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
}

.cert-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 loghi */
    gap: 30px;
    margin: 40px 0;
}

.cert-mini {
    background: #ffffffdd;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .cert-mini:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    }

.cert-logo {
    width: 120px;
    height: 80px; /* altezza fissa per allineamento perfetto */
    object-fit: contain; /* mantiene proporzioni */
    margin-bottom: 10px;
}

.cert-mini span {
    font-weight: 700;
    color: #1f4fa8;
    min-height: 22px; /* evita sfalsamenti */
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .cert-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cert-mini-grid {
        grid-template-columns: 1fr;
    }
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #062A18;
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    display: none;
    z-index: 9999;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

    .cookie-banner p {
        margin: 0;
        font-size: 1rem;
    }

.cookie-btn {
    margin-top: 12px;
    background: #0B7A3E;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

    .cookie-btn:hover {
        background: #0d8f4a;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* DOCUMENTI 231 */
.documenti-231 {
    margin: 80px auto;
    max-width: 900px;
    text-align: center;
    background: #ffffffcc;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
}

.doc-title {
    font-size: 32px;
    font-weight: 700;
    color: #0B7A3E;
    margin-bottom: 30px;
}

.doc-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: #ffffff;
    border: 2px solid #0B7A3E;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #0B7A3E;
    text-decoration: none;
    transition: 0.3s;
}

    .doc-item:hover {
        background: #0B7A3E;
        color: white;
        transform: translateY(-3px);
    }

.doc-icon {
    font-size: 22px;
}

.magazzino-video {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

    .magazzino-video video {
        width: 100%;
        display: block;
        border-radius: 12px;
    }
/* ============================
   HOME — SEZIONE LOGISTICA MOBILE
   ============================ */
@media (max-width: 768px) {

    .logistica-grid {
        grid-template-columns: 1fr; /* da 3 colonne → 1 colonna */
        gap: 25px;
        margin: 20px 0;
    }

    .logistica-item {
        padding: 25px 18px;
    }

        .logistica-item h3 {
            font-size: 1.8rem; /* più piccolo */
            margin-bottom: 8px;
        }

        .logistica-item p {
            font-size: 1rem;
        }
}

/* Versione super-mobile */
@media (max-width: 480px) {

    .logistica-item {
        padding: 22px 15px;
    }

        .logistica-item h3 {
            font-size: 1.6rem;
        }

        .logistica-item p {
            font-size: 0.95rem;
        }
}

/* ============================
   HOME — SERVIZI MOBILE FIX
   ============================ */
@media (max-width: 600px) {

    .services .cards {
        grid-template-columns: 1fr; /* da 2 colonne → 1 colonna */
        gap: 18px;
    }

    .card {
        padding: 20px 18px; /* meno padding */
    }

        .card h3 {
            font-size: 1.4rem; /* più piccolo */
            margin-bottom: 8px;
        }

        .card p {
            font-size: 1rem;
        }
}

/* FIX MOBILE — STRUTTURA LOGISTICA */
@media (max-width: 768px) {
    .logistica-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin: 20px 0;
    }
}

/* SOLO MOBILE */
@media (max-width: 768px) {

    /* Contenitore certificazioni + testo */
    .cert-layout.mobile-expanded {
        grid-template-columns: 1fr !important;
    }

    /* Colonna sinistra (icone) */
    .cert-col-left.mobile-expanded {
        order: 1; /* va sopra */
        margin-bottom: 20px;
    }

    /* Colonna destra (testo) */
    .cert-col-right.mobile-expanded {
        order: 2;
    }

    /* Testo fullscreen */
    .politica-text.fullscreen {
        max-height: 5000px !important;
        overflow: visible;
        padding-bottom: 40px;
    }

    /* Nasconde PDF quando si apre il testo */
    .pdf-politica.hide-on-expand {
        display: none;
    }
}

/* ANIMAZIONI DI INGRESSO PREMIUM */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease-out;
}

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
/* ============================
   NAVBAR MOBILE GLASS PREMIUM
   ============================ */
@media (max-width: 768px) {

    .nav {
        background: rgba(255, 255, 255, 0.65) !important;
        backdrop-filter: blur(14px) saturate(180%);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.35s ease;
    }

        .nav.show {
            transform: translateY(0);
            opacity: 1;
        }

        .nav a {
            font-size: 1.25rem;
            padding: 14px 0;
            width: 100%;
            text-align: center;
            color: #0B7A3E !important;
            transition: color 0.25s ease;
        }

            .nav a:hover {
                color: #1f4fa8 !important;
                background: none !important;
            }

    /* Hamburger animato più elegante */
    .hamburger span {
        transition: 0.35s ease;
    }
}
/* ============================================
   MOBILE — SPINGE GIÙ IL CONTENUTO QUANDO IL MENU È APERTO
   ============================================ */
@media (max-width: 768px) {

    body.menu-open main {
        transform: translateY(260px); /* altezza del menu */
        transition: transform 0.35s ease;
    }

    body.menu-open .header {
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

    /* Menu mobile più leggibile */
    .nav {
        background: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 25px 0;
        transition: opacity 0.35s ease;
    }

        .nav.show {
            opacity: 1;
        }
}
/* MAGAZZINO — RESPONSIVE */
@media (max-width: 768px) {

    .magazzino-hero {
        padding: 120px 16px 60px;
    }

        .magazzino-hero h1 {
            font-size: 30px;
        }

        .magazzino-hero p {
            font-size: 16px;
        }

    .magazzino-section {
        padding: 50px 16px;
    }

    .magazzino-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .magazzino-text {
        order: 1;
    }

    .magazzino-video {
        order: 2;
    }

        .magazzino-video video {
            width: 100% !important;
            height: auto !important;
            border-radius: 12px;
            display: block;
        }

    .magazzino-numbers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .num-box {
        padding: 18px;
    }

    .num {
        font-size: 28px;
    }
}

.scroll-arrow-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -110px; /* avvicina alla hero */
}

.scroll-arrow {
    animation: arrowBounce 1.6s ease-in-out infinite;
}

@keyframes arrowBounce {
    0% {
        transform: translateY(0);
        opacity: 0.3;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0.3;
    }
}

/* HERO MAGAZZINO — SFONDO UGUALE AL RESTO DEL SITO */
.magazzino-hero {
    padding: 160px 20px 100px;
    text-align: center;
    background: url('/img/flotta/hero.jpg') center/cover no-repeat;
    color: white;
    position: relative;
}

    .magazzino-hero h1 {
        font-size: 48px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .magazzino-hero p {
        font-size: 20px;
        max-width: 700px;
        margin: auto;
    }

/* MOBILE FIX */
@media (max-width: 768px) {
    .magazzino-hero {
        padding: 140px 20px 80px;
        background-position: center top;
        background-size: cover;
    }

        .magazzino-hero h1 {
            font-size: 32px;
        }

        .magazzino-hero p {
            font-size: 16px;
        }
}

/* ============================================
   FLOTTA — OVERLAY COME IN SERVIZI
   ============================================ */

.flotta-hero {
    position: relative;
    padding: 160px 20px 100px;
    text-align: center;
    background: url('/img/camion.png') center/cover no-repeat;
    color: white;
    overflow: hidden;
}

    /* Overlay scuro identico a Servizi */
    .flotta-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.45); /* puoi aumentare o diminuire */
        z-index: 0;
    }

    /* Porta il testo sopra l’overlay */
    .flotta-hero h1,
    .flotta-hero p {
        position: relative;
        z-index: 1;
    }

/* Schiarisce lo sfondo solo su mobile aumentando l'overlay bianco */
@media (max-width: 768px) {
    body::after {
        background: rgba(255,255,255,0.4) !important;
    }
}

/* --- IMMAGINE DI SFONDO --- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('../img/mobile/hero-mobile.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -2;
    pointer-events: none;
}

/* --- OVERLAY OPACIZZATO --- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.45); /* opacità regolabile */
    z-index: -1;
    pointer-events: none;
}

/* --- DESKTOP --- */
@media (min-width: 768px) {
    body::before {
        background-image: url('../img/immaginesfondo.png');
    }
}

/* Header: testo link e bottoni verdi */
.header .nav a {
    color: #0B7A3E;
    text-decoration: none;
}

    .header .nav a svg {
        stroke: #0B7A3E; /* assicura che l'icona rimanga verde */
    }

    .header .nav a:hover,
    .header .nav a:focus {
        background: #1f4fa8;
        color: #ffffff;
        outline: none;
    }

/* Pulsanti/form inline (Logout) */
.header .nav form button,
.header .nav button {
    color: #0B7A3E;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /* Accessibilità: stato focus visibile */
    .header .nav a:focus,
    .header .nav form button:focus {
        box-shadow: 0 0 0 3px rgba(11,122,62,0.14);
        border-radius: 6px;
    }