/* dottcarlovalli-b2b — assets/b2b-header.css — 2026-09-18
   Unico proprietario degli stili header desktop/mobile.
   Contiene sia l’header B2B autenticato sia l’header pubblico.
*/

/* =========================================================
   HEADER B2B AUTENTICATO
   ========================================================= */

header:not(.dcv-public-header),
.site-header:not(.dcv-public-header) {
  position: static !important;
  top: auto !important;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.header-inner {
  display: block;
  padding: 0 !important;
}

header:not(.dcv-public-header) .nav,
.site-header:not(.dcv-public-header) .nav {
  width: 100% !important;
  margin: 0 !important;
  padding: 24px 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

header:not(.dcv-public-header) .nav-inner,
.site-header:not(.dcv-public-header) .nav-inner {
  width: min(1100px, 92%);
  margin-inline: auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

header:not(.dcv-public-header) .nav .brand {
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none;
  margin: 0 !important;
}

header:not(.dcv-public-header) .nav .brand img {
  height: 88px !important;
  width: auto !important;
  display: block !important;
  margin: 0 !important;
  max-width: none !important;
  border-radius: 6px;
}

.brand-sub {
  font-size: 12px;
  opacity: .7;
}

header:not(.dcv-public-header) .menu-btn {
  display: none;
  margin: 0;
  position: relative;
  z-index: 1002;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.8);
  cursor: pointer;
}

header:not(.dcv-public-header) .nav > nav > ul {
  list-style: none !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 26px !important;
  position: relative !important;
  top: 2px !important;
}

header:not(.dcv-public-header) .nav > nav > ul > li {
  margin: 0;
  padding: 0;
}

header:not(.dcv-public-header) .nav > nav > ul > li > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  min-height: 42px;
  line-height: 1 !important;
  padding: 8px 0 !important;
  border-radius: 22px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

header:not(.dcv-public-header) .nav > nav > ul > li > a:hover {
  background: #eef8ff;
  color: #19a7e3;
  transform: translateY(-1px);
}

header:not(.dcv-public-header) .nav > nav > ul > li.current-menu-item > a,
header:not(.dcv-public-header) .nav > nav > ul > li.current_page_item > a,
header:not(.dcv-public-header) .nav > nav > ul > li.current-menu-parent > a,
header:not(.dcv-public-header) .nav > nav > ul > li.current-menu-ancestor > a {
  background: #22aeea !important;
  color: #fff !important;
  min-height: 42px;
  padding: 0 22px !important;
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(34,174,234,.24);
}

header:not(.dcv-public-header) .nav > nav > ul > li.menu-item-logout a {
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
}

header:not(.dcv-public-header) .nav > nav > ul > li.menu-item-logout a:hover {
  background: #fff1f2;
  color: #be123c;
}

header:not(.dcv-public-header) .nav > nav > ul > li > a:active {
  transform: scale(.97);
}

@media (max-width: 900px) {
  header:not(.dcv-public-header) {
    position: relative !important;
    z-index: 1000 !important;
  }

  header:not(.dcv-public-header) .container {
    position: static !important;
  }

  header:not(.dcv-public-header) .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  header:not(.dcv-public-header) .nav nav {
    display: none !important;
  }

  header:not(.dcv-public-header) .menu-btn {
    display: inline-flex !important;
  }

  header:not(.dcv-public-header) .mobile-menu {
    display: none;
    position: fixed !important;
    top: 185px;
    left: 16px;
    right: 16px;
    z-index: 1001 !important;
    background: #fff !important;
    opacity: 1 !important;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.16);
    padding: 10px 0;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
  }

  header:not(.dcv-public-header) .mobile-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: static !important;
    top: auto !important;
  }

  header:not(.dcv-public-header) .mobile-menu li {
    display: block !important;
    margin: 0 !important;
  }

  header:not(.dcv-public-header) .mobile-menu a,
  header:not(.dcv-public-header) .mobile-menu ul li a {
    display: block !important;
    padding: 14px 18px !important;
    line-height: 1.2 !important;
    text-decoration: none;
    background: #fff;
  }
}

/* =========================================================
   HEADER PUBBLICO / VETRINA
   ========================================================= */

header.dcv-public-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #fff;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(15,23,42,.06);
}

header.dcv-public-header > .container {
  width: min(1100px, 92%) !important;
  max-width: 1100px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

header.dcv-public-header .nav {
  width: 100%;
  margin: 0;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 14px 0;
}

header.dcv-public-header .brand {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  margin: 0;
  text-decoration: none;
}

header.dcv-public-header .brand img {
  height: 82px !important;
  width: auto;
  display: block;
  margin: 0;
  max-width: none;
  border-radius: 0;
}

header.dcv-public-header .topnav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
}

header.dcv-public-header .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px !important;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  top: auto !important;
}

header.dcv-public-header .nav-links li {
  margin: 0;
  padding: 0;
}

header.dcv-public-header .nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 0 !important;
  border-radius: 22px;
  color: #334155;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

header.dcv-public-header .nav-links a:hover {
  background: #eef8ff;
  color: #0ea5e9;
  text-decoration: underline !important;
  text-decoration-color: #0ea5e9 !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 2px;
  transform: translateY(-1px);
}

header.dcv-public-header .nav-links a:active {
  transform: scale(.97);
}

header.dcv-public-header .cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

header.dcv-public-header .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 1rem !important;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(14,165,233,.35);
}

header.dcv-public-header .cta-b2b {
  background: #fff;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,.12);
}

header.dcv-public-header .cta-top {
  background: linear-gradient(135deg,#0ea5e9,#0284c7);
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(14,165,233,.25);
}

header.dcv-public-header .menu-btn {
  display: none;
}

header.dcv-public-header .mobile-menu {
  display: none;
}

@media (max-width: 1060px) {
  header.dcv-public-header .nav {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 0;
  }

  header.dcv-public-header .brand {
    width: 100%;
  }

  header.dcv-public-header .brand img {
    width: auto !important;
    max-width: min(360px,100%) !important;
    height: auto !important;
  }

  header.dcv-public-header .topnav {
    width: 100%;
    flex: none;
    justify-content: flex-start;
  }

  header.dcv-public-header .nav-links,
  header.dcv-public-header .cta-wrap {
    display: none !important;
  }

  header.dcv-public-header .menu-btn {
    display: inline-flex !important;
    align-items: center;
    gap: .45rem;
    margin: 0;
    padding: .55rem .75rem;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.85);
  }

  header.dcv-public-header .mobile-menu {
    position: static;
    width: 100%;
    background: rgba(255,255,255,.95);
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  header.dcv-public-header .mobile-menu ul {
    margin: 0;
    padding: 12px;
    list-style: none;
  }

  header.dcv-public-header .mobile-menu li {
    border-top: 1px solid rgba(0,0,0,.06);
  }

  header.dcv-public-header .mobile-menu a {
    display: block;
    padding: 14px 18px;
  }
}
