@import url("/logo-header-20260715-v4.css");

/*
 * Header consistency hotfix v5 (2026-07-19)
 *
 * Production previously contained pages generated by two Astro builds. Their
 * scoped Header styles used different desktop spacing, item order and menu
 * breakpoints. These shared rules deliberately normalize the Chinese header
 * without touching page content or the intentionally more compact English
 * breakpoint.
 */
html[lang="zh-CN"] .nav-inner {
  grid-template-columns: auto 1fr auto;
  column-gap: clamp(20px, 2.8vw, 52px);
}

html[lang="zh-CN"] .nav {
  border-bottom-width: 0;
}

html[lang="en"] .nav {
  border-bottom-width: 0;
}

html[lang="zh-CN"] .nav-logo,
html[lang="zh-CN"] .nav-drawer-logo {
  overflow: visible;
  line-height: 0;
}

html[lang="zh-CN"] .nav-logo img[src="/logo-25th-20260715.png"],
html[lang="zh-CN"] .nav-logo img[src="/logo.png"] {
  display: block;
  width: 160px !important;
  height: auto !important;
  max-width: 160px !important;
  max-height: none !important;
  object-fit: contain;
}

html[lang="zh-CN"] .nav-drawer-logo img[src="/logo-25th-20260715.png"],
html[lang="zh-CN"] .nav-drawer-logo img[src="/logo.png"] {
  display: block;
  width: 150px !important;
  height: auto !important;
  max-width: 150px !important;
  max-height: none !important;
  object-fit: contain;
}

html[lang="zh-CN"] .nav-menu {
  justify-content: center;
  gap: clamp(8px, 1vw, 18px);
  width: auto;
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
}

html[lang="zh-CN"] body .nav .nav-menu > a {
  font-size: clamp(17px, 1.05vw, 20px);
  font-weight: 400;
  line-height: 1.47059;
  padding: 10px clamp(10px, 0.9vw, 16px);
}

html[lang="zh-CN"] .nav-search {
  display: none;
}

html[lang="zh-CN"] body .nav .nav-end .language-switcher {
  padding: 0 4px !important;
}

html[lang="zh-CN"] .nav-menu > a[href^="/antarctic/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/antarctic/"] {
  order: 10;
}

html[lang="zh-CN"] .nav-menu > a[href^="/arctic/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/arctic/"] {
  order: 11;
}

html[lang="zh-CN"] .nav-menu > a[href^="/galapagos/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/galapagos/"] {
  order: 12;
}

html[lang="zh-CN"] .nav-menu > a[href^="/cultural-luxury/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/cultural-luxury/"] {
  order: 13;
}

html[lang="zh-CN"] .nav-menu > a[href^="/light-expedition/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/light-expedition/"] {
  order: 14;
}

html[lang="zh-CN"] .nav-menu > a[href^="/tickets/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/tickets/"] {
  order: 15;
}

html[lang="zh-CN"] .nav-menu > a[href^="/articles/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/articles/"] {
  order: 16;
}

html[lang="zh-CN"] .nav-menu > a[href^="/about/"],
html[lang="zh-CN"] .nav-drawer > a[href^="/about/"] {
  order: 17;
}

html[lang="zh-CN"] .nav-drawer-head,
html[lang="zh-CN"] .nav-drawer-search {
  order: 0;
}

html[lang="zh-CN"] .nav-drawer-language,
html[lang="zh-CN"] .nav-drawer-languages {
  order: 30;
}

html[lang="zh-CN"] .nav-drawer-actions {
  order: 40;
}

html[lang="zh-CN"] .nav-drawer-languages {
  display: block;
  width: 100%;
  margin: 8px 0 2px;
  padding: 0;
  border: 0;
}

html[lang="zh-CN"] body .nav-drawer .nav-drawer-languages > a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(0, 48, 102, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

html[lang="zh-CN"] body .nav-drawer .nav-drawer-languages > a::before {
  content: "◎";
  margin-right: 10px;
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
}

html[lang="zh-CN"] body .nav-drawer .nav-drawer-languages > a::after {
  content: "›";
  margin-left: auto;
  color: #86868b;
  font-size: 24px;
  font-weight: 300;
}

@media (min-width: 901px) {
  html[lang="zh-CN"] .nav-inner {
    grid-template-columns: auto 1fr auto;
  }

  html[lang="zh-CN"] .nav-menu {
    display: flex;
  }

  html[lang="zh-CN"] .nav-menu-btn {
    display: none;
  }

  html[lang="zh-CN"] body .nav .nav-end,
  html[lang="zh-CN"] body .nav .nav-end .language-switcher,
  html[lang="zh-CN"] body .nav .nav-end .nav-cta {
    display: flex;
  }

  html[lang="zh-CN"] body .nav .nav-end {
    gap: clamp(8px, 1vw, 16px) !important;
  }

  html[lang="zh-CN"] body .nav .nav-end .language-switcher {
    min-height: 36px !important;
    padding: 0 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
  }

  html[lang="zh-CN"] body .nav .nav-end .nav-cta {
    min-height: 44px !important;
    padding: 0 16px !important;
    font-size: 17px !important;
  }

  html[lang="zh-CN"] body .nav .nav-end .nav-cta-primary {
    padding: 0 20px !important;
  }
}

@media (min-width: 1201px) {
  html[lang="zh-CN"] .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 0;
  }

  html[lang="zh-CN"] .nav-logo {
    justify-self: start;
  }

  html[lang="zh-CN"] .nav-menu {
    width: max-content;
    gap: 10px;
  }

  html[lang="zh-CN"] body .nav .nav-end {
    justify-self: end;
  }
}

@media (max-width: 1430px) and (min-width: 1201px) {
  html[lang="zh-CN"] body .nav .nav-end .nav-cta:not(.nav-cta-primary) {
    display: none !important;
  }
}

@media (max-width: 1200px) {
  html[lang="zh-CN"] .nav-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    column-gap: 16px;
  }

  html[lang="zh-CN"] .nav-menu,
  html[lang="zh-CN"] .nav-search,
  html[lang="zh-CN"] body .nav .nav-end .nav-cta,
  html[lang="zh-CN"] body .nav .nav-end .language-switcher {
    display: none !important;
  }

  html[lang="zh-CN"] .nav-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  html[lang="zh-CN"] .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    border: 0;
    background: rgba(8, 24, 40, 0.18);
  }

  html[lang="zh-CN"] .nav-overlay[hidden] {
    display: none;
  }

  html[lang="zh-CN"] .nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 130;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  html[lang="zh-CN"] body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  html[lang="zh-CN"] .nav-logo img[src="/logo-25th-20260715.png"],
  html[lang="zh-CN"] .nav-logo img[src="/logo.png"] {
    width: 150px !important;
    max-width: 150px !important;
  }
}
