:root {
    --rosso-brand: #D62828;
    --rosso-scuro: #A4161A;
    --nero: #0A0A0A;
    --grafite: #1F1F1F;
    --grigio-medio: #3A3A3A;
    --bianco: #FFFFFF;
    --grigio-chiaro: #E5E5E5;
    --accento: #1B98E0;
}

/* BODY */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--nero);
    color: var(--grigio-chiaro);
}

/* HEADER */
header {
    background-color: var(--grafite);
    color: var(--bianco);
    padding: 0px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--bianco);
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: var(--rosso-brand);
}

/* HERO */
.hero {
    background: url('https://images.unsplash.com/photo-1581091012184-5c1d35d5a1a1?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bianco);
}

/* SERVIZI */
.service-box {
    background: #f2f2f2;
    width: 900px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* <--- mette h3 sopra e p sotto */
    justify-content: center;
    align-items: center;
    border: 2px solid var(--grigio-medio);
    transition: 0.3s;
    margin: 20px auto; /* <--- distanzia le box tra loro */
    cursor: pointer;
}

.service-box:hover,
.flusso-box:hover {
    border-color: var(--rosso-brand);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(214, 40, 40, 0.15);
}

.service-box h3 {
    color: var(--rosso-brand);
    margin: 0 0 5px 0; /* <--- spazio sotto il titolo */
}

.service-box p {
    margin: 0; /* <--- niente margine sopra */
    color:black
}



/* FOOTER */
footer {
    background-color: var(--grafite);
    color: var(--bianco);
    text-align: center;
    padding: 20px;
}
.logo {
    height: 200px;
    width: 200px;
    vertical-align: middle;
    margin-right: 10px;
    margin-top: -50px;
}
/* GRID SPONSOR */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px; /* spazio tra i riquadri */
}


.sponsor-box {
    background:  #f2f2f2;
    width: 400px;
    height: 150px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--grigio-medio);
    transition: 0.3s;
    margin: auto; /* per centrarli nella griglia */
}


.sponsor-box:hover {
    border-color: var(--rosso-brand);
    transform: scale(1.05);
}

.sponsor-box img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

footer {
    margin-top: auto;
}
.mappa {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* testo allineato a sinistra */
}

.sottotitolo {
    font-size: 14px;
    color: var(--grigio-chiaro);
    margin-top: -50px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/*STILE JS PER ANIMAZIONI*/
.fade-seq {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-seq.visible {
    opacity: 1;
    transform: translateY(0);
}
#servizi h2 {
    text-align: center;
}
#sponsor h2{
    text-align:center;
}

#contatti {
    text-align: center;
}
.spazio {
    padding: 40px 0;
    height: auto; /* fondamentale */
}
.flusso {
    display: flex;
    flex-direction: row; /* da colonna a riga */
    justify-content: center; /* centra tutto */
    gap: 20px;
    margin-top: 30px;
}


.flusso-box {
    background: #f2f2f2;
    border: 2px solid var(--grigio-medio);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    width: 350px;
    margin: auto;
}

.flusso-box:hover {
    border-color: var(--rosso-brand);
}

.flusso-box h3 {
    color: var(--rosso-brand);
    margin: 0;
    text-align: center;
}

.flusso-box .contenuto {
    margin-top: 15px;
    display: none; /* nascosto di default */
    text-align: center;
    line-height: 1.5;
    color:black
}
#chi-siamo h2 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px; /* spazio tra testo e linea */
    
}
#chi-siamo h2.line-active::after {
    width: 500px; /* lunghezza finale */
}


#chi-siamo h2::after {
    content: "";
    height: 3px; /* spessore */
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto; /* centrata */
    border-radius: 2px;
    width: 0; /* parte da zero */ 
    transition: width 0.6s ease-out; /* animazione fluida */
}

#chi-siamo p {
    max-width: 900px;      /* limita la larghezza per evitare righe troppo lunghe */
    margin: 0 auto 25px;   /* centra il testo e aggiunge spazio sotto */
    line-height: 1.6;      /* aumenta l’interlinea */
    text-align: justify;   /* testo più ordinato e professionale */
    font-size: 18px;       /* leggermente più grande */
}

#intro h2 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* linea rossa animata */
#intro h2::after {
  content: "";
    height: 3px; /* spessore */
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto; /* centrata */
    border-radius: 2px;
    width: 0; /* parte da zero */ 
    transition: width 0.6s ease-out; /* animazione fluida */
}

#intro h2.line-active::after {
    width: 500px;
    height: 3px;
}

/* testo leggibile */
#intro p {
    max-width: 900px;
    margin: 0 auto 25px;
    line-height: 1.6;
    text-align: justify;
    font-size: 18px;
}
/* linea rossa animata */
#servizi h2::after {
  content: "";
    height: 3px; /* spessore */
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto; /* centrata */
    border-radius: 2px;
    width: 0; /* parte da zero */ 
    transition: width 0.6s ease-out; /* animazione fluida */
}

#servizi h2.line-active::after {
    width: 500px;
    height: 3px;
}
/* linea rossa animata */
#contatti h2::after {
  content: "";
    height: 3px; /* spessore */
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto; /* centrata */
    border-radius: 2px;
    width: 0; /* parte da zero */ 
    transition: width 0.6s ease-out; /* animazione fluida */
}

#contatti h2.line-active::after {
    width: 500px;
}
/* linea rossa animata */
#sponsor h2::after {
  content: "";
    height: 3px; /* spessore */
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto; /* centrata */
    border-radius: 2px;
    width: 0; /* parte da zero */ 
    transition: width 0.6s ease-out; /* animazione fluida */
}

#sponsor h2.line-active::after {
    width: 500px;
}
#certificazioni h2::after {
    content: "";
    height: 3px;
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto;
    border-radius: 2px;
    width: 0;
    transition: width 0.6s ease-out;
}

#certificazioni h2.line-active::after {
    width: 500px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.cert-box {
    padding: 20px;
    border: 1px solid var(--grafite);
    border-radius: 8px;
    text-align: center;
    background: var(--grafite);
    transition: transform 0.3s ease;
}

.cert-box:hover {
    transform: translateY(-5px);
}

.cert-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--rosso-brand);
    font-weight: bold;
    text-decoration: none;
}

.cert-link:hover {
    text-decoration: underline;
}
/* Sezione certificazioni centrata */
#certificazioni {
    text-align: center;
}

/* Il paragrafo sotto il titolo */
#certificazioni p {
    max-width: 700px;
    margin: 0 auto 20px auto;
}

/* Centra la griglia dentro il container */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px auto 0 auto;
    max-width: 900px;
}

.cert-box {
    padding: 20px;
    border: 2px solid var(--grigio-medio);
    border-radius: 8px;
    text-align: center;
    background: var(--grigio-medio)a;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.cert-box:hover {
    transform: translateY(-5px);
    border-color: var(--rosso-brand);
}
.cert-box {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background: #f2f2f2; /* grigio chiaro come le altre box */
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    color: var(--rosso-brand); /* testo rosso */
    text-decoration: none; /* rimuove sottolineatura del link */
}

.cert-box:hover {
    transform: translateY(-5px);
    border-color: var(--rosso-brand); /* bordo rosso al passaggio */
}

/* Modale video per i servizi */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

.video-modal.open {
    display: flex;
}

.video-modal-content {
    background: #111;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.7);
}

.video-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.video-wrapper {
    padding-top: 56.25%;
    position: relative;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.cert-box h3 {
    color: var(--rosso-brand);
    margin: 0;
}
/* Contenitore dei link legali */
.legal-links {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 20px auto 0;
    padding: 0 10px;
}

/* Stile dei link */
.legal-links a {
    color: var(--grigio-medio);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    text-decoration: underline;
}
/* Linea rossa animata - COMPLIANCE */
#compliance h2::after {
    content: "";
    height: 3px;
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto;
    border-radius: 2px;
    width: 0;
    transition: width 0.6s ease-out;
}

#compliance h2.line-active::after {
    width: 500px;
}

/* Centrare testo e griglia */
#compliance {
    text-align: center;
}

#compliance p {
    max-width: 700px;
    margin: 0 auto 20px auto;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 9999;
}

#cookie-banner a {
    color: var(--rosso-brand);
    text-decoration: underline;
}

#cookie-banner button {
    background: var(--rosso-brand);
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

#cookie-banner button:hover {
    opacity: 0.8;
}

/* Linea rossa animata sotto PRIVACY */
#privacy h2::after {
    content: "";
    height: 3px;
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto;
    border-radius: 2px;
    width: 0;
    transition: width 0.6s ease-out;
}

#privacy h2.line-active::after {
    width: 500px;
}

/* Testo privacy */
.privacy-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;     /* GIUSTIFICA IL TESTO */
    line-height: 1.7;        /* MIGLIORA LA LEGGIBILITÀ */
    font-size: 16px;
    word-spacing: 1px;       /* EVITA BUCHI TROPPO GRANDI */
}

.privacy-content h3 {
    margin-top: 25px;
    color: var(--rosso-brand);
}
#privacy {
    text-align: center;
}
/* Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    z-index: 9999;
}

#cookie-banner a {
    color: var(--rosso-brand);
    text-decoration: underline;
}

.cookie-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#cookie-banner button {
    background: var(--rosso-brand);
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

#cookie-banner button:hover {
    opacity: 0.8;
}

/* Pannello personalizzazione */
#cookie-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.cookie-panel-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 350px;
    text-align: left;
}

.cookie-panel-box h3 {
    margin-top: 0;
    color: var(--rosso-brand);
}

.cookie-panel-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.cookie-panel-buttons button {
    background: var(--rosso-brand);
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}
/* Etichette dei checkbox */ 
.cookie-panel-box label { 
    color: #444; /* grigio scuro elegante */ 
}
.lavora-link {
    color: var(--rosso-brand);
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
}

.lavora-link:hover {
    text-decoration: underline;
}
/* ============================
   RESPONSIVE DESIGN – MOBILE
   ============================ */

@media (max-width: 900px) {

    /* BODY */
    body {
        overflow-x: hidden;
    }

    /* HEADER */
    header {
        flex-direction: column;
        text-align: center;
        padding: 20px 10px;
    }

    .logo-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        width: 120px;
        height: auto;
        margin: 0;
    }

    .sottotitolo {
        margin-top: 5px;
        font-size: 12px;
    }

    /* MENU */
    nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    nav a {
        font-size: 18px;
        margin: 0;
    }

    /* SEZIONI */
    .spazio {
        padding: 20px 10px;
    }

    h2 {
        font-size: 26px;
    }

    p {
        font-size: 16px;
        line-height: 1.6;
    }

    /* SERVIZI */
    .service-grid {
        grid-template-columns: 1fr;
        max-width: 90%;
        padding: 0 20px;
    }

    .service-box {
        width: 90%;
        padding: 0 20px;
    }
    
  

    /* FLUSSO BOX (Chi siamo) */
    .flusso {
        flex-direction: column;
        gap: 20px;
    }

    .flusso-box {
        width: 90%;
    }

    /* SPONSOR */
    .sponsor-grid {
        grid-template-columns: 1fr;
        max-width: 90%;
        padding: 0 20px;
    }

    .sponsor-box {
        width: 90%;
        padding: 020px;
    }

    /* CERTIFICAZIONI */
    .cert-grid {
        grid-template-columns: 1fr;
        max-width: 90%;
        padding: 0 20px;
    }

    .cert-box {
        width: 90%;
        padding: 20px;
    
    }

    /* MAPPA */
    .mappa iframe {
        width: 100% !important;
        height: 300px !important;
    }

    /* LINK LEGALI */
    .legal-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* COOKIE BANNER */
    #cookie-banner {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    #cookie-banner button {
        width: 100%;
    }

    /* COOKIE PANEL */
    .cookie-panel-box {
        width: 90%;
        padding: 20px;
    }

    /* PRIVACY PAGE */
    .privacy-content {
        padding: 0 10px;
        font-size: 16px;
        text-align: justify;
    }

    /* FOOTER */
    footer {
        font-size: 14px;
        padding: 15px 0;
        text-align: center;
    }
}
.mappa-italia {
    position: relative;
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
}

.mappa-italia img {
    width: 100%;
    height: auto;
    display: block;
}

/* Marker animati */
.marker {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #e30613;
    border-radius: 50%;
    box-shadow: 0 0 10px #e30613;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* POSIZIONI SULLA MAPPA DREAMSTIME */
.marker.verona   { top: 17%; left: 42%; } /*ok*/
.marker.roma     { top: 53%; left: 52%; } /*ok*/
.marker.torino   { top: 20%; left: 20%; } /*ok*/
.marker.milano  { top: 17%; left: 30%; }  /*ok*/
.marker.genova   { top: 28%; left: 26%; } /*ok*/
.marker.bologna  { top: 25%; left: 40%; } /*ok*/

/* Contenitore della sezione */
#sedi {
    text-align: center; /* centra l'h2 */
}

/* Titolo */
#sedi h2 {
    position: relative;
    display: inline-block; /* necessario per la linea */
    margin-bottom: 40px;
}

/* Linea rossa animata */
#sedi h2::after {
    content: "";
    height: 3px;
    background-color: var(--rosso-brand);
    display: block;
    margin: 10px auto 0 auto;
    border-radius: 2px;
    width: 0;
    transition: width 0.6s ease-out;
}

/* Classe che attiva l’animazione */
#sedi h2.line-active::after {
    width: 500px; /* stessa lunghezza degli altri titoli */
}
.descrizione-sedi {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: justify;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ddd; /* o il colore del tuo tema */
}

