/* Header nav groups — Products / Industries / Resources */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-lg, 1.25rem);
}

/* nav.css loads after site-v2.css — must restate mobile collapse here
   or the base display:flex above wins the cascade and leaks desktop links. */
@media (max-width: 980px) {
  .nav-links { display: none; }
}
.nav-links > a.nav-top {
  font-size: var(--t-title, 0.95rem);
  font-weight: 400;
  color: var(--ink, #111);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links > a.nav-top:hover,
.nav-links > a.nav-top[aria-current="page"] {
  color: var(--primary, #2563eb);
  border-bottom-color: var(--primary, #2563eb);
}

.nav-group { position: relative; }
.nav-group-btn {
  font-size: var(--t-title, 0.95rem);
  font-weight: 400;
  color: var(--ink, #111);
  padding: 8px 4px;
  border: none;
  border-bottom: 2px solid transparent;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-group-btn:focus { outline: none; }
.nav-group-btn:focus-visible {
  outline: 2px solid var(--ink, #111);
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-group-btn .nav-caret {
  display: block;
  transition: transform 0.15s;
  color: var(--muted, #6b7280);
}
.nav-group.open .nav-group-btn .nav-caret,
.nav-group:hover .nav-group-btn .nav-caret {
  transform: rotate(180deg);
}
.nav-group-btn:hover,
.nav-group.is-active .nav-group-btn,
.nav-group.open .nav-group-btn {
  color: var(--primary, #2563eb);
  border-bottom-color: var(--primary, #2563eb);
}

.nav-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  padding: 8px;
  background: var(--canvas, #fff);
  border: 1px solid var(--hairline, #e5e7eb);
  border-radius: var(--r-md, 10px);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.08));
  z-index: 220;
}
.nav-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}
.nav-group.open .nav-panel { display: grid; gap: 2px; }
.nav-group.nav-group--products .nav-panel {
  min-width: 560px;
  grid-template-columns: 1fr 1fr;
}
.nav-group.nav-group--products .nav-panel-foot {
  grid-column: 1 / -1;
}

@media (hover: hover) and (pointer: fine) {
  .nav-group:hover .nav-panel,
  .nav-group:focus-within .nav-panel {
    display: grid;
    gap: 2px;
  }
}

.nav-links .nav-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-sm, 8px);
  color: var(--ink, #111);
  border-bottom: none !important;
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  transition: background 0.15s;
}
.nav-links .nav-panel a:hover {
  background: var(--surface-soft, #f3f4f6);
  border-bottom-color: transparent !important;
  color: var(--ink, #111);
}
.nav-links .nav-panel a[aria-current="page"] {
  background: var(--surface-strong, #eef2ff);
  color: var(--primary, #2563eb);
}
.nav-links .nav-panel a b {
  font-size: var(--t-body-sm, 0.9rem);
  font-weight: 600;
  line-height: 1.3;
}
.nav-links .nav-panel a span {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted, #6b7280);
  line-height: 1.35;
}
.nav-links .nav-panel a[aria-current="page"] span { color: inherit; opacity: 0.8; }
.nav-links .nav-panel-foot {
  margin-top: 4px;
  padding-top: 12px !important;
  border-top: 1px solid var(--hairline, #e5e7eb);
  font-size: var(--t-body-sm, 0.9rem);
  font-weight: 600;
  color: var(--primary, #2563eb) !important;
  flex-direction: row !important;
}

/* Mobile accordion */
.mobile-nav details {
  border-bottom: 1px solid var(--hairline-soft, #f0f0f0);
}
.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink, #111);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted, #6b7280);
  transition: transform 0.15s;
}
.mobile-nav details[open] > summary::after { transform: rotate(180deg); }
.mobile-nav details a {
  display: block;
  padding: 10px 0 10px 12px;
  font-size: 0.98rem;
  font-weight: 500;
  border-bottom: none;
  color: var(--ink, #111);
}
.mobile-nav details a[aria-current="page"] { color: var(--primary, #2563eb); }
.mobile-nav a.mobile-flat {
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline-soft, #f0f0f0);
}
.mobile-nav a.mobile-flat[aria-current="page"] { color: var(--primary, #2563eb); }
.mobile-nav a.mobile-cta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--primary, #2563eb);
  color: #fff !important;
  border-bottom: none;
}

/* Footer zone: language chips + login under primary CTA */
.mobile-nav-footer {
  margin-top: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 14px;
  background: var(--surface-soft, #fafafa);
  border: 1px solid var(--hairline, #e4e4e7);
}
.mobile-lang-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-lang-row:not(:has(a)) {
  display: none;
}
.mobile-nav a.mobile-lang-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline, #e4e4e7);
  border-bottom: 1px solid var(--hairline, #e4e4e7);
  background: var(--canvas, #fff);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink, #111);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.mobile-nav a.mobile-lang-link:hover,
.mobile-nav a.mobile-lang-link:focus-visible {
  background: var(--primary-soft, #f0efff);
  border-color: var(--primary-disabled, #c8c6ff);
  color: var(--ink, #111);
}
.mobile-nav a.mobile-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink, #111);
  border-bottom: 1.5px solid var(--ink, #111);
  background: transparent;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink, #111) !important;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mobile-nav a.mobile-login:hover,
.mobile-nav a.mobile-login:focus-visible {
  background: var(--ink, #111);
  color: #fff !important;
}

/* Ensure open mobile sheet scrolls even if site-v2 cache is stale */
.mobile-nav.open {
  max-height: calc(100dvh - var(--nav-h, 64px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px) + 88px);
  touch-action: pan-y;
}
html.mobile-nav-locked,
html.mobile-nav-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}
html.mobile-nav-locked body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}
