/* 手机端汉堡菜单 + 侧栏（≤1024px，与桌面隐藏主导航一致） */
.mobile-nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex-shrink: 0;
  border: 1px solid rgba(16, 26, 51, 0.14);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 26, 51, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-burger:hover {
  background: #f4f7ff;
  border-color: rgba(47, 102, 219, 0.25);
}

.mobile-nav-burger:focus-visible {
  outline: 2px solid #3f76ff;
  outline-offset: 2px;
}

.mobile-nav-burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 16px;
}

.mobile-nav-burger-icon span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #101a33;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 240;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 40, 0.45);
}

.mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  max-height: 100%;
  overflow: visible;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(16, 26, 51, 0.08);
}

.mobile-drawer__title {
  font-size: 16px;
  font-weight: 800;
  color: #163c8f;
  letter-spacing: 0.02em;
}

.mobile-drawer__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(47, 102, 219, 0.08);
  color: #163c8f;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mobile-drawer__close:hover {
  background: rgba(47, 102, 219, 0.14);
}

.mobile-drawer__nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* 导航链接 + 语言区同列滚动，语言紧跟在「联系我们」下方，无需再滚到抽屉底部 */
.mobile-drawer__nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer__lang {
  flex-shrink: 0;
  margin-top: 6px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(16, 26, 51, 0.08);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
}

.mobile-drawer__lang-label {
  font-size: 12px;
  font-weight: 700;
  color: #5c6d8f;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}

.mobile-drawer__lang .lang-switch {
  width: 100%;
  min-width: 0;
}

.mobile-drawer__lang .lang-switch > summary.lang-switch__toggle {
  width: 100%;
  justify-content: center;
}

/* 抽屉内语言菜单向上展开，避免贴近面板底时被裁切 */
.mobile-drawer__panel .lang-switch--drawer > .lang-switch__menu {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
}

.mobile-drawer__nav-scroll a {
  display: block;
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #101a33;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mobile-drawer__nav-scroll a:hover {
  background: rgba(47, 102, 219, 0.06);
  border-color: rgba(47, 102, 219, 0.12);
}

.mobile-drawer__nav-scroll a.is-active {
  background: linear-gradient(135deg, rgba(47, 102, 219, 0.12), rgba(106, 182, 255, 0.16));
  border-color: rgba(47, 102, 219, 0.22);
  color: #174298;
}

body.mobile-nav-open {
  overflow: hidden;
}

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

  .mobile-drawer {
    display: none !important;
  }

  .lang-switch--header {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .mobile-nav-burger {
    display: inline-flex;
  }

  .lang-switch--header {
    display: none !important;
  }

  /* 与汉堡同屏宽时统一隐藏横排主导航（各页原断点不一致，此处对齐 1024） */
  header .menu,
  header .site-menu {
    display: none !important;
  }
}
