body {
    font-family: 'Poppins', sans-serif;
    padding-top: 70px; /* Spazio per la navbar fixed */
    text-align: center;
   
}

.navbar {
    background-color: #FFFFFF; /* Bianco */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);/* Effetto ombra leggera */
}

.navbar-brand {
    color: #2F415D; /* Navy */
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-link {
    color: #000; /* Nero */
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

/* Effetto hover con linea che si espande dal centro */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #000; /* Nero */
    transition: width 0.3s ease-out;
    margin: auto;
}

.nav-link:hover::after {
    width: 100%;
}

/* Bottone CTA */
.btn-cta {
     display: inline-block;

padding: 8px 16px;
background-color: #2F415D;
/* Navy più scuro */
color: white;
font-size: 1em;
font-weight: 600;
border-radius: 8px;
text-decoration: none;
transition: all 0.3s ease-in-out;
}


.btn-cta:hover {
    background-color: #1B2C4E;
    color: white;
/* Ancora più scuro per effetto hover */
transform: scale(1.01);
}
.dropdown-item,
.navbar a, 
.navbar button,
.navbar-toggler,
.dropdown-item,
.btn-cta {
outline: none;
}

/* Stile per focus accessibile (solo per tastiera) */
.navbar a:focus-visible, 
.navbar button:focus-visible,
.navbar-toggler:focus-visible,
.dropdown-item:focus-visible,
.btn-cta:focus-visible {
outline: 2px solid #2F415D;
}


/* Menu a burger migliorato */
.navbar-toggler {
border: none;
outline: none;
box-shadow: none;
background-color: #2F415D;
color:#ffffff;
}

.navbar-toggler:focus {
box-shadow: none;
outline: none;
border-color: transparent;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}





.navbar-collapse {
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
transform-origin: top;
max-height: 1000px; /* Valore alto per contenere qualsiasi contenuto */
}




/* Aggiunto padding per evitare che il menu si chiuda */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}



/* Rimuove la freccia di default del dropdown */
.dropdown-toggle::after {
    display: none;
}

.dropdown-header {
    color: #2F415D;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.dropdown-item {
    padding: 10px 15px;
    color: #333;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 45px;
    line-height: 24px;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2F415D;
}

.dropdown-item .service-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
}

.dropdown-item .service-icon img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-top: -7px;
}

/* Gestione dell'animazione di chiusura del menu */
.navbar-collapse.closing {
    display: block;
    height: 0;
    opacity: 0;
    transition: height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
    pointer-events: none;
}

/* Impedisce interazioni durante l'animazione di chiusura */
.navbar-collapse.closing * {
    pointer-events: none;
}

/* Effetto visivo durante la chiusura */
.navbar-collapse.closing .nav-item {
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.2s ease-out;
}

/* Animazione per il dropdown */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Comportamento desktop: controllo preciso del dropdown */
@media (min-width: 992px) {
/* Comportamento hover standard */
.nav-item.dropdown:hover .dropdown-menu {
display: block;
animation: fadeInUp 0.3s ease forwards;
}

/* Area di collegamento ottimizzata */
.dropdown-menu::before {
content: '';
position: absolute;
top: -15px;
left: 0;
width: 100%;
height: 15px;
}




}


/* Comportamento mobile: mostra dropdown su click */
@media (max-width: 991.98px) {
.nav-item.dropdown:hover .dropdown-menu {
display: block; /* Disabilita l'hover su mobile */
}



.nav-item.dropdown.show .dropdown-menu {
display: block; /* Mostra solo quando la classe .show è presente */
animation: fadeInUp 0.3s ease forwards;
}

/* Aggiungi sottili linee divisorie tra gli elementi del menu su mobile */
.navbar-nav .nav-item {
    margin-bottom: 0;
    margin-right: 5px;
    padding: 8px 0;
    border-bottom: none; /* Rimuovi il bordo che causa problemi */
    position: relative; /* Per il posizionamento dell'pseudo-elemento */
}

.navbar-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 15px;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
}




/* Hover/touch effect per i link principali su mobile - migliorato */
.navbar-nav .nav-item .nav-link {
padding: 10px 15px;
border-radius: 6px;
transition: all 0.1s ease;
position: relative;
}

.navbar-nav .nav-item .nav-link:active {
background-color: rgba(47, 65, 93, 0.1); /* Colore più visibile */
color: #2F415D !important;
transform: scale(0.98); /* Leggero effetto di pressione */
}





/* Rimuovi l'effetto hover permanente su mobile */
.navbar-nav .nav-item .nav-link:hover {
background-color: transparent;
color: inherit !important;
}



.nav-link::after {
display: none;
}

.navbar-nav .nav-item:last-child {
border-bottom: none;
}

/* Rimuovi la linea sotto Soluzioni su mobile */
.nav-item.dropdown .nav-link::after {
display: none;
}

.dropdown-menu {
position: static;
float: none;
width: 90%;
transform: none;
left: auto;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
border-radius: 12px;
margin: 10px auto;
padding: 15px;
background-color: white;
}

/* Stile header su mobile - rimuove doppia linea */
.dropdown-header {
color: #2F415D;
font-weight: 600;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 1px;
padding: 8px 0;
margin-bottom: 10px;
text-align: center;
border-bottom: 1px solid #f0f0f0;
}


/* Stile elementi dropdown su mobile */
.dropdown-item {
padding: 12px 15px 12px 40px;
color: #333;
font-weight: 500;
border-radius: 6px;
transition: all 0.2s ease;
position: relative;
display: flex;
align-items: center;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}

.dropdown-item:last-child {
border-bottom: none;
}

/* Migliora allineamento icone con testo */
.dropdown-item .service-icon {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
background-color: #ffffff;
}

.dropdown-item .service-icon img {
width: 20px;
height: 20px;
vertical-align: middle;


}

/* Rimuovi i separatori duplicati */
.dropdown-menu li:not(:first-child):not(:last-child) {
border-bottom: none;
padding-bottom: 0;
margin-bottom: 0;
}
}  