/* ==========================================================================
   HEADER TEMPLATE STYLES
   ========================================================================== */
  
.navbar {display: flex; flex-direction: column;}
.navbar-brand svg{max-width: 280px;}
.navbar-expand-lg .navbar-nav .menu-item:first-child {padding-left: 0;}
.navbar-expand-lg .navbar-nav .nav-link {padding: 0;}
.nav-link {
  font-size: var(--font-size-md); 
  font-weight: var(--font-weight-regular);
  transition: color 0.3s ease;
}

/* Effetto hover applicato al menu-item */
.menu-item {
  position: relative;
}

.menu-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem; /* Allineato al contenuto del testo */
  right: 1rem; /* Allineato al contenuto del testo */
  height: 2px;
  width: auto;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--color-primary) 0%, rgba(44, 90, 160, 0.7) 100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-item:first-child::after {
  left: 0; /* Primo elemento senza padding sinistro */
}

.menu-item:hover::after {
  transform: scaleX(1);
}

/* Classe active - linea sempre visibile */
.menu-item.active::after,
.current-menu-item::after {
  transform: scaleX(1) !important;
}

.container_menu {display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 135px;}
.container_after_header {display: flex;}

.navbar-nav {display: flex; justify-content: space-between; width: 100%;}
.navbar-collapse {width: 100%;}
.motto {margin-top: 20px; font-size: var(--font-size-xl); font-weight: var(--font-weight-medium); color: var(--color-secondary);}

.motto,.line,.hide_to_scroll { transition: all 0.5s ease-in-out;}
#site-navbar {transition: all 0.5s ease-in-out;}
#site-navbar.active {box-shadow: 0 0 10px #00000014; background-color: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); height: 100px;}

.category:not(.category-portfolio) .nav-link, .category:not(.category-portfolio) .motto {color: #fff;}
.category:not(.category-portfolio) .cls-1 {fill: #fff;}
.category:not(.category-portfolio) .cls-2 {fill: #fff;}
.category:not(.category-portfolio) .cls-3 {fill: #fff;}
.category:not(.category-portfolio) .hide_to_scroll {fill: #ffffff92;}

/* Linee bianche per categorie su sfondo scuro */
.category:not(.category-portfolio) .menu-item::after {
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
}

.category.category-news-press .nav-link {color: var(--color-secondary) !important;}
.category.category-news-press .cls-1 {fill: #003067 !important;}
.category.category-news-press .cls-2 {fill: #383a40 !important;}
.category.category-news-press .cls-3 {fill: #bababa !important;}
.category.category-news-press .hide_to_scroll {fill: #000 !important;}
.category.category-news-press .menu-item.active .nav-link {color: var(--color-primary) !important;}
.category.category-news-press .motto {color: var(--color-secondary) !important;}

.home .cls-1 {fill: #fff;}
.home .cls-2 {fill: #fff;}
.home .cls-3 {fill: #fff;}
.home .hide_to_scroll {fill: #ffffff92;}

.home .active .cls-1 {fill: #003067;}
.home .active .cls-2 {fill: #383a40;}
.home .active .cls-3 {fill: #bababa;}
.home .active .hide_to_scroll {fill: #ffffff92;}

.home .active .nav-link {color: var(--bs-nav-link-color);}


.category-8 .active .cls-1 {fill: #003067;}
.category-8 .active .cls-2 {fill: #383a40;}
.category-8 .active .cls-3 {fill: #bababa;}
.category-8 .active .hide_to_scroll {fill: #ffffff92;}

.category-8 .active .nav-link {color: var(--bs-nav-link-color);}

.single-post .nav-link, .home .nav-link, .single-post .motto, .home .motto {color: #fff;}
.single-post .cls-1 {fill: #fff;}
.single-post .cls-2 {fill: #fff;}
.single-post .cls-3 {fill: #fff;}
.single-post .hide_to_scroll {fill: #ffffff92;}

/* Motto bianco per categorie specifiche */
.category-impianti .motto,
.category-prodotti .motto {
  color: #fff !important;
}

/* Nav-link bianchi per categorie specifiche */
.category-impianti .nav-link,
.category-prodotti .nav-link {
  color: #fff;
}

/* Linee bianche per categorie specifiche su sfondo scuro */
.category-impianti .menu-item::after,
.category-prodotti .menu-item::after {
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
}

/* Linee bianche per home e single-post su sfondo scuro */
.single-post .menu-item::after, 
.home .menu-item::after {
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
}

.single-post .active .nav-link, .single-post.active .motto {color: var(--color-primary);}
.single-post .active .cls-1 {fill: var(--color-primary);}
.single-post .active .cls-2 {fill: var(--color-primary);}
.single-post .active .cls-3 {fill: var(--color-primary);}
.single-post .active .hide_to_scroll {fill: #ffffff92;}

.single-post.active .motto {color: var(--color-primary);}

.menu-item.active .nav-link {color: var(--color-primary); position: relative;}

/* Regole specifiche per active in diversi contesti */
.single-post .menu-item.active .nav-link {color: #fff !important;}
.category .menu-item.active .nav-link {color: #fff !important;}
.category-portfolio .menu-item.active .nav-link {color: var(--color-primary) !important;}

/* Linee per elementi active in diversi contesti */
.category-portfolio .menu-item.active::after {
  background: linear-gradient(90deg, var(--color-primary) 0%, rgba(44, 90, 160, 0.7) 100%) !important;
}

.home .menu-item.active .nav-link {color: var(--color-primary) !important;}
.home .menu-item.active::after {
  background: linear-gradient(90deg, var(--color-primary) 0%, rgba(44, 90, 160, 0.7) 100%) !important;
}

