/* =========================
    RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #F0F7FF;
    color: #0A2540;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
    HEADER
========================= */
header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
}

.logo img {
    height: 55px;
    width: auto;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #0A2540;
    font-size: 1.1rem;
    font-weight: 600;
    transition: 0.3s;
}

nav a:hover {
    color: #0056B3; 
    transform: translateY(-2px);
}

/* =========================
    HERO
========================= */
.hero {
    height: 100vh;
    background: linear-gradient(
        135deg,
        #1A244E 0%, 
        #2A3A7D 50%,
        #4A89DC 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 5%;
}

.hero-content {
    max-width: 1000px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.95;
}

/* =========================
    RESPONSIVE (HEADER & HERO)
========================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 20px;
    }

    nav {
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    nav a {
        margin: 0;
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 2.4rem !important;
    }

    .hero h2 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
}

/* =========================================
    4. SEZIONI CONTENUTI (DESIGN PREMIUM)
========================================= */

/* SERVIZI */
.services {
    padding: 120px 5%;
    background: linear-gradient(to bottom, #F0F7FF, #FFFFFF); 
}

.services h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: #0056B3;
    text-align: center;
    letter-spacing: -1px;
}

/* FIX MOBILE: TITOLO "I NOSTRI SERVIZI" */
@media (max-width: 768px) {
    .services {
        padding: 40px 5% !important;
    }

    .services h2 {
        font-size: 1.5rem !important;
        white-space: nowrap !important;
        margin-bottom: 25px !important;
        letter-spacing: -1px !important;
    }
}

.services-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    background: #FFFFFF;
    flex: 1;
    min-width: 260px;
    max-width: 300px;
    padding: 50px 30px;
    border-radius: 24px; 
    box-shadow: 0 20px 40px rgba(0, 86, 179, 0.06);
    border: 1px solid rgba(0, 86, 179, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 86, 179, 0.12);
    border-color: #0056B3;
}

.service-icon-circle {
    width: 50px;
    height: 50px;
    background: #F0F7FF;
    color: #0056B3;
    border-radius: 12px; 
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.service-card h3 {
    font-size: 1.2rem;
    color: #0A2540;
    margin-bottom: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* =========================================
    5. DOVE OPERIAMO (MAPPA E PROVINCE)
========================================= */
.location {
    padding: 80px 10%;
    background-color: #F0F7FF;
}

.location-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}
/* DISTANZA TRA TESTO E RIQUADRI PROVINCE */
.provinces-list {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0;
    margin-top: 30px !important; /* Questo crea lo spazio che cerchi */
    margin-bottom: 25px;
}
.location-text h2 {
    font-size: 2.8rem;
    font-weight: 7000;
    margin-bottom: 20px;
    color: #0056B3;
}


/* RIDUZIONE TITOLO "DOVE OPERIAMO" SOLO SU MOBILE */
@media (max-width: 768px) {
    .location-text h2 {
        font-size: 1.6rem;
        margin-bottom: 18px;
    }
}


.provinces-list {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 20px;
}

.provinces-list li {
    background: #E3F2FD; 
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0056B3;
}

/* FIX CERCHI PERFETTI (NO OVALI SU MOBILE) */
.provinces-list li span {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    aspect-ratio: 1 / 1 !important;
    background-color: #0056B3;
    border-radius: 50% !important;
    display: inline-block;
    flex-shrink: 0 !important;
}




/* =========================================
    6. CONTATTI E FORM
========================================= */
.contact-section {
    padding: 60px 5%;
    background-color: #F0F7FF;
}

.contact-container {
    background-color: #FFFFFF; 
    padding: 60px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto 80px auto; 
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.1);
    border: 1px solid #E3F2FD;
}

.contact-info-side h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #0056B3;
}

.contact-info-side p {
    margin-bottom: 30px;
    color: #333;
}

.reference-data {
    margin-top: 20px;
    border-top: 1px solid #E3F2FD;
    padding-top: 20px;
}

.reference-data h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: #0A2540;
}

.reference-data p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

input, textarea {
    padding: 18px;
    border: 1px solid #E3F2FD;
    border-radius: 12px;
    background: #F9FCFF;
    width: 100%;
}

.btn-send {
    background-color: #0056B3; 
    color: white;
    padding: 18px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-send:hover {
    background-color: #003D7E;
}

/* =========================================
    7. FOOTER
========================================= */
footer {
    background-color: #0A2540; 
    color: #FFFFFF;
    padding: 50px 5%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-contact a {
    color: #4DA3FF; 
    text-decoration: none;
}

/* =========================================
    8. MEDIA QUERIES (RESPONSIVE)
========================================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        position: relative;
        padding: 20px;
    }

    nav {
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    nav a {
        margin: 0;
        font-size: 0.9rem;
    }

    .location {
        margin-top: 40px !important;
        padding: 40px 5% !important;
    }

    .location-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .location-text p {
        font-size: 14px !important;
        text-align: center !important;
        max-width: 85%;
        margin: 0 auto 20px auto;
    }

    .provinces-list {
        justify-content: center;
    }




    .form-row {
        flex-direction: column;
    }

    .about {
        margin-top: 40px !important;
    }

    .about-container {
        flex-direction: column;
        gap: 30px;
    }

    .about-text h2 {
        font-size: 1.8rem !important;
    }

    .about-text p {
        font-size: 15px !important;
        line-height: 1.4 !important;
        text-align: justify !important;
        max-width: 85% !important;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        margin-top: 40px !important;
    }
}

.privacy-note {
    font-size: 0.85rem;
    color: #0056B3;
    margin-top: 15px;
    padding: 15px;
    background-color: #E3F2FD; 
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.privacy-note span {
    width: 8px;
    height: 8px;
    min-width: 8px; /* AGGIUNTO */
    background-color: #0056B3;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Sezione Testo Lavora con noi */
.join-us-text {
    padding: 80px 5%; 
    background-color: #F0F7FF; 
    text-align: center; 
}

.container-small {
    max-width: 900px; 
    margin: 0 auto;   
    padding: 0 20px;  
}

.container-small h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0056B3;   
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* =========================================
    FIX MOBILE: "CRESCI CON NOI" & "CANDIDATURA"
   ========================================= */
@media (max-width: 768px) {
    /* Riduzione spazio sopra la sezione */
    .join-us-text { 
        margin-top: 10px !important; 
        padding: 20px 5% !important; 
    }

    /* Titolo "CRESCI CON NOI" */
    .container-small h2 { 
        font-size: 1.6rem !important; 
        margin-bottom: 10px !important;
    }

    /* Testo descrittivo */
    .container-small p {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }

    /* Titolo "INVIA LA TUA CANDIDATURA" */
    .contact-info-side h2 { 
        font-size: 1.3rem !important; 
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    /* Compattazione del contenitore form */
    .contact-container {
        margin-top: 10px !important;
        padding: 30px 20px !important;
    }
}

/* Sezione principale Carosello */
.lavori-carosello {
    padding: 40px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.titolo-lavori {
    font-size: 2.2rem;
    color: #1A244E;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.carousel-container {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-viewport {
    width: 650px;  
    height: 450px; 
    overflow: hidden;
    border-radius: 15px;
    background-color: #f0f2f5;
}

.carousel-track {
    display: flex;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-item {
    flex: 0 0 650px;
    width: 650px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    border-radius: 10px;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #1A244E;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.prev { left: -25px; }
.next { right: -25px; }

@media (max-width: 768px) {
    .titolo-lavori {
        font-size: 1.6rem !important;
        margin-bottom: 25px;
    }
    .carousel-viewport {
        width: 100% !important;
        height: 300px !important;
    }
    .carousel-item {
        flex: 0 0 100% !important;
        width: 100% !important;
        height: 300px !important;
    }
    .prev { left: 5px !important; }
    .next { right: 5px !important; }
}

/* Griglia Servizi */
.services-grid {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 230px; 
    flex-grow: 0;
}

.service-photo {
    width: 100%;
    height: 130px; 
    overflow: hidden;
}

.service-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-icon-circle {
    background-color: #eef7ff;
    color: #0056b3;
    width: 32px;
    height: 32px;
    margin: -16px auto 8px auto; 
    position: relative;
    z-index: 10;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* FIX FINALE LAYOUT FORM */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
    height: 50px !important;
    padding: 10px 15px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
}

.contact-form .form-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
}

.contact-form .btn-submit {
    background-color: #0056b3 !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 18px !important;
    width: 100% !important;
    font-weight: bold !important;
    border: none !important;
}

/* FOOTER MOBILE FIX */
@media screen and (max-width: 768px) {
    footer {
        background-color: #0A2540 !important;
        padding: 40px 20px !important;
        margin-top: 40px !important; 
        text-align: center !important;
    }
    footer p {
        font-size: 11px !important;
        line-height: 1.6 !important;
    }
}

/* ========================================= SISTEMAZIONE "CRESCI CON NOI" & "CHI SIAMO" ========================================= */ .join-us-text, .about { padding: 100px 5%; background-color: #FFFFFF; display: flex; justify-content: center; } .container-small, .about-container { max-width: 1000px; width: 100%; margin: 0 auto; text-align: center; } .container-small h2, .about-text h2 { font-size: 3.5rem; font-weight: 900; color: #0056B3; margin-bottom: 30px; text-transform: uppercase; } .container-small p, .about-text p { font-size: 1.25rem; line-height: 1.8; color: #333; max-width: 850px; margin: 0 auto; }


/* SEZIONE DOVE OPERIAMO - VERSIONE OTTIMIZZATA */
.location-map-container {
    position: relative;
    width: 100%;
    max-width: 800px; 
    height: 400px; 
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 4px solid #ffffff;
    background-color: #f0f0f0; /* Colore di caricamento */
    display: block !important; /* Forza la visibilità */
}

.location-map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Fix per schermi piccoli (Mobile) */
@media (max-width: 768px) {
    .location-map-container {
        height: 300px; /* Più bassa sui cellulari per non occupare tutto lo schermo */
        margin: 20px auto;
    }
}


/* SEZIONE DOVE OPERIAMO - VERSIONE DEFINITIVA */
.location-map-container {
    width: 100%;
    max-width: 600px; /* Ridotto leggermente per stare meglio di fianco al testo */
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 86, 179, 0.15);
    border: 5px solid #ffffff;
    background-color: #e5e5e5;
    position: relative;
}

.location-map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .location-content {
        flex-direction: column; /* Testo sopra, mappa sotto su mobile */
        padding: 0 20px;
    }
    .location-map-container {
        height: 300px;
        max-width: 100%;
    }
}
