/* English candidate: menus open only through hover or an explicit toggle.
   Esc keeps focus on the control while this class hides its panel. */
@media (min-width: 981px) {
  html[lang="en"] .gp-primary-nav .gp-nav-item:focus-within:not(.is-open):not(:hover) > .gp-nav-menu,
  html[lang="en"] .gp-primary-nav .gp-nav-item.gp-nav-force-closed > .gp-nav-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
  }
}


/* gp-en-context-subnav-20260918: align English section navigation with the approved Chinese pattern. */
html[lang="en"] .gp-context-subnav-shell {
  position: sticky;
  top: 0;
  z-index: 19;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(184, 138, 67, .3);
  background: rgba(14, 16, 15, .97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}

@media (min-width: 981px) {
  html[lang="en"] .gp-context-subnav-shell { top: 91px; }
}

html[lang="en"] .gp-context-subnav {
  display: flex;
  justify-content: center;
  max-width: 1380px;
  margin: 0 auto;
}

html[lang="en"] .gp-context-subnav a {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 18px;
  border-right: 1px solid rgba(255, 255, 255, .08);
  color: #d8b272;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

html[lang="en"] .gp-context-subnav a:last-child { border-right: 0; }
html[lang="en"] .gp-context-subnav a:hover,
html[lang="en"] .gp-context-subnav a:focus-visible,
html[lang="en"] .gp-context-subnav a.is-current,
html[lang="en"] .gp-context-subnav a[aria-current="page"] {
  color: #d8b272;
  background: transparent;
}

html[lang="en"] .gp-context-subnav a.is-current::after,
html[lang="en"] .gp-context-subnav a[aria-current="page"]::after,
html[lang="en"] .gp-context-subnav a:hover::after,
html[lang="en"] .gp-context-subnav a:focus-visible::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 2px;
  background: #d8b272;
}

@media (max-width: 760px) {
  html[lang="en"] .gp-context-subnav-shell { padding: 0; overflow: hidden; }
  html[lang="en"] .gp-context-subnav {
    justify-content: flex-start;
    max-width: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  html[lang="en"] .gp-context-subnav a {
    flex: 0 0 auto;
    min-width: 150px;
    min-height: 48px;
    padding: 9px 14px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

/* gp-en-factory-company-profile-20260919: keep the awards display prominent and let the longer English introduction scroll within its own column. */
@media (min-width: 741px) {
  html[lang="en"] body.support-factory .company-profile-intro {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: clamp(24px, 3vw, 48px);
  }

  html[lang="en"] body.support-factory .company-profile-copy {
    height: clamp(250px, 30vw, 360px);
    overflow-y: scroll;
    scrollbar-gutter: stable;
    padding-right: 12px;
  }

  html[lang="en"] body.support-factory .company-profile-awards {
    width: 100%;
    margin: 0;
  }

  html[lang="en"] body.support-factory .company-profile-awards img {
    display: block;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 980px) {
  html[lang="en"] body.support-factory .company-profile-awards {
    width: 100%;
    margin-top: 24px;
  }

  html[lang="en"] body.support-factory .company-profile-awards img {
    display: block;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 740px) {
  html[lang="en"] body.support-factory .company-profile-copy {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }
}

/* gp-en-context-menu-clearance-20260919: keep every English contextual secondary navigation visible while a desktop primary-nav panel is open. */
@media (min-width: 981px) {
  html[lang="en"] body:has(.gp-context-subnav-shell) .gp-primary-nav .gp-nav-item:is(.is-open, :hover, :focus-within) > .gp-nav-menu {
    top: calc(100% + 121px);
  }

  /* This invisible child spans the contextual row, so pointer travel from the primary control to its panel never closes the menu. */
  html[lang="en"] body:has(.gp-context-subnav-shell) .gp-primary-nav .gp-nav-item:is(.is-open, :hover, :focus-within) > .gp-nav-menu::before {
    content: "";
    position: absolute;
    top: -121px;
    right: 0;
    left: 0;
    height: 121px;
  }
}
