/* ITSOS custom header — ported from Neve itsos-site.css for Flatsome */


:root {
  /* Un solo font sul sito: Outfit (Google Fonts, handle `itsos-fonts` in itsos-theme.php) */
  --itsos-font-stack: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Token Elementor / ITSOS — scala demo TheGem: titoli grandi 300, enfasi / h5 500, corpo 300 */
  --e-global-typography-primary-font-family: var(--itsos-font-stack);
  --e-global-typography-primary-font-weight: 300;
  --e-global-typography-secondary-font-family: var(--itsos-font-stack);
  --e-global-typography-secondary-font-weight: 300;
  --e-global-typography-text-font-family: var(--itsos-font-stack);
  --e-global-typography-text-font-weight: 300;
  --e-global-typography-accent-font-family: var(--itsos-font-stack);
  --e-global-typography-accent-font-weight: 500;

  /* Neve: valore letterale (evita doppio var() in alcuni browser sulle custom props) */
  --bodyfontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --headingsfontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h1fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h2fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h3fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h4fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h5fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --h6fontfamily: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  --nv-fallback-ff: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;

  --itsos-bg: #ffffff;
  --itsos-bg-2: #ffffff;
  --itsos-accent: #15d0ff;
  --itsos-accent-2: #3a87ff;
  --itsos-text: #000000;
  --itsos-dark-text: #000000;
  --itsos-muted: #2b2b2b;
  --itsos-border: #e3e3e3;
  --itsos-shell: 1240px;
  --itsos-header-h: 96px;
  --itsos-header-bottom-h: 0px;
  --itsos-primary: #FF9517;
}

/* Stack: header top + barra percorso L3 sotto (fixed — su Neve era in header.header fixed) */
.itsos-header-stack {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10001;
  transform: translateY(0);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.itsos-demo-header {
  position: relative;
  z-index: 10002;
}

.itsos-demo-header__bar {
  background: #fff;
  backdrop-filter: none;
  border-bottom: 0;
  box-shadow: none !important;
  position: relative;
  z-index: 10002;
  height: var(--itsos-header-h);
  min-height: var(--itsos-header-h);
  max-height: var(--itsos-header-h);
  overflow: visible;
  box-sizing: border-box;
}

.itsos-demo-header__inner {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  min-height: 0;
  padding: 0 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
  box-sizing: border-box;
}

.itsos-demo-header__logo img {
  width: 72px;
  display: block;
}

.itsos-demo-header__logo {
  flex: 0 0 72px;
}

.itsos-demo-header__nav > ul.itsos-nav-menu,
.itsos-demo-header__nav > ul.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.itsos-demo-header__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  padding: 0 20px 0 40px;
}

/* --- Livello 1 (TheGem / demo): bordo sotto, 20/30, Outfit 500 --- */
.itsos-demo-header__nav > ul > li {
  position: relative;
  margin: 0;
  padding: 0 6px;
  list-style: none;
  border: 0;
}

.itsos-demo-header__nav > ul > li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.15em;
  background: #000;
  pointer-events: none;
}

.itsos-demo-header__nav > ul > li > a {
  display: block;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0 10px 5px;
  border: 0;
  border-bottom: 1px solid #000;
  background: transparent;
  font-family: var(--itsos-font-stack) !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 30px !important;
  color: #000 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  letter-spacing: normal;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

.itsos-demo-header__nav > ul > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #000;
  vertical-align: middle;
  transition: border-top-color 0.3s ease;
}

/* L1: hover leggero (demo: niente salto arancione sul link; solo coerenza bordo) */
.itsos-demo-header__nav > ul > li:hover > a,
.itsos-demo-header__nav > ul > li.submenu-open > a,
.itsos-demo-header__nav > ul > li:focus-within > a {
  color: #000 !important;
  border-bottom-color: #000 !important;
}

.itsos-demo-header__nav > ul > li.current-menu-item > a,
.itsos-demo-header__nav > ul > li.current-menu-ancestor > a {
  border-bottom-color: #FF9517;
}

.itsos-demo-header__nav > ul > li.current-menu-item.menu-item-has-children > a::after,
.itsos-demo-header__nav > ul > li.current-menu-ancestor.menu-item-has-children > a::after {
  border-top-color: #FF9517;
}

/* --- Pannelli sottomenu (L2, L3, …): ombra demo, transizione 0.3s linear --- */
.itsos-demo-header__nav ul.sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  margin: -1px 0 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  width: 280px;
  max-width: min(280px, 92vw);
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: rgba(0, 0, 0, 0.07) 0 0 20px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: transform 0.3s linear, opacity 0.3s linear, visibility 0.3s linear;
  z-index: 10010;
}

/* L3: flyout a destra (menu originale) — la riga funnel è vista aggiuntiva sotto la barra */
.itsos-demo-header__nav ul.sub-menu ul.sub-menu {
  left: calc(100% + 6px);
  top: -6px;
  margin-top: 0;
  z-index: 10022;
}

/* Ponte invisibile per il gap L2→L3 (evita chiusura durante il traverse del puntatore) */
.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children > ul.sub-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: -10px;
  width: 10px;
  height: 100%;
  background: transparent;
}

/* L3: stesso comportamento tendina del child theme (hover / focus / submenu-open) */
.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children:hover > ul.sub-menu,
.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children.submenu-open > ul.sub-menu,
.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.itsos-demo-header__nav li:hover > ul.sub-menu,
.itsos-demo-header__nav li.submenu-open > ul.sub-menu,
.itsos-demo-header__nav li:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- Voci L2 e L3 (stesso stile): Outfit 300, 17/20 --- */
.itsos-demo-header__nav ul.sub-menu > li {
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
}

.itsos-demo-header__nav ul.sub-menu > li > a {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 15px 30px 15px 27px;
  border: 0;
  border-left: 3px solid transparent;
  background-color: transparent;
  font-family: var(--itsos-font-stack) !important;
  font-size: 17px !important;
  font-weight: 300 !important;
  line-height: 20px !important;
  color: #000 !important;
  text-decoration: none !important;
  white-space: normal;
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease, border-left-color 0.3s ease;
  opacity: 1 !important;
  filter: none !important;
}

.itsos-demo-header__nav ul.sub-menu > li > a:hover,
.itsos-demo-header__nav ul.sub-menu > li > a:focus {
  background-color: rgba(255, 149, 23, 0.12);
  color: #000 !important;
  border-left-color: rgba(255, 149, 23, 0.45);
}

.itsos-demo-header__nav ul.sub-menu > li.current-menu-item > a,
.itsos-demo-header__nav ul.sub-menu > li.current-menu-ancestor > a,
.itsos-demo-header__nav ul.sub-menu > li.is-funnel-l2-active > a {
  background-color: #FF9517;
  color: #000 !important;
  border-left-color: transparent;
}

.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children > a {
  padding-right: 36px;
}

.itsos-demo-header__nav ul.sub-menu > li.menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -4px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #000;
  opacity: 0.55;
}

.itsos-demo-header__nav a:focus-visible {
  outline: 2px solid #FF9517;
  outline-offset: 2px;
}

/* --- Header bottom: percorso L3 (solo click / pagina L3), arancione, testi bianchi --- */
.itsos-header-bottom {
  display: none;
  position: relative;
  z-index: 10001;
  width: 100%;
  box-sizing: border-box;
  background: #FF9517;
  padding: 10px 21px 12px;
  border-top: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.itsos-header-bottom[hidden] {
  display: none !important;
}

.itsos-header-bottom.is-visible {
  display: block;
}

.itsos-header-bottom__nav {
  max-width: none;
  width: 100%;
}

.itsos-header-bottom .itsos-funnel-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 6px 2px;
}

.itsos-header-bottom .itsos-funnel-menu > li.itsos-funnel-step {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.itsos-header-bottom .itsos-funnel-step:not(:last-child)::after {
  content: "|  -  >";
  display: inline-block;
  flex-shrink: 0;
  margin: 0 10px 0 8px;
  font-family: var(--itsos-font-stack) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

.itsos-header-bottom .itsos-funnel-step > a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  box-sizing: border-box;
  padding: 2px 4px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  font-family: var(--itsos-font-stack) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: #fff !important;
  text-decoration: none !important;
  white-space: normal;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.itsos-header-bottom .itsos-funnel-step__num {
  flex: 0 0 auto;
  min-width: 1.1em;
  font-family: var(--itsos-font-stack) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: #fff !important;
  opacity: 0.95;
}

.itsos-header-bottom .itsos-funnel-step__label {
  flex: 1 1 auto;
  min-width: 0;
}

.itsos-header-bottom .itsos-funnel-step > a:hover,
.itsos-header-bottom .itsos-funnel-step > a:focus {
  color: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: #fff !important;
}

.itsos-header-bottom .itsos-funnel-step.is-current > a,
.itsos-header-bottom .itsos-funnel-step > a[aria-current="page"] {
  color: #fff !important;
  border-bottom-width: 2px;
  border-bottom-color: #fff !important;
  font-weight: 500 !important;
}

.itsos-demo-header__brand {
  flex: 0 0 72px;
  text-align: right;
  color: #000;
  font-family: var(--itsos-font-stack);
  font-weight: var(--e-global-typography-primary-font-weight);
  font-size: 100px;
  line-height: 90px;
  flex-basis: auto;
  white-space: nowrap;
  text-decoration: none;
}

.itsos-demo-header__brand-accent {
  color: #FF9517;
}

.itsos-demo-header__menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  z-index: 10002;
}

.itsos-demo-header__menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: #000;
}

.itsos-demo-header__panel {
  position: fixed;
  top: 0;
  left: -100%;
  right: auto;
  width: min(92vw, 390px);
  height: 100vh;
  background: #fff;
  border-right: 1px solid rgba(12, 30, 51, 0.12);
  transition: left 0.28s ease;
  padding: 20px;
  color: #111;
  z-index: 10003;
  overflow-y: auto;
}

.itsos-demo-header__panel.is-open {
  left: 0;
}

.itsos-demo-header__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10002;
}

.itsos-demo-header__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.itsos-demo-header__close {
  color: #111;
  background: transparent;
  border: 1px solid rgba(12, 30, 51, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.itsos-demo-header__mobile-nav {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
}

.itsos-demo-header__mobile-nav .sub-menu {
  list-style: none;
  margin: 6px 0 10px 14px;
  padding: 0;
  position: static;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  background: transparent;
  border: 0;
  min-width: 0;
  display: none;
  visibility: visible;
}

.itsos-demo-header__mobile-nav .sub-menu a {
  color: #111;
  font-size: 15px;
}

.itsos-demo-header__mobile-nav li.mobile-open > .sub-menu {
  display: block;
}

.itsos-demo-header__mobile-nav li {
  margin: 0 0 8px;
}

.itsos-demo-header__mobile-nav .itsos-mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.itsos-demo-header__mobile-nav .itsos-mobile-nav-row > a {
  flex: 1 1 auto;
  min-width: 0;
}

.itsos-demo-header__mobile-nav .itsos-mobile-submenu-toggle {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(12, 30, 51, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.itsos-demo-header__mobile-nav .itsos-mobile-submenu-toggle span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.2s ease;
}

.itsos-demo-header__mobile-nav li.mobile-open > .itsos-mobile-nav-row .itsos-mobile-submenu-toggle span {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.itsos-demo-header__mobile-nav a {
  color: #111;
  text-decoration: none;
  font-size: 18px;
  font-family: var(--itsos-font-stack);
  font-weight: var(--e-global-typography-accent-font-weight);
  display: inline-block;
  padding: 4px 0;
}

.itsos-demo-header__meta p {
  margin: 0 0 8px;
  color: #333;
}

.itsos-demo-header__cta {
  display: inline-flex;
  margin: 10px 0 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.itsos-demo-header__panel img {
  width: 28px;
}

.itsos-demo-header__bar.is-scrolled {
  background: #fff;
  box-shadow: none;
}

body.itsos-menu-open {
  overflow: hidden;
}

/* Real full-width homepage */
.home #wrapper,
.home .neve-main,
.home .single-page-container.container,
.page-home4 #wrapper,
.page-home4 .neve-main,
.page-home4 .single-page-container.container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#wrapper {
  /* Reserve space for the custom demo header (prevents content underlapping). */
  padding-top: var(--itsos-header-h);
}

body.has-itsos-header-bottom #wrapper,
body.has-itsos-header-bottom.itsos-header-sticky #wrapper {
  padding-top: calc(var(--itsos-header-h) + var(--itsos-header-bottom-h, 0px));
}

body.itsos-header-sticky {
  /* Spazio header già su #wrapper — evita doppia fascia bianca in scroll */
  padding-top: 0 !important;
}

body.has-itsos-header-bottom.itsos-header-sticky {
  padding-top: 0 !important;
}

.itsos-header-stack.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.itsos-header-stack.is-hidden {
  transform: translateY(-105%);
  opacity: 0.98;
}

/* Flatsome: nascondi header UX Builder se caricato altrove */
#header.header,
.header-wrapper:not(.itsos-demo-header *) {
  display: none !important;
}

@media (max-width: 1024px) {
  .itsos-header-bottom {
    display: none !important;
  }

  .itsos-demo-header__nav {
    display: none;
  }

  .itsos-demo-header__menu-btn {
    display: inline-flex;
    position: relative;
  }

  .itsos-demo-header__brand {
    display: none;
  }

  .itsos-demo-header__inner {
    min-height: 86px;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  #wrapper {
    padding-top: 86px;
  }
