/* RESET DI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Bodoni Moda', sans-serif;
    line-height: 1.6;
    color: #222;
}

/* HEADER FISSO */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: #20639C;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}
html {
    scroll-behavior: smooth;
}
.section {
    min-height: 100vh;
    padding: 120px 60px;
}

/* LOGO HEADER */
.logo img {
    height: 90px;
    cursor: pointer;
}

/* MENU HEADER */
nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover {
    color: red;
}

/* HERO A DUE COLONNE */
.hero {
    margin-top: 20px; /* Compensa l’header fisso */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    gap: 60px;
}

/* COLONNA SINISTRA: IMMAGINE */
.hero-left {
    flex: 1.3;
}

.hero-left img {
    width: 100%;
    height: 500;
    border-radius: 12px;
    object-fit: cover;
}
/* Contenitore slider */
.slider {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Tutte le immagini sovrapposte */
.slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Immagine visibile */
.slider .slide.active {
    opacity: 1;
    position: relative;
}


/* COLONNA DESTRA: LOGO + SLOGAN */
.hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-logo {
    width: 480px;
    height: auto;
    margin-bottom: 15px;
}

.slogan {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    line-height: 2.2;
    max-width: 420px;
}
.slogan-line2 {
    white-space: nowrap;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-left, .hero-right {
        flex: none;
        width: 100%;
    }

    .hero-logo {
        width: 180px;
    }

    .slogan {
        font-size: 22px;
    }
}
/* SLOGAN SU DUE RIGHE */
.slogan {
    font-family: "Bodoni Moda", serif;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: red;
    margin-top: 20px;
    line-height: 1.2;
}

/* Ogni riga dello slogan va a capo */
.slogan span {
    display: block;
}


/* ANIMAZIONE  PRIMA LINEA */
.slogan-line1 {
    animation: line1Anim 6s ease-in-out forwards;
}

/* La seconda linea si anima */
.slogan-line2 {
    animation: line2Anim 6s ease-in-out forwards;
}

/* Keyframes della prima linea */
@keyframes line1Anim {
    0% { opacity: 0; }
    20% { opacity: 1; }   /* appare */
    100% { opacity: 1; }   /* resta visibile */
}

/* keyframes SECONDA RIGA */
@keyframes line2Anim {
    0% { opacity: 0; }
    40% { opacity: 0; }   /* attende che la prima sia già visibile */
    50% { opacity: 1; }   /* appare */
    100% { opacity: 1; }   /* resta visibile insieme alla prima */
}


/* PRIMA RIGA: ROSSA E IN CORSIVO */
.slogan-line1 {
    font-size: 30px;
    font-style: italic;
    color: #cc0000; /* rosso elegante */
    margin-bottom: 10px;
    font-family: 'Bodoni Moda', serif
}

/* SECONDA RIGA: STILE STANDARD */
.slogan-line2 {
    font-size: 30px;
    font-style: italic;
    color: #cc0000; /* rosso elegante */
    font-family: 'Bodoni Moda', serif
}
/* OGNI SEZIONE OCCUPA L’INTERO SCHERMO */
.section {
    min-height: 100vh;
    padding: 120px 60px; /* compensa l’header fisso */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CONTENUTO CENTRATO */
.section-content {
    max-width: 900px;
    text-align: center;
}
/* TITOLO DELLA PAGINA CHI SIAMO */
.titolo-presentazione {
    font-family: 'Bodoni Moda', serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #20639C;
}

/* TESTO DELLA PRESENTAZIONE */
.testo-presentazione {
    font-family: 'Bodoni Moda', serif;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #333;
}
/* SEZIONE CHI SIAMO */
.chi-siamo-section {
    display: block;
    min-height: 100vh;
    padding: 120px 60px 80px 60px; /* un po’ di spazio anche sotto */
}
/* TITOLO CENTRATO */
.titolo-presentazione::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background-color: #20639C;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}
/* CONTENITORE A DUE COLONNE */
.chi-siamo-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* COLONNA SINISTRA (TESTO) */
.chi-siamo-left {
    flex: 1;
text-align: left;   /* forza l’allineamento a sinistra */

}

.titolo-presentazione,
.testo-presentazione {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 24px;
    line-height: 1.6;
    color: #20639C;
}
.testo-presentazione {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    text-align: left;
    font-size: 17px;
    line-height: 1.6;
    color: #20639C;
}

/* COLONNA DESTRA (IMMAGINE) */
.chi-siamo-right {
    flex: 1;
}

.chi-siamo-right img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
body {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
}
.lista-presentazione {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #20639C;
    margin: 10px 0;
    padding-left: 20px; /* distanza elegante dal bordo */
}

.lista-presentazione li {
    margin-bottom: 10px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px; /* puoi aumentare o diminuire */
    margin: 0 auto;
}

/* RETTANGOLO ROSSO DI SFONDO */
.red-rectangle {
    width: 100%;
    height: 300px; /* altezza del rettangolo */
    background-color: #cc0000; /* rosso istituzionale */
    border-radius: 12px;
    margin-top: 60px;
}

/* IMMAGINE SOPRA IL RETTANGOLO */
.image-over {
    position: absolute;
    top: -70px;        /* spostamento verso l’alto */
    left: -40px;       /* spostamento verso sinistra */
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25); /* effetto rilievo */
}

/* SEZIONE MEDICINA DEL LAVORO */
.medicina-lavoro-section {
    display: block;
    padding: 120px 60px;
}

/* TITOLO */
.titolo-med-lav {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #20639C;
    margin-bottom: 60px;
}

/* LINEETTA DECORATIVA */
.titolo-med-lav::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: #20639C;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

/* CONTENITORE A DUE COLONNE */
.med-lav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* COLONNA SINISTRA */
.med-lav-left {
    flex: 1;
    text-align: left;
}

.testo-med-lav {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #20639C;
    margin-bottom: 6px;
}

.lista-med-lav {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #20639C;
    margin: 15px 0 25px 0;
    padding-left: 20px;
}

.lista-med-lav li {
    margin-bottom: 8px;
}

/* COLONNA DESTRA: IMMAGINE CON RETTANGOLO ROSSO */
.med-lav-right {
    flex: 1;
}

.med-lav-right img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}


/* SEZIONE CONSULENZA */
.consulenza-section {
    display: block;
    padding: 120px 60px;
}

/* TITOLO */
.titolo-consulenza {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #20639C;
    margin-bottom: 60px;
}

/* LINEETTA DECORATIVA */
.titolo-consulenza::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: #20639C;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

/* CONTENITORE A DUE COLONNE */
.consulenza-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* COLONNA DESTRA */
.consulenza-right {
    flex: 1;
    text-align: left;
}

.testo-consulenza {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #20639C;
    margin-bottom: 4px;
}

.lista-consulenza {
    font-family: "Avenir", "Avenir Next", "Avenir Next LT Pro", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #20639C;
    margin: 15px 0 15px 0;
    padding-left: 20px;
}

.lista-consulenza li {
    margin-bottom: 8px;
}

/* COLONNA SINISTRA: IMMAGINE CON RETTANGOLO ROSSO */
.consulenza-left {
    flex: 1;
}

.consulenza-left img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.contatti-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    padding: 60px 0;
}

.contatti-container {
    padding-left: 0;   /* elimina lo spazio a sinistra */
}

/* Colonna sinistra */
.contatti-left {
    width: 45%;
    background-color: #20639C;
    color: white;
    padding: 40px;
    border-radius: 8px;
    min-height: 750px;



    font-family: "Avenir", "Avenir Next", sans-serif;
    line-height: 1.5;

    margin-left: -20px;

    display: flex;
    flex-direction: column;
    height: 100%;          /* permette al contenuto di occupare tutta la colonna */

}/* Titolo grande */
.contatti-left h2 {
    font-size: 33px;
    font-weight: 600;
    margin-bottom: 20px;
}
/* Informazioni più piccole e regolari */
.contatti-left p {
    font-size: 17px;      /* più piccolo del titolo */
    margin-bottom: 12px;
}
/* Blocco societario in fondo */
.info-societa {
    margin-top: auto;  
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.info-societa p {
    font-size: 12px;
    margin-bottom: 4px;
}



/* Colonna destra (form) */
.contatti-right {
    width: 45%;
}
.contatti-right input,
.contatti-right textarea {
    width: 100%;
    padding: 12px 4px;
    margin-bottom: 20px;

    border: none;                     /* nessun bordo */
    border-bottom: 1px solid red;    /* solo riga inferiore */
    border-radius: 0;

    background-color: rgba(255, 0, 0, 0.05); /* rosso molto sfumato già presente */
    font-size: 18px;
    font-family: "Avenir", "Avenir Next", sans-serif;

    transition: all 0.3s ease;
}
.form-title {
    font-family: "Avenir", "Avenir Next", sans-serif;
    font-size: 32px;          /* dimensione istituzionale */
    font-weight: 700;         /* titolo forte e pulito */
    color: #20639C;           /* colore istituzionale del sito */
    margin-bottom: 25px;      /* spazio sotto il titolo */
}

.contatti-form textarea {
    height: 150px;
    resize: none;
}

.contatti-form button {
    background-color: #20639C;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    font-family: "Avenir", serif;
}

.contatti-form button:hover {
    background-color: #164a73;
}
.footer-info {
    margin-top: 100px;
    font-family: "Avenir", "Avenir Next", sans-serif;
    font-size: 14px;
    color: #20639C;
}

.footer-info p {
    margin: 6px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-info p:hover {
    color: #164a74;
}
.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative; /* fondamentale per posizionare la X all'interno */
    background-color: #ffffff;
    margin: 6% auto;
    padding: 30px 40px;
    border-radius: 8px;
    width: 55%;
    max-height: 80vh;
    overflow-y: auto;

    font-family: "Avenir", "Avenir Next", sans-serif;
    color: #333;
    font-size: 14px;
    line-height: 1.55;
    border-left: 4px solid #20639C;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}


#cookie-banner {
    background-color: #20639C;
    color: white;
    font-size: 14px;
    text-align: center;
    align-items: center;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    transform: none !important;
    will-change: transform;
}



.close-cookie-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #20639C;
    transition: opacity 0.2s ease;
}

.close-cookie-modal:hover {
    opacity: 0.6;
}}

.modal-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #20639C;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 14px;
}

.close-modal {
    float: right;
    font-size: 26px;
    cursor: pointer;
    color: #20639C;
    transition: opacity 0.2s ease;
}

.close-modal:hover {
    opacity: 0.6;
}
.footer-info p {
    margin: 6px 0;
    cursor: pointer;
    color: #20639C;
    font-family: "Avenir", "Avenir Next", sans-serif;
    transition: color 0.3s ease;
}

.footer-info p:hover {
    color: #164a74;
}
.footer-spacer {
    height: 12px; /* la “riga vuota” */
}
.mini-map {
    width: 100%;
    max-width: 300px; /* dimensione massima del riquadro */
    height: 180px;    /* altezza del riquadro */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mini-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {

    /* Corregge lo scroll per tutte le sezioni */
    section {
        scroll-margin-top: 110px; /* puoi aumentare o ridurre */
    }

#cookie-banner {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding-bottom: 25px !important; /* aumenta area cliccabile */
        transform: translateY(0) !important;

    }


 .hero {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    section {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }


    /* RESET HEADER DESKTOP */
    header {
        height: auto !important;
        padding: 4px 0 !important;
        padding-top: 12px !important;   /* aumenta lo spazio sopra */
        padding-bottom: 10px !important; /* aumenta lo spazio sotto */
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2px !important;
        background-color: #20639C !important;
    }

    /* LOGO MOBILE */
    header .logo img {
        height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* MENU MOBILE */
    nav ul {
        flex-direction: column !important;
        gap: 3px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
    }

    
nav ul li {
        width: 100% !important;
        text-align: center !important;
    }



    nav ul li a {
        font-size: 14px !important;
        padding: 3px 0 !important;
        display: block !important;
        width: 100% !important;
        color: white !important;
    }

    /* SPAZIO SOTTO L’HEADER */
    body {
        padding-top: 80px !important;
    }

    /* DISTANZA TRA HEADER E HERO */
    .hero {
        margin-top: 20px !important; /* ← AGGIUNTO px */
        padding-top: 0 !important;
    }

 .hero-right h1,
    .hero-right .slogan {
        font-size: 20px !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
        text-align: center !important;
        margin: 10px 0 !important;
        padding: 0 10px !important;
    }

    .hero-right {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

     .hero-left img {
        width: 100% !important;
        max-height: 300px !important;
        object-fit: cover !important;
        display: block !important;
        margin: 0 auto !important;
    }



 /* SLOGAN MOBILE */
    .slogan {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 10px auto !important;
        padding: 0 20px !important;
        max-width: 90% !important;
    }

    .slogan-line1,
    .slogan-line2 {
        font-size: 18px !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
        color: #B00000 !important; /* rosso istituzionale */
        margin: 3px 0 !important;
    }
@media (max-width: 768px) {

    /* Layout a colonna per tutte le sezioni */
    .chi-siamo-content,
    .med-lav-content,
    .consulenza-content {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    .chi-siamo-left,
    .chi-siamo-right,
    .med-lav-left,
    .med-lav-right,
    .consulenza-left,
    .consulenza-right {
        width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto 20px !important;
        box-sizing: border-box !important;
    }
/* Inversione ordine per CHI SIAMO e MEDICINA DEL LAVORO */
    .chi-siamo-content,
    .med-lav-content {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    /* Consulenza resta normale */
    .consulenza-content {
        display: flex !important;
        flex-direction: column !important;
    }


    /* Wrapper immagine: sempre statico in mobile */
    .image-wrapper {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 20px auto 0 !important;
        padding: 0 !important;
    }

    /* Rettangolo rosso disattivato in mobile */
    .red-rectangle {
        display: none !important;
    }

    /* Cornice rossa direttamente sull'immagine */
    .image-over {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        border-radius: 12px !important;
        border: 6px solid #cc0000 !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    }
}

@media (max-width: 768px) {

   @media (max-width: 768px) {

    /* Forza il layout verticale */
    .contatti-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Rettangolo blu FULL WIDTH */
    .contatti-left {
        width: 100% !important;
        padding: 14px !important;
        margin: 0 !important;
        margin-bottom: 20px !important;
        border-radius: 0px !important;
        box-sizing: border-box !important;
    }

    /* Form sotto */
    .contatti-right {
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* Testo leggibile */
    .contatti-left p,
    .contatti-left h2 {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* Mappa responsive */
    .mini-map iframe {
        width: 100% !important;
        height: 250px !important;
        border: 0 !important;
        border-radius: 12px !important;
    }

    /* Colonna destra (form) */
    .contatti-right {
        width: 100% !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }

    /* Titolo form */
    .form-title {
        font-size: 18px !important;   /* prima era più grande */
        margin-bottom: 15px !important;
        text-align: center !important;
    }


    /* Form responsive */
    .contatti-form {
        width: 100% !important;
        display: block !important;
    }

    .contatti-form input,
    .contatti-form textarea {
        width: 100% !important;
        font-size: 18px !important;
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .contatti-form textarea {
        min-height: 140px !important;
    }

    /* Pulsante */
    .contatti-form button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 18px !important;
        border-radius: 8px !important;
        cursor: pointer;
    }

    /* Footer info */
    .footer-info p {
        font-size: 13px !important;   /* ridotto */
        line-height: 1.4 !important;
        margin: 4px 0 !important;
        text-align: center !important;

    }

    .footer-info p {
        font-size: 12px !important;
        margin: 5px 0 !important;
    }
}
}
#cookie-banner {
    transform: none !important;
}