/* Shared page rail: fluid side gutter + a wide max so ultra-wide screens
   keep breathing room without snapping back to a narrow fixed container.
   Targets ~48–64px at 1440, ~72–96px at 1920, ~96–112px at 2560+. */
:root {
  --page-max: 137.5rem; /* 2200px */
  --page-pad: clamp(1.5rem, 4vw, 7rem);
}

.page-shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Site header. Solid bar, aligned to the same content width as the homepage hero. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid rgba(20, 39, 62, 0.08);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
  justify-self: start;
}

.site-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #2d5f8e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo-mark .material-icons { font-size: 22px; }

.site-logo-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #14273e;
  white-space: nowrap;
}

.site-logo-name span { color: #1f7ae0; }

.site-nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
  justify-self: center;
}

@media (min-width: 1024px) {
  .site-nav-desktop { display: flex; }
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
  flex-shrink: 0;
}

.site-header-actions .site-menu {
  display: flex;
  align-items: center;
  height: 80px;
}

.site-nav-link,
.site-menu-btn,
.site-lang-btn,
.site-burger,
.site-mobile-acc {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: #14273e;
  cursor: pointer;
  text-decoration: none;
}

.site-nav-desktop .site-nav-link,
.site-nav-desktop .site-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  height: 80px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #14273e;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav-desktop .site-nav-link:hover,
.site-nav-desktop .site-menu-btn:hover,
.site-nav-desktop .site-nav-link[aria-current="page"],
.site-menu[aria-current="page"] > .site-menu-btn {
  color: #326787;
}

.site-chevron {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  color: currentColor;
  opacity: 0.72;
  transition: transform 0.2s ease;
}

.site-menu.is-open > .site-menu-btn .site-chevron,
.site-mobile-acc[aria-expanded="true"] .site-chevron {
  transform: rotate(180deg);
}

.site-menu { position: relative; }

.site-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 8px);
  inset-inline-start: 0;
  min-width: 17.5rem;
  padding-top: 8px;
  z-index: 30;
}

.site-menu[data-menu="language"] .site-dropdown {
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-width: 11.5rem;
}

.site-menu.is-open > .site-dropdown { display: block; }

.site-dropdown-panel {
  background: #ffffff;
  border: 1px solid rgba(20, 39, 62, 0.08);
  border-radius: 10px;
  padding: 0.35rem;
}

.site-dropdown-panel a,
.site-lang-panel .lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent !important;
  color: #14273e !important;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none !important;
}

.site-dropdown-panel a:hover,
.site-dropdown-panel a:focus-visible,
.site-lang-panel .lang-btn:hover,
.site-lang-panel .lang-btn:focus-visible,
.site-dropdown-panel a[aria-current="page"],
.site-lang-panel .lang-btn[aria-selected="true"],
.site-lang-panel .lang-btn.bg-primary {
  color: #326787 !important;
  background: #faf8f4 !important;
}

.site-dropdown-rule {
  height: 1px;
  margin: 0.3rem 0.55rem;
  background: rgba(20, 39, 62, 0.08);
}

.site-dropdown-plan { color: #326787 !important; }

.site-dropdown-plan .material-icons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

[dir="rtl"] .site-dropdown-plan .material-icons { transform: scaleX(-1); }

.site-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 40px;
  padding: 0 0.15rem;
  color: #14273e;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.site-lang-btn:hover,
.site-menu.is-open > .site-lang-btn { color: #326787; }

.site-lang-btn .material-icons:first-child { font-size: 18px; }

.lang-current { min-width: 1.4rem; }

.site-contact {
  display: none;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 1.05rem;
  border-radius: 6px;
  background: #14273e;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.site-contact:hover { background: #1d3554; }

@media (min-width: 640px) {
  .site-contact { display: inline-flex; }
  .site-contact-mobile { display: none !important; }
}

.site-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: #14273e;
}

.site-burger:hover { color: #326787; }

.site-burger .material-icons { font-size: 24px; }

@media (min-width: 1024px) {
  .site-burger { display: none; }
  .site-mobile { display: none !important; }
}

.site-mobile {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(20, 39, 62, 0.08);
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.site-mobile.hidden,
.site-mobile-sub.hidden { display: none !important; }

.site-mobile-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.5rem var(--page-pad) 1.25rem;
}

.site-mobile-acc,
.site-mobile .mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.35rem;
  border-radius: 8px;
  color: #14273e;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-align: start;
}

.site-mobile-acc:hover,
.site-mobile .mobile-menu-link:hover,
.site-mobile .mobile-menu-link[aria-current="page"] {
  color: #326787;
}

.site-mobile-sub {
  padding: 0 0 0.35rem 0.85rem;
}


.site-mobile-sub .mobile-menu-link {
  min-height: 44px;
  font-size: 0.9375rem;
  color: #24344a;
}

.site-mobile-plan { color: #326787 !important; }

.site-contact-mobile {
  display: flex;
  margin-top: 0.75rem;
  width: 100%;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid #326787;
  outline-offset: 3px;
}

/* Health Screening Packages 暂时隐藏。
   恢复时删除本规则，并把首页主按钮 href 改回 #cost-calculator。 */
#cost-calculator,
a[href="#cost-calculator"],
[data-nav="health-checkups"] {
  display: none !important;
}

#cost-calculator,
#endoscopy-services,
#medical-escort-services,
#how-pricing-works,
#interactive-roadmap,
#lead-form {
  scroll-margin-top: 6rem;
}

@media (max-width: 380px) {
  .site-logo-mark { width: 32px; height: 32px; }
  .site-logo-mark .material-icons { font-size: 20px; }
  .site-logo-name { font-size: 1rem; }
}

html.dark .site-header,
html.dark .site-mobile,
html.dark .site-dropdown-panel {
  background: #101722;
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .site-logo-name,
html.dark .site-nav-desktop .site-nav-link,
html.dark .site-nav-desktop .site-menu-btn,
html.dark .site-lang-btn,
html.dark .site-burger,
html.dark .site-mobile-acc,
html.dark .site-mobile .mobile-menu-link,
html.dark .site-dropdown-panel a,
html.dark .site-lang-panel .lang-btn {
  color: #f4f7fb !important;
}

html.dark .site-nav-desktop .site-nav-link:hover,
html.dark .site-nav-desktop .site-menu-btn:hover,
html.dark .site-nav-desktop .site-nav-link[aria-current="page"],
html.dark .site-menu[aria-current="page"] > .site-menu-btn,
html.dark .site-dropdown-panel a:hover,
html.dark .site-dropdown-panel a[aria-current="page"],
html.dark .site-lang-panel .lang-btn[aria-selected="true"],
html.dark .site-mobile .mobile-menu-link:hover,
html.dark .site-mobile .mobile-menu-link[aria-current="page"],
html.dark .site-dropdown-plan,
html.dark .site-mobile-plan {
  color: #8eb4c9 !important;
}

html.dark .site-dropdown-panel a:hover,
html.dark .site-lang-panel .lang-btn:hover,
html.dark .site-lang-panel .lang-btn[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.04) !important;
}

@media (prefers-reduced-motion: reduce) {
  .site-chevron,
  .site-nav-link,
  .site-menu-btn,
  .site-lang-btn,
  .site-contact { transition: none; }
}
