/* Production header: WordPress menu dropdowns, dark mobile panel, and consistent 900px breakpoint. */
:root {
  --cq-header-nav-height: 72px;
  --cq-header-contact-strip-height: 34px;
  --cq-header-dark: rgba(3, 11, 26, 0.96);
  --cq-header-panel: #06172e;
  --cq-header-border: rgba(216, 225, 234, 0.16);
}

body.has-header-contact-strip {
  padding-top: var(--cq-header-contact-strip-height);
}

#navbar {
  background: var(--cq-header-dark);
  border-bottom: 1px solid var(--cq-header-border);
  backdrop-filter: blur(18px);
}

#navbar .header-contact-strip {
  height: var(--cq-header-contact-strip-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 8, 20, 0.72);
}

#navbar .header-contact-strip-in {
  display: flex;
  width: min(100% - 32px, 1280px);
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

#navbar .header-contact-strip a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
}

#navbar .header-contact-strip a:hover,
#navbar .header-contact-strip a:focus-visible {
  color: #ffffff;
}

#navbar .nav-in {
  width: min(100% - 32px, 1280px);
  height: var(--cq-header-nav-height);
  gap: clamp(0.8rem, 1.4vw, 1.4rem);
}

#navbar .primary-menu-panel {
  display: flex;
  min-width: 0;
  align-items: center;
  margin-left: auto;
}

#navbar .primary-menu-panel .nav-links {
  display: flex;
  position: static;
  align-items: center;
  gap: clamp(0.75rem, 1.3vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

#navbar .nav-links li {
  position: relative;
}

#navbar .nav-links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 6px;
  color: #dbe7f5 !important;
  text-decoration: none;
  white-space: nowrap;
}

#navbar .nav-links a:hover,
#navbar .nav-links a:focus-visible,
#navbar .nav-links .current-menu-item > a,
#navbar .nav-links a[aria-current="page"] {
  color: #ffffff !important;
}

#navbar .nav-links .menu-item-has-children > a::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}

#navbar .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 3;
  display: grid;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: #06172e;
  border: 1px solid var(--cq-header-border);
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

#navbar .nav-links li:hover > .sub-menu,
#navbar .nav-links li:focus-within > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

#navbar .sub-menu .sub-menu {
  top: -10px;
  left: calc(100% + 10px);
}

#navbar .sub-menu a {
  display: flex;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: #dbe7f5 !important;
  font-size: 14px;
}

#navbar .sub-menu a:hover,
#navbar .sub-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

#navbar .nav-acts {
  flex: 0 0 auto;
  margin-left: clamp(0.75rem, 1.2vw, 1.2rem);
}

#navbar .nav-acts .btn-primary,
#navbar .mobile-nav-actions .btn-primary,
#navbar .mobile-nav-actions .btn-outline {
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

#navbar .mobile-nav-actions {
  display: none;
}

#navbar .menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  #navbar .nav-in {
    width: min(100% - 32px, 1280px);
    height: var(--cq-header-nav-height);
    gap: 1rem;
  }

  #navbar .logo {
    position: relative;
    z-index: 2;
  }

  #navbar .site-logo-img {
    height: 48px !important;
    max-width: min(210px, calc(100vw - 104px)) !important;
  }

  #navbar .nav-acts {
    display: none !important;
  }

  #navbar .menu-toggle {
    display: inline-flex !important;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  #navbar .menu-toggle:focus-visible {
    outline: 3px solid #8acb62;
    outline-offset: 3px;
  }

  #navbar .primary-menu-panel {
    display: none;
    position: fixed;
    z-index: 1;
    top: var(--cq-header-nav-height) !important;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 1rem 1rem 2rem;
    overflow-y: auto;
    background: #06172e;
    border-top: 1px solid var(--cq-header-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  }

  body.has-header-contact-strip #navbar .primary-menu-panel {
    top: calc(var(--cq-header-contact-strip-height) + var(--cq-header-nav-height)) !important;
  }

  body.admin-bar #navbar .primary-menu-panel {
    top: calc(32px + var(--cq-header-nav-height)) !important;
  }

  body.admin-bar.has-header-contact-strip #navbar .primary-menu-panel {
    top: calc(32px + var(--cq-header-contact-strip-height) + var(--cq-header-nav-height)) !important;
  }

  #navbar .primary-menu-panel.open {
    display: block;
  }

  #navbar .primary-menu-panel .nav-links {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    width: 100%;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #navbar .primary-menu-panel .nav-links li,
  #navbar .primary-menu-panel .nav-links a {
    width: 100%;
  }

  #navbar .primary-menu-panel .nav-links a {
    display: flex;
    min-height: 48px;
    padding: 0.75rem 0.25rem;
    color: #edf3ff !important;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: normal;
  }

  #navbar .primary-menu-panel .nav-links a:hover,
  #navbar .primary-menu-panel .nav-links a:focus-visible {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.07);
  }

  #navbar .primary-menu-panel .nav-links a::after {
    display: none;
  }

  #navbar .sub-menu,
  #navbar .sub-menu .sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 0 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  #navbar .sub-menu a {
    min-height: 46px;
    padding: 0.65rem 0.25rem;
    color: #c7d4e3 !important;
    font-size: 0.95rem;
  }

  #navbar .mobile-nav-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }

  #navbar .mobile-nav-actions a {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    text-align: center;
  }

  #navbar .header-contact-strip-in {
    justify-content: center;
    gap: 12px;
  }

  #navbar .header-contact-strip a {
    font-size: 12.5px;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 782px) {
  body.admin-bar #navbar .primary-menu-panel {
    top: calc(46px + var(--cq-header-nav-height)) !important;
  }

  body.admin-bar.has-header-contact-strip #navbar .primary-menu-panel {
    top: calc(46px + var(--cq-header-contact-strip-height) + var(--cq-header-nav-height)) !important;
  }
}

@media (max-width: 360px) {
  #navbar .header-contact-strip-in {
    width: min(100% - 20px, 1280px);
    gap: 8px;
  }
}

/* Mobile menu conversion polish: full-width rows, clear hierarchy, and large CTA targets. */
@media (max-width: 900px) {
  #navbar .primary-menu-panel {
    padding: .45rem 0 .85rem;
    border-inline: 0;
    border-radius: 0 0 24px 24px;
    background: rgba(3, 11, 26, .99);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
  }

  #navbar .primary-menu-panel .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  #navbar .primary-menu-panel .nav-links a {
    min-height: 54px;
    padding: .95rem 1.15rem;
    color: var(--t1) !important;
    font-weight: 700;
  }

  #navbar .sub-menu,
  #navbar .sub-menu .sub-menu {
    gap: .25rem;
    padding: 0 1.15rem .75rem;
  }

  #navbar .sub-menu a {
    min-height: 46px;
    padding: .7rem .85rem;
    color: var(--t2) !important;
    font-size: .92rem;
    font-weight: 600;
  }

  #navbar .mobile-nav-actions {
    gap: .65rem;
    margin-top: 0;
    padding: .95rem 1.15rem 0;
  }

  #navbar .mobile-nav-actions a {
    justify-content: center;
    width: 100%;
    min-height: 50px;
  }
}
