/* Shared header typography for every page.
   Keep weight fixed between default, hover, focus and current-page states. */
.site-header .main-nav,
.site-header .main-nav a,
.site-header .header-action {
  font-family: "Montserrat", "Alibaba PuHuiTi 3.0", sans-serif;
  font-style: normal;
  line-height: 1.65;
  letter-spacing: 0;
  text-decoration: none;
}
.site-header .main-nav { font-size: 15px; }
.site-header .main-nav > a,
.site-header .main-nav .nav-parent {
  font-size: inherit;
  font-weight: 500;
  color: rgba(27, 29, 26, 0.68);
}
.site-header .main-nav a:hover,
.site-header .main-nav a:focus-visible,
.site-header .main-nav a.is-current,
.site-header .main-nav a[aria-current="page"] {
  color: #1b1d1a;
}
.site-header .main-nav .nav-submenu a {
  font-size: 12px;
  font-weight: 600;
}
.site-header .header-action { font-size: 13px; font-weight: 600; }
@media (min-width:1101px) and (max-width:1250px) {
  .site-header .main-nav { font-size:14px; }
}
@media (max-width:1100px) {
  .site-header .main-nav .nav-submenu a { font-size:15px; font-weight:500; }
  .site-header .main-nav a:hover,
  .site-header .main-nav a.is-current,
  .site-header .main-nav a[aria-current="page"] {
    border-color:rgba(91,140,62,.34);
    background:rgba(91,140,62,.14);
  }
}

/* One visual header system across all pages. */
body .announcement {
  box-sizing: border-box;
  height: auto;
  min-height: 58px;
  padding: 10px 56px;
  gap: 8px;
  background: #1b1d1a;
  color: #fbfaf6;
  font-family: "Montserrat", "Alibaba PuHuiTi 3.0", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0;
}
body .announcement > span {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  background: #5b8c3e;
  box-shadow: 0 0 18px rgba(91,140,62,.35);
}
body .announcement a { margin-left: 0; white-space: nowrap; }
body[class] .site-header, body .site-header {
  box-sizing: border-box;
  top: 58px;
  width: min(1400px, calc(100% - 48px));
  min-height: 86px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  padding: 14px 20px 14px 24px;
  border: 1px solid rgba(27,29,26,.08);
  border-radius: 999px;
  background: #fbfaf6;
  box-shadow: 0 18px 50px rgba(27,29,26,.08);
}
.site-header .main-nav { gap: 22px; min-width: 0; }
.site-header .header-action {
  min-width: 124px;
  height: 44px;
  padding: 0 20px;
  justify-content: center;
  background: #1b1d1a;
  color: #fbfaf6;
}
.site-header .main-nav a:not([aria-current="page"]):hover {
  color: #1b1d1a;
  background: transparent;
}
.site-header .nav-submenu a:not([aria-current="page"]):hover { background: #edf0e9; }
@media (min-width:1101px) {
  .site-header .nav-group:has(a[aria-current="page"]) > .nav-parent { color: #1b1d1a; }
}
@media (min-width:1101px) and (max-width:1250px) {
  body[class] .site-header, body .site-header { gap: 16px; }
  .site-header .main-nav { gap: 14px; }
  .site-header .header-action { min-width: 106px; }
}
@media (max-width:1100px) {
  body[class] .site-header, body .site-header {
    width: min(1400px, calc(100% - 28px));
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 12px;
    border-radius: 24px;
  }
  .site-header .main-nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 2px 2px;
    font-size: 15px;
  }
  .site-header .header-action { min-width: 92px; height: 40px; padding: 0 18px; }
  .site-header .main-nav a,
  .site-header .main-nav a:not([aria-current="page"]):hover {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #d8ddd3;
    border-radius: 999px;
    background: #f8f9f6;
    box-shadow: none;
    color: rgba(27,29,26,.68);
    font-size: 15px;
    font-weight: 500;
    justify-content: center;
  }
  .site-header .main-nav a:not([aria-current="page"]):hover {
    background: #edf0e9;
    border-color: #c9cec4;
    color: #1b1d1a;
  }
  .site-header .main-nav a[aria-current="page"] {
    background: #e3ebdc;
    border-color: #aac39a;
    color: #1b1d1a;
  }
  .site-header .main-nav > a[href="./index.html#top"] { order:1; }
  .site-header .main-nav > a[href="./company.html"] { order:2; }
  .site-header .main-nav > a[href="./products-services.html"] { order:3; }
  .site-header .main-nav .nav-parent { order:4; }
  .site-header .main-nav .nav-submenu a[href="./vehicle-ecosystem.html"] { order:5; }
  .site-header .main-nav > a[href="./service-network.html"] { order:7; }
  .site-header .main-nav > a[href="./support.html"] { order:8; }
}
@media (max-width:760px) {
  body .announcement { min-height:68px; padding:10px 52px 10px 18px; justify-content:flex-start; font-size:12px; text-align:left; }
  body[class] .site-header, body .site-header { top:68px; }
}
body.announcement-hidden .site-header { top:0; }

/* Keep the announcement in flow; only the existing overlay navigation is fixed. */
body .announcement { position:sticky; top:0; }
body[class] .site-header, body .site-header {
  position:fixed;
  top:var(--announcement-height, 58px);
}
body.announcement-hidden .site-header { top:0; }
html.has-fixed-header {
  scroll-padding-top:calc(var(--fixed-top-height, 144px) + var(--product-nav-height, 0px) + 16px);
}
html.has-fixed-header main[id], html.has-fixed-header main [id] { scroll-margin-top:0; }
html.has-fixed-header .product-anchor-bar { top:var(--fixed-top-height, 144px); }
@media(max-width:760px) {
  body .announcement { position:relative; }
  body[class] .site-header, body .site-header { top:var(--announcement-height, 68px); }
  body.announcement-hidden .site-header { top:0; }
}

/* Keep DOM order after route normalization and bilingual path rewriting.
   The parent already links to the overview; show that destination only once. */
@media (max-width:1100px) {
  .site-header .main-nav a { order:0 !important; }
  .site-header .main-nav .nav-submenu a[href$="/agri-intelligence.html"] { display:none; }
}

.compact-menu-toggle, .compact-navigation-panel[hidden] { display:none; }
@media(max-width:760px) {
  body .site-header.is-compact {
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    padding:8px;
    min-height:60px;
    border-radius:20px;
  }
  .site-header.is-compact > .brand { grid-column:1; grid-row:1; min-width:0; }
  .site-header.is-compact .brand img { width:100%; max-width:110px; height:32px; }
  .site-header.is-compact .header-tools { grid-column:2; grid-row:1; gap:6px; }
  .site-header.is-compact .compact-menu-toggle {
    display:grid; place-items:center; flex-shrink:0;
    width:42px; height:42px; padding:0;
    border:1px solid #d8ddd3; border-radius:50%;
    background:#f8f9f6; color:#1b1d1a;
    font:26px/1 sans-serif; cursor:pointer;
  }
  .compact-menu-toggle:focus-visible { outline:2px solid #507c35; outline-offset:2px; }
  .site-header.is-compact .compact-navigation-panel:not([hidden]) {
    display:flex; flex-direction:column; gap:12px;
    position:absolute; left:0; right:0; top:calc(100% + 8px);
    max-height:calc(100dvh - 90px); overflow:auto;
    padding:16px; border:1px solid #d8ddd3; border-radius:20px;
    background:#fbfaf6; box-shadow:0 16px 40px rgba(27,29,26,.16);
  }
  .site-header.is-compact .compact-navigation-panel .main-nav {
    display:flex; flex-direction:column; align-items:stretch;
    overflow:visible; padding:0; margin:0; gap:8px; width:100%;
  }
  .site-header.is-compact .compact-navigation-panel .main-nav a { min-height:44px; justify-content:flex-start; }
  .site-header.is-compact .compact-navigation-panel .header-action { display:flex; width:100%; min-height:44px; }
}
