:root {
    --primary-blue: #003d82;
    --dark-blue: #002855;
    --light-blue: #0052a3;
    --accent-orange: #ff6b35;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --border-gray: #e0e0e0;
    --header-height: 72px;
    --header-gap: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 61, 130, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    
    background: linear-gradient(
        110deg, 
        var(--dark-blue) 33%, 
        var(--white) 33%, 
        var(--white) 34.5%, 
        var(--primary-blue) 34.5%
    );

    /* background-color: var(--primary-blue); */
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* overflow: hidden; */

    position: relative; 
}

.header-content {
   display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* Forza l'header a stendersi da un bordo all'altro dello schermo del PC */
    width: 100v; 
    max-width: 100%; 
    
    /* Regola lo spazio dai bordi: 30px dal logo a sx e 30px dai link a dx */
    padding: 0 90px 0 30px; 
    
    /* Annulla i vecchi margini del .container che bloccavano la struttura al centro */
    margin: 0;
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;

    margin-right: auto;
    margin-left: 200px;
    
    text-decoration: none;

    z-index: 2;

    padding-left: 10px;

}

.logo-img {
    width: 180px;

    height: auto;

    padding: 5px;

    display: block;

    object-fit: contain;
}

.intro-logo-container {  
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 0;
    z-index: 3;
    pointer-events: none;
}

.intro-logo-wrapper {
    width: 100px;
    height: 200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: scale(1);
    filter: blur(4px);
    transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}

.intro-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.intro-logo-wrapper.visible {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.intro-logo-wrapper.fade-out {
    opacity: 0;
    filter: blur(6px);
    transition: opacity 1.2s ease, filter 1.2s ease;
}

.intro-logo.fade-out {
    opacity: 0;
    filter: blur(6px);
    transition: opacity 1.2s ease, filter 1.2s ease;
}



.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    visibility: visible;
    /* filter: blur(4px); */
    transition: filter 0.6s ease, opacity 0.8s ease;
}

.hero-video.clear {
    filter: none;
}

.fade-in-logo {
    opacity: 0; /* Parte invisibile */
    animation: logoAppear 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s; /* Rende l'avvio più fluido all'ingresso */
}

@keyframes logoAppear {
    from {
        opacity: 0;
        transform: translateX(-20px); /* Stato iniziale (Invisibile e spostato) */
    }
    to {
        opacity: 1;
        transform: translateX(0);   /* Stato finale (Visibile e in posizione) */
    }
}

.logo-text {
    color: var(--white);
}

/* NAVIGATION */
.nav {

    
    display: flex;
    gap: 6.5rem;
    align-items: center;
    margin-left: auto;
    margin-right: 280px;
    z-index: 2;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.4rem;
    position: relative;
    transition: var(--transition);
    margin: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-orange);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    width: 36px;
    height: 4px;
    background-color: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    padding: 0;
    text-align: center;
    padding-top: calc(var(--header-height) + var(--header-gap));
    width: 100%;
    aspect-ratio: 18 / 9;
    max-height: 580px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center  ;
    display: block;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== CTA BUTTON ===== */
.cta-button {
    display: inline-block;
    background-color: var(--accent-orange);
    color: var(--white);
    padding: 0.9rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.cta-button:hover {
    background-color: #e55a28;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.4);
}

.cta-button-white {
    background-color: var(--white);
    color: var(--primary-blue);
}

.cta-button-white:hover {
    background-color: var(--light-gray);
}

/* ===== SERVICES SECTION ===== */
.services {
    background-color: var(--white);
    padding: 5rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;

    margin-left: auto;
    margin-right: auto;

    margin-bottom: 4rem;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--light-blue));
    border-radius: 2px;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.service-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    animation: fadeIn 0.8s ease-out both;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-right {
    direction: rtl;
}

.card-right > * {
    direction: ltr;
}

.service-image {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-image:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-image:hover img {
    transform: scale(1.05);
}

.service-content h3 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
}

.service-link {
    display: inline-block;
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.service-link:hover {
    border-bottom-color: var(--accent-orange);
    transform: translateX(5px);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.7rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.85;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-orange);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent-orange);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin-top: 3rem; /* Crea un bel distacco pulito dalle colonne sopra */
    
    /* Forza il blocco a prendersi l'orizzontale completo della pagina */
    width: 100%; 
    display: flex;
    justify-content: center; /* Centra il contenuto al millimetro */
    align-items: center;
    
    opacity: 0.8;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
   html body .header {
        /* Spostiamo la diagonale bianca più a destra (al 48%) così il logo non viene schiacciato */
        background: linear-gradient(
            110deg, 
            var(--dark-blue) 53%, 
            var(--white) 53.3%, 
            var(--white) 57.2%, 
            var(--primary-blue) 57.5%
        );
        padding: 0.8rem 0;
    }

    .header-content {
        /* Riduce i padding laterali per gli schermi piccoli e forza la larghezza */
        padding: 0 24px; 
        width: 100%;
    }

    /* Header Mobile */
    .hamburger {
        display: flex;
        /* Spinge l'hamburger tutto a destra automaticamente */
        margin-left: 0;
        margin-right: 30px; 

        gap: 7px;
        padding: 8px;
    }

    .logo {
        margin-left: 0px;
        position: relative;
        z-index: 2; /* Tiene il logo sopra il gradiente */
    }

    .nav {
            position: absolute; 
            top: var(--header-height, 70px); 
            left: 0;
            width: 100vw;
            background-color: var(--dark-blue);
        
            display: flex;
            flex-direction: column;
            gap: 0;
            
            max-height: 0;
            overflow: hidden;
            
            /* SOSTITUISCI transition: var(--transition); CON QUESTA RIGA: */
            transition: max-height 0.3s ease-in-out; 
            
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 999; 
        }

    .nav.active {
        /* FIX 3: Alzato a 400px perché i tuoi link sono grandi (1.4rem + padding) e venivano troncati */
        max-height: 400px; 
    }

    .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background-color: rgba(255, 107, 53, 0.2);
    }

    /* Hero Mobile */
    .hero {
        padding: 3rem 1rem;
        min-height: 260px;
        max-height: 300px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Services Mobile */
    .section-title {
        font-size: 1.8rem;
    }

    .service-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-right {
        direction: ltr;
    }

    .service-image {
        height: 250px;
    }

    .service-content h3 {
        font-size: 1.5rem;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.8rem 0;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 1rem;
        min-height: 240px;
        max-height: 280px;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .services {
        padding: 2.5rem 1rem;
    }

    .service-card {
        gap: 1rem;
    }

    .service-image {
        height: 200px;
    }

    .service-content h3 {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 0.95rem;
    }

    .footer-section h4 {
        font-size: 1rem;
    }
}

/* ===== PAGINE AGGIUNTIVE ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-content {
    padding: 3rem 2rem;
}

.content-section {
    max-width: 800px;
    margin: 2rem auto;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* FORM STYLES */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-button {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.9rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-button:hover {
    background-color: var(--light-blue);
    transform: translateY(-3px);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.info-card {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.info-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-light);
}


/* FORMATTAZIONE VIDEO INTRO */

#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000; /* Sfondo nero di sicurezza mentre carica */
    z-index: 99999; /* Valore altissimo per stare SOPRA all'header (che ha 1000) */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

#intro-screen video {
    width: 100%;
    height: 100%;
    /* MODIFICATO: Usiamo contain invece di cover per non tagliare le scariche elettriche */
    object-fit: contain; 
}

/* Pulsante "Salta Presentazione" */
#skip-intro-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    z-index: 100000;
    transition: var(--transition);
    backdrop-filter: blur(5px); /* Effetto vetro sfocato sullo sfondo del tasto */
}

#skip-intro-btn:hover {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    transform: scale(1.05);
}

/* Classe per la dissolvenza in uscita */
#intro-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Nasconde la barra di scorrimento del sito finché c'è l'intro */
body.intro-active {
    overflow: hidden;
}

/* ========================================================
   NUOVO CODICE: OTTIMIZZAZIONE RESPONSIVE PER TELEFONO 
   ======================================================== */
@media (max-width: 768px) {
    #intro-screen video {
        width: 100vw;   /* Forza la larghezza video al 100% dello schermo del telefono */
        height: auto;   /* Adatta l'altezza mantenendo le proporzioni della scritta G&D */
    }

    #skip-intro-btn {
        right: 50%;                 /* Centra il tasto orizzontalmente */
        transform: translateX(50%); /* Corregge l'allineamento per centrarlo al millimetro */
        bottom: 30px;               /* Lo tiene comodo da cliccare in basso con il pollice */
        font-size: 0.9rem;          /* Testo leggermente più piccolo per gli schermi stretti */
        padding: 0.7rem 1.8rem;
    }

    #skip-intro-btn:hover {
        transform: translateX(50%) scale(1.05); /* Mantiene la centratura anche quando ci passi sopra */
    }
}

/* ===== EFFETTO TRANSIZIONE SLIDESHOW DINAMICO ===== */
.service-image img[data-total] {
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}


/* ===== SEZIONE LA NOSTRA STORIA ===== */
.about-section {
    padding: 5rem 0;
    background-color: var(--white);
    width: 100%;
}

/* Contenitore dedicato (sostituisce il vecchio .container in questa sezione) */
.container-about {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* La griglia principale: forza le due colonne affiancate in modo nativo */
.about-grid-fixed {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% a sinistra e 50% a destra */
    gap: 4rem;
    align-items: start;
    width: 100%;
}

.about-content {
    width: 100%;
}

.about-media-fixed {
    width: 100%;
    transform: translate(40px, 70px);
}

/* FORMATO ORIZZONTALE DELLA FOTO (Rapporto 16:9 televisivo/panoramico) */
.media-wrapper-fixed {
    width: 100%;
    aspect-ratio: 16 / 9; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-img-fixed {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Riempie il rettangolo senza deformarsi */
    display: block;
}

/* TESTI E TITOLI */
.about-title {
    font-size: 2.2rem;
    color: var(--dark-blue);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--accent-orange);
    border-radius: 2px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* LE 4 ICONE IN BASSO */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gray);
}

.feature-item {
    text-align: center;
}

.feature-icon img {
    width: 45px;
    height: 45px;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.feature-item p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.3;
}

/* RESPONSIVE FLUIDO */
@media (max-width: 992px) {
    .about-grid-fixed {
        gap: 2rem;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}

@media (max-width: 768px) {
    .about-grid-fixed {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Azzera lo spostamento sui telefoni così la foto torna dritta e centrata */
    .about-media-fixed {
        transform: translate(0, 0); 
        margin-top: 0;
        margin-left: 0;
    }
}

/* SEZIONE CONTATTI E REFERENTI */

/* --- STRUTTURA DELLA SEZIONE --- */
.contacts-section {
    padding: 5rem 0;
    background-color: #f9fbfd; /* Sfondo leggermente azzurrato per far risaltare i box bianchi */
    width: 100%;
}

/* Contenitore allargato a 1300px per dare spazio alle card giganti */
.container-contacts {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- GRIGLIA SUPERIORE: 4 BOX AZIENDALI INGRANDITI --- */
.info-boxes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem; /* Aumentato lo stacco dal titolo sotto */
}

.info-box {
    background-color: var(--white, #ffffff);
    border-radius: 8px;
    padding: 3rem 2rem; /* Spazio interno maggiorato per ingrandire il box */
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cerchio icona più grande */
.info-icon-circle {
    width: 85px;
    height: 85px;
    background-color: #f0f4f9;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Icona SVG interna più grande */
.info-icon-circle img {
    width: 38px;
    height: 38px;
    display: block;
}

.info-box h3 {
    font-size: 1.15rem; /* Font aumentato */
    color: var(--dark-blue, #002244);
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 1rem;
}

.info-box p {
    font-size: 1.05rem; /* Font aumentato */
    color: var(--text-light, #666666);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.info-box p a {
    color: var(--text-light, #666666);
    text-decoration: none;
    transition: color 0.2s;
}

.info-box p a:hover {
    color: var(--primary-blue, #003d82);
}

/* Lineetta arancione proporzionata al nuovo box */
.orange-bar {
    width: 50px;
    height: 4px;
    background-color: var(--accent-orange, #ff6600);
    border-radius: 2px;
}

/* --- INTESTAZIONE SEZIONE REFERENTI --- */
.referents-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.title-orange-line {
    width: 50px;
    height: 4px;
    background-color: var(--accent-orange, #ff6600);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.referents-header h2 {
    font-size: 2.2rem;
    color: var(--dark-blue, #002244);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.referents-header p {
    color: var(--text-light, #666666);
    font-size: 1.05rem;
}

/* --- GRIGLIA BASSA: BLOCCO BLINDATO TRE REFERENTI IN LINEA --- */
.contacts-section .referents-row-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch; /* Mantiene le schede con l'altezza allineata */
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
    box-sizing: border-box;
}

/* La singola scheda del referente ingrandita */
.contacts-section .referents-row-grid .referent-card {
    flex: 1; /* Divide lo spazio perfettamente in 3 parti uguali */
    background-color: var(--white, #ffffff);
    border-radius: 12px;
    padding: 3.5rem 2rem 2.5rem; /* Spazio interno maggiorato */
    text-align: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Foto profilo tonda maggiorata (da 120px a 140px) */
.avatar-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.8rem;
    background-color: #f0f0f0;
}

.referent-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.referent-card h3 {
    font-size: 1.5rem; /* Nome più grande e leggibile */
    color: var(--primary-blue, #003d82);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

/* --- BLOCCO DETTAGLI E MINI ICONE SVG --- */
.referent-details {
    margin-bottom: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.ref-contact-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
}

.ref-mini-icon {
    width: 18px; /* Proporzionata al font maggiorato */
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.ref-contact-line a {
    color: var(--primary-blue, #003d82);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem; /* Testo dei link più grande */
    transition: color 0.2s;
}

.ref-contact-line a:hover {
    color: var(--accent-orange, #ff6600);
}

/* --- BOTTONI RAPIDI DI AZIONE INGRANDITI --- */
.referent-actions {
    display: flex;
    gap: 0.8rem;
    width: 100%;
    margin-top: auto; /* Spinge i pulsanti simmetricamente in fondo alla scheda */
}

.btn-action {
    flex: 1;
    padding: 0.9rem 0.5rem; /* Bottoni più alti e facili da cliccare */
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-call {
    border: 1px solid var(--primary-blue, #003d82);
    color: var(--primary-blue, #003d82);
    background-color: transparent;
}

.btn-call:hover {
    background-color: var(--primary-blue, #003d82);
    color: #ffffff;
}

.btn-whatsapp {
    border: 1px solid #25D366;
    color: #25D366;
    background-color: transparent;
}

.btn-whatsapp:hover {
    background-color: #25D366;
    color: #ffffff;
}

/* --- VERSIONE RESPONSIVE FLUIDA --- */
@media (max-width: 1024px) {
    .info-boxes-grid {
        grid-template-columns: repeat(2, 1fr); /* Diventa 2x2 sui tablet */
        gap: 1.5rem;
    }
    .contacts-section .referents-row-grid {
        gap: 1rem; /* Stringe leggermente il passo tra i referenti */
    }
}

@media (max-width: 768px) {
    .info-boxes-grid {
        grid-template-columns: 1fr; /* Box tutti in colonna singola */
    }
    
    /* I tre referenti si dispongono in verticale solo sugli smartphone per non schiacciarsi */
    .contacts-section .referents-row-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .btn-action {
        padding: 1rem 0.5rem; /* Ancora più grandi sui telefoni per il "touch" delle dita */
    }
}

/* ========================================================
   HERO BANNER - PAGINA CHI SIAMO (MODIFICATO PER ALLARGARE L'IMMAGINE)
   ======================================================== */
.page-hero {
    position: relative;
    width: 100%;
    min-height: 300px;
    background-color: var(--dark-blue);
    background: linear-gradient(100deg, #001f3f 0%, var(--dark-blue) 45%, var(--primary-blue) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Griglia contenitore: allargata al 100% per far estendere l'immagine */
.page-hero-container {
    width: 100%;
    max-width: 100%; /* Tolto il limite di 1400px per usare tutto lo schermo */
    margin: 0 auto;
    display: grid;
    /* CAMBIATO: 0.6fr per il testo (30%) e 1.4fr per l'immagine (70%) */
    grid-template-columns: 0.8fr 1.2fr; 
    align-items: center;
    position: relative;
    z-index: 2;
}

/* --- COLONNA TESTI (SINISTRA) --- */
.page-hero-content {
    /* Ridotto leggermente il padding destro per dare spazio all'immagine */
    padding: 1.5rem 1rem 1.5rem 5vw; 
    color: var(--white);
    z-index: 3;
}

.page-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

/* Lineetta arancione sotto al titolo */
.title-accent {
    width: 60px;
    height: 5px;
    background-color: var(--accent-orange);
    border-radius: 2px;
    margin-bottom: 1.8rem;
}

.page-hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* --- COLONNA IMMAGINE E SFUMATURA (DESTRA) --- */
.page-hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.page-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Maschera: la sfumatura parte prima (20%) così l'immagine si vede di più verso sinistra */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%);
    mask-image: linear-gradient(to right, transparent 0%, black 30%);
}

/* Overlay sfumato di supporto */
.image-fade-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--dark-blue) 0%, rgba(0, 40, 85, 0.4) 20%, transparent 60%);
    pointer-events: none;
}

/* RESPONSIVE PER SMARTPHONE E TABLET */
@media (max-width: 992px) {
    .page-hero-container {
        grid-template-columns: 1fr;
    }

    .page-hero-content {
        padding: 3rem 2rem 2rem;
        text-align: center;
    }

    .title-accent {
        margin: 0 auto 1.5rem;
    }

    .page-hero-image-wrapper {
        min-height: 250px;
    }

    .page-hero-img {
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
    }

    .image-fade-overlay {
        background: linear-gradient(to bottom, var(--dark-blue) 0%, transparent 60%);
    }
}

@media (max-width: 480px) {
    .page-hero-title {
        font-size: 2.4rem;
    }
    .page-hero-subtitle {
        font-size: 1.1rem;
    }
}



/* ===== SEZIONE MAPPA GOOGLE MAPS ===== */
.map-section {
    padding-top: 4rem;
    margin-top: 3rem;
    margin-bottom: 7rem; /* Stacco generoso dal footer */
    border-top: 1px solid var(--border-gray);
}

.map-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    background-color: #f0f4f9;
}

.map-wrapper iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .map-wrapper iframe {
        height: 350px;
    }
    
    .map-section {
        margin-bottom: 5rem;
    }
}