/* ============================================================
   common.css — 全局基础样式
   内容：CSS变量 / 重置 / 排版 / 布局容器 / 按钮 / 头部导航 /
         页脚 / 悬浮工具 / 弹窗 / 表单 / 通用动画
   规范：动画仅使用 opacity 与 transform，性能优先
============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #002b79;        /* 网站主色 */
  --primary-dark: #001e56;   /* 主色加深 */
  --accent: #0094b4;         /* 辅助色 */
  --accent-dark: #007a94;
  --text: #1f2733;
  --text-light: #5a6675;
  --bg: #ffffff;
  --bg-gray: #f5f7fa;
  --border: #e3e8ef;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 43, 121, .06);
  --shadow-md: 0 10px 30px rgba(0, 43, 121, .12);
  --shadow-lg: 0 18px 50px rgba(0, 43, 121, .18);
  --header-h: 78px;
  --topbar-h: 38px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; color: var(--primary); }

/* ---------- 布局容器：内容区域宽度 1440px ---------- */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* ---------- 通用区块标题 ---------- */
.section { padding: 90px 0; }
.section--gray { background: var(--bg-gray); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head__tag {
  display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 12px;
}
.section-head__title { font-size: 36px; margin-bottom: 16px; }
.section-head__desc { color: var(--text-light); font-size: 17px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 6px; font-size: 16px; font-weight: 600;
  transition: background-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--outline { border: 2px solid #fff; color: #fff; background: transparent; }
.btn--outline:hover { background: #fff; color: var(--primary); }
.btn--ghost { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn--ghost:hover { background: var(--primary); color: #fff; }
.btn--block { width: 100%; }

/* ============================================================
   顶部信息条
============================================================ */
.topbar { background: var(--primary-dark); color: rgba(255, 255, 255, .85); font-size: 13px; height: var(--topbar-h); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: var(--topbar-h); }
.topbar__left { display: flex; gap: 24px; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; }
.topbar__item:hover { color: #fff; }
.topbar__right { display: flex; gap: 14px; align-items: center; }
.topbar__social { opacity: .85; display: inline-flex; }
.topbar__social:hover { opacity: 1; transform: translateY(-1px); }
/* 深色背景上的图标统一转白（图标源文件为主色描边） */
.topbar img, .footer__contact img, .footer__social img { filter: brightness(0) invert(1); }

/* ============================================================
   头部导航（滚动时背景渐变变化）
============================================================ */
.header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.header.is-scrolled {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 60%, var(--accent-dark) 130%);
  box-shadow: var(--shadow-md);
}
.header__inner { display: flex; align-items: center; gap: 40px; height: var(--header-h);justify-content: space-between;}
.header__logo img { height:30px; width: auto; transition: filter .3s ease; }
/* 滚动后 logo 转白适配深色背景 */
.header.is-scrolled .header__logo img { filter: brightness(0) invert(1); }

.nav { flex: 1; }
.nav__list { display: flex; gap: 4px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-size: 16px; font-weight: 600; color: var(--text);
  border-radius: 6px; transition: color .25s ease, background-color .25s ease;
}
.nav__link:hover, .nav__item.is-active > .nav__link { color: var(--accent); }
.header.is-scrolled .nav__link { color: rgba(255, 255, 255, .92); }
.header.is-scrolled .nav__link:hover,
.header.is-scrolled .nav__item.is-active > .nav__link { color: #fff; background: rgba(255, 255, 255, .12); }
.nav__caret {
  width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .25s ease;
}
.nav__item--dropdown:hover .nav__caret { transform: rotate(225deg) translate(-1px, -1px); }

/* 二级下拉菜单
   稳定性要点：
   1) 用 ::before 透明桥接区填平菜单项与面板之间的空隙，
      否则鼠标斜向下移时会经过一段"既不属于菜单项也不属于面板"的空白而丢失 hover
   2) 用 visibility 的 transition-delay 做关闭宽容期（.3s），
      不用 pointer-events:none —— 后者瞬间生效，鼠标一旦离开就再也回不来 */
.nav__dropdown {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 10px; opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .3s;
}
/* 透明桥接区：向上延伸 18px，覆盖位移产生的间隙并留出余量 */
.nav__dropdown::before {
  content: ''; position: absolute; left: 0; right: 0; top: -18px; height: 18px;
}
/* :hover 为无 JS 降级，.is-hover 由 js/main.js 控制（带关闭延迟） */
.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown.is-hover .nav__dropdown {
  opacity: 1; visibility: visible; transform: translateY(2px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s;
}
.nav__dropdown a {
  display: block; padding: 10px 14px; font-size: 15px; color: var(--text);
  border-radius: 6px; transition: color .2s ease, background-color .2s ease;
}
.nav__dropdown a:hover { color: var(--accent); background: var(--bg-gray); }

/* 语言切换 */
.lang-switch { position: relative; }
.lang-switch__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; transition: all .25s ease;
}
.header.is-scrolled .lang-switch__btn { color: #fff; border-color: rgba(255, 255, 255, .4); }
.header.is-scrolled .lang-switch__btn img { filter: brightness(0) invert(1); }
.lang-switch__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 120px;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.lang-switch.is-open .lang-switch__menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-switch__menu a { display: block; padding: 8px 14px; font-size: 14px; border-radius: 5px; color: var(--text); }
.lang-switch__menu a:hover { background: var(--bg-gray); color: var(--accent); }
.lang-switch__menu .is-active a { color: var(--accent); font-weight: 600; }

/* ============================================================
   站内搜索（头部按钮 + 浮层面板）
============================================================ */
.search-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.search-toggle:hover, .search-toggle:focus-visible {
  color: var(--accent); border-color: var(--accent); background: rgba(0, 148, 180, .08); outline: none;
}
.header.is-scrolled .search-toggle { color: #fff; border-color: rgba(255, 255, 255, .45); }
.header.is-scrolled .search-toggle:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .16); }

/* 抽屉内搜索与语言入口：仅移动端显示 */
.nav__search, .nav__language { display: none; }

.search-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: flex-start; justify-content: center;
  padding: 0 24px;
}
.search-overlay.is-open { display: flex; }
.search-overlay__mask {
  position: absolute; inset: 0; background: rgba(4, 18, 44, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: searchFade .22s ease both;
}
.search-overlay__panel {
  position: relative; z-index: 1;
  width: min(720px, 100%); margin-top: 11vh;
  max-height: 72vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 18, 44, .42);
  animation: searchPop .26s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes searchFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes searchPop {
  from { opacity: 0; transform: translateY(-14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.search-box {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.search-box__icon { flex: none; color: var(--accent); }
.search-box__input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 16px; color: var(--text); font-family: inherit;
}
.search-box__input::placeholder { color: #9aa6b6; }
.search-box__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box__close {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-gray); color: var(--text-light); cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.search-box__close:hover { background: var(--primary); color: #fff; }
.search-body { padding: 12px 12px 6px; overflow-y: auto; overscroll-behavior: contain; }
.search-hot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 2px 6px 12px;
}
.search-hot__label { font-size: 13px; color: var(--text-light); margin-right: 2px; }
.search-hot__item {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--bg-gray); border: 1px solid transparent; color: var(--text);
  font-family: inherit; transition: all .2s ease;
}
.search-hot__item:hover { background: rgba(0, 148, 180, .1); border-color: rgba(0, 148, 180, .35); color: var(--accent); }
.search-list { display: flex; flex-direction: column; gap: 2px; }
.search-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 12px; border-radius: 10px; text-decoration: none;
  transition: background-color .18s ease;
}
.search-item:hover, .search-item.is-active { background: #f2f8fb; }
.search-item__tag {
  flex: none; margin-top: 2px; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; line-height: 1.6; font-weight: 600;
  color: var(--accent-dark); background: rgba(0, 148, 180, .1);
}
.search-item__main { min-width: 0; }
.search-item__title { display: block; font-size: 15px; font-weight: 600; color: var(--primary); }
.search-item__desc {
  display: block; margin-top: 3px; font-size: 13px; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item mark { background: rgba(0, 148, 180, .18); color: var(--accent-dark); padding: 0 1px; border-radius: 2px; }
.search-empty { padding: 26px 12px 30px; text-align: center; color: var(--text-light); font-size: 14px; }
.search-empty a { color: var(--accent); font-weight: 600; }
.search-tip {
  margin: 0; padding: 10px 12px 12px; font-size: 12px; color: #9aa6b6;
  border-top: 1px solid var(--border);
}
.search-tip kbd {
  padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px;
  background: #fafcfe; font-family: inherit; font-size: 11px;
}

/* 汉堡菜单按钮（移动端） */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1001; }
.hamburger span {
  width: 24px; height: 2px; background: var(--primary); border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, background-color .3s ease;
}
.header.is-scrolled .hamburger span { background: #fff; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mask {
  position: fixed; inset: 0; background: rgba(0, 20, 50, .45); z-index: 899;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.nav-mask.is-show { opacity: 1; pointer-events: auto; }

/* ============================================================
   页脚
============================================================ */
.footer { background: var(--primary-dark); color: rgba(255, 255, 255, .78); }
.footer__inner {
  display: grid; grid-template-columns: 1.1fr minmax(300px, 1fr) 1.5fr;
  column-gap:110px; row-gap: 48px; padding: 72px 32px 56px;
}
/* 产品中心 + 快速链接成组：组内两列靠近，与品牌/联系列距离拉大 */
.footer__links-group {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
}
.footer__logo { height: 36px; width: auto; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer__desc { font-size: 14px; line-height: 1.9; margin-bottom: 20px; }
.footer__social { display: flex; gap: 14px; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  transition: all .25s ease;
}
.footer__social a:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.footer__title { color: #fff; font-size: 17px; margin-bottom: 20px; }
.footer__links li { margin-bottom: 10px; }
.footer__links a { font-size: 14px; }
.footer__links a:hover { color: var(--accent); }
.footer__contact li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; font-size: 14px; }
.footer__contact img { flex: none; margin-top: 4px; }
.footer__contact a:hover { color: var(--accent); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: 13px; }
.footer__bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer__bottom a:hover { color: var(--accent); }

/* ============================================================
   右侧固定悬浮工具
============================================================ */
.floatbar {
  position: fixed; right: 18px; bottom: 110px; z-index: 950;
  display: flex; flex-direction: column; gap: 10px;
}
.floatbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 58px; height: 58px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-md);
  font-size: 12px; color: var(--primary); font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.floatbar__item:hover { background: var(--primary); color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.floatbar__item:hover img { filter: brightness(0) invert(1); }
.floatbar__item--top { opacity: 0; transform: translateY(10px); pointer-events: none; }
.floatbar__item--top.is-show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============================================================
   弹窗（微信二维码 / 留言表单）
============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 20, 50, .5); padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 580px;
  max-height: 88vh;position: relative;
  transform: translateY(24px); transition: transform .3s ease;
}
.modal__box--sm { max-width: 340px; text-align: center; }
.modal.is-open .modal__box { transform: translateY(0); }
.modal__close {
  position: absolute; top: 12px; right: 16px; font-size: 26px; color: var(--text-light); line-height: 1;
  transition: color .2s ease, transform .2s ease;
}
.modal__close:hover { color: var(--primary); transform: rotate(90deg); }
.modal__title { font-size: 22px; margin-bottom: 8px; }
.modal__tip { font-size: 14px; color: var(--text-light); margin-bottom: 20px; }
.modal__qr { margin: 0 auto 16px; border: 1px solid var(--border); border-radius: 8px; }

/* 视频弹窗（首页公司简介图片播放按钮） */
.modal__box--video {
  max-width: 960px; padding: 0; background: #000; overflow: hidden; border-radius: 14px;
}
.modal__video { display: block; width: 100%; max-height: 76vh; background: #000; }
.modal__box--video .modal__close {
  top: 8px; right: 12px; z-index: 3; color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85);
}
.modal__box--video .modal__close:hover { color: #fff; }

/* ============================================================
   表单（询盘 / 留言）
============================================================ */
.inquiry-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.form-field span { color: var(--primary); }
.form-field input, .form-field textarea, .form-field select {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; font-weight: 400;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 148, 180, .15);
}
.form-field textarea { resize: vertical; }
/* 验证码：输入框可收缩，图片限制最大宽度，避免移动端溢出 */
.form-code { display: flex; gap: 10px; align-items: center; min-width: 0; }
.form-code input { flex: 1 1 auto; width: auto; min-width: 0; }
.form-code img { flex: 0 0 auto; height: auto; width: auto; max-height: 42px; max-width: 46%; border-radius: 6px; cursor: pointer; }
@media (max-width: 480px) {
  .form-code { gap: 8px; }
  .form-code img { max-height: 40px; max-width: 42%; }
}

/* ============================================================
   通用动画（仅 opacity / transform）
============================================================ */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal--d1 { transition-delay: .1s; }
.reveal--d2 { transition-delay: .2s; }
.reveal--d3 { transition-delay: .3s; }
.reveal--d4 { transition-delay: .4s; }

/* ============================================================
   响应式：平板 ≤ 1024px / 手机 ≤ 768px
============================================================ */
@media (max-width: 1200px) {
  .nav__link { padding: 10px 10px; font-size: 15px; }
  .header__inner { gap: 20px;height:60px; }
}
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .section { padding: 64px 0; }
  .section-head__title { font-size: 30px; }
  .footer__inner {
    grid-template-columns: 1fr 1fr; column-gap: 36px; row-gap: 40px; padding: 56px 24px 40px;
  }
  /* 平板：品牌 + 联系同一行，产品/快速成组独占一行（组内仍并排） */
  .footer__col--brand { order: 1; grid-column: 1 / 2; }
  .footer__col--contact { order: 2; grid-column: 2 / 3; }
  .footer__links-group { order: 3; grid-column: 1 / -1; gap: 48px; }

  /* 导航折叠为汉堡菜单 */
  .hamburger { display: flex; position: relative; z-index: 1002; }
  /* 搜索：桌面圆形按钮隐藏，改由抽屉顶部入口触发同一浮层 */
  .search-toggle { display: none; }
  .nav__search, .nav__language {
    display: flex; align-items: center; gap: 8px; width: 100%;
    margin: 0 0 12px; padding: 11px 14px; border-radius: 8px;
    background: var(--bg-gray); border: 1px solid var(--border);
    color: var(--text-light); font-family: inherit; font-size: 14px; text-align: left;
    cursor: pointer;
  }
  .nav__search svg { color: var(--accent); }
  .nav__search:hover, .nav__language:hover { border-color: var(--accent); color: var(--accent); }
  .nav__language { cursor: default; }
  .nav__language a { color: var(--text); font-weight: 600; }
  .nav__language a:hover, .nav__language a.is-active { color: var(--accent); }
  /* 移动端浮层改全屏，键盘弹起也不遮挡结果 */
  .search-overlay { padding: 0; }
  .search-overlay__panel {
    width: 100%; margin-top: 0; max-height: 100vh; max-height: 100dvh;
    height: 100vh; height: 100dvh; border-radius: 0;
  }
  .search-box { padding: 14px 14px; }
  .search-box__input { font-size: 16px; } /* ≥16px 避免 iOS 聚焦自动放大 */
  .search-tip { display: none; }

  /* ---- 移动端抽屉塌缩修复（重要）----
     .header 上的 backdrop-filter 会为 position:fixed 的后代创建「包含块」，
     导致抽屉的 top/bottom:0 相对 header 而非视口计算，高度塌缩成 header 高度，
     除第一个菜单项外全部被裁掉（表现为"菜单只有首页"）。
     移动端移除该属性，顺带提升低端机滚动性能，用高不透明度背景补偿视觉。 */
  .header { background: rgba(255, 255, 255, .98); }
  .header,
  .header.is-scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: 1001;      /* 高于悬浮工具栏(950)，避免抽屉被压在下面 */
  }
  /* logo 宽约 306px，会被 320px 宽的抽屉裁掉大半，展开时淡出更干净 */
  .header__logo { transition: opacity .25s ease; }
  body.nav-open .header__logo { opacity: 0; pointer-events: none; }
  /* 抽屉展开时 header 归白，与白色抽屉融为一体
     （滚动后 is-scrolled 是深蓝渐变，会在抽屉旁露出一条突兀的深蓝） */
  body.nav-open .header,
  body.nav-open .header.is-scrolled {
    background: #fff;
    box-shadow: none;
  }
  /* 关键：滚动状态下汉堡线是白色，压在白色抽屉上会完全看不见，
     展开时强制改回深色（特异性需高于 .header.is-scrolled .hamburger span） */
  body.nav-open .header.is-scrolled .hamburger span,
  body.nav-open .header .hamburger span { background: var(--primary); }

  .nav {
    position: fixed; top: 0; right: 0;
    width: min(320px, 84vw);
    height: 100vh;                  /* 兜底 */
    height: 100dvh;                 /* 适配移动端地址栏动态高度 */
    z-index: 1000;
    background: #fff; box-shadow: var(--shadow-lg);
    padding: calc(var(--header-h) + 10px) 24px calc(32px + env(safe-area-inset-bottom));
    transform: translateX(100%); transition: transform .35s ease;
    overflow-y: auto;
    overscroll-behavior: contain;   /* 滚动到边界不带动页面 */
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 2px; }
  .nav__link { display: flex; width: 100%; justify-content: space-between; padding: 13px 10px; color: var(--text) !important; }
  .header.is-scrolled .nav__link { color: var(--text) !important; background: none; }
  .nav__dropdown {
    position: static; box-shadow: none; padding: 0 0 0 16px; display: none;
    opacity: 1; transform: none; pointer-events: auto;
  }
  .nav__item--dropdown.is-expanded .nav__dropdown { display: block; }
  /* 滚动后 logo 转白仍需生效：移动端 is-scrolled 头部同样是深蓝渐变，
     深色 logo 会隐没在背景里（抽屉展开时 logo 已 opacity:0，互不影响） */
  .lang-switch { display: none; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head__title { font-size: 26px; }
  .footer__inner { grid-template-columns: 1fr; row-gap: 28px; }
  /* 手机：三段竖排，但「产品中心 / 快速链接」保持两列并排 */
  .footer__col--brand, .footer__col--contact, .footer__links-group {
    order: 0; grid-column: 1 / -1;
  }
  .footer__links-group { gap: 28px; margin-top: 4px; }
  .footer__bottom-inner { justify-content: center; text-align: center; }
  .floatbar { right: 12px; bottom: 80px; }
  .floatbar__item { width: 50px; height: 50px; font-size: 11px; }
  .form-row { grid-template-columns: 1fr; }
  .modal__box { padding: 26px 20px; }
  .btn { padding: 12px 24px; font-size: 15px; }
}

/* ============================================================
   新增组件 01：社媒二维码 hover 浮层（顶部信息条 / 页脚底部）
============================================================ */
.social-qr-wrap { position: relative; display: inline-flex; }
.social-qr {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 960;
  width: 164px; white-space: nowrap;
  background: #fff; border-radius: 10px; padding: 12px; box-shadow: var(--shadow-lg);
  text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.social-qr img { width: 140px; height: 140px; border-radius: 6px; display: block; margin: 0 auto 8px; }
.social-qr span { display: block; font-size: 12px; color: var(--text-light); }
.social-qr-wrap:hover .social-qr { opacity: 1; transform: translateY(0); pointer-events: auto; }
/* 页脚：二维码向上弹出 */
.social-qr-wrap--up .social-qr { top: auto; bottom: calc(100% + 12px); right: auto; left: 50%; transform: translate(-50%, 8px); }
.social-qr-wrap--up:hover .social-qr { transform: translate(-50%, 0); }

/* ============================================================
   新增组件 02：右侧悬浮「联系」hover 展开多个电话
============================================================ */
.float-contact { position: relative; }
.float-contact__panel {
  position: absolute; right: calc(100% + 12px); bottom: 0; width: 210px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 16px;
  opacity: 0; transform: translateX(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.float-contact:hover .float-contact__panel { opacity: 1; transform: translateX(0); pointer-events: auto; }
.float-contact__panel h4 { font-size: 14px; color: var(--primary); margin-bottom: 10px; line-height: 1.4; }
.float-contact__panel a {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  font-size: 13px; color: var(--text); border-top: 1px solid var(--border);
  transition: color .2s ease, transform .2s ease;
}
.float-contact__panel a:first-of-type { border-top: none; }
.float-contact__panel a:hover { color: var(--accent); transform: translateX(3px); }
.float-contact__panel img { filter: brightness(0) saturate(100%) invert(23%) sepia(72%) saturate(3000%) hue-rotate(200deg); }

/* ============================================================
   新增组件 03：通用轮播（左右箭头 + 滚动吸附）
============================================================ */
.carousel { position: relative; }
.carousel__viewport {
  display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport > * { flex: none; scroll-snap-align: start; }
.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--primary);
  box-shadow: var(--shadow-md); font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .25s ease, color .25s ease, transform .25s ease, opacity .25s ease;
}
.carousel__arrow:hover { background: var(--primary); color: #fff; transform: translateY(-50%) scale(1.06); }
.carousel__arrow[disabled] { opacity: .35; pointer-events: none; }
.carousel__arrow--prev { left: -22px; }
.carousel__arrow--next { right: -22px; }

/* ============================================================
   新增组件 04：产品/资讯 分类 Tab
============================================================ */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.tab {
  padding: 10px 22px; border: 1px solid var(--border); border-radius: 24px;
  font-size: 15px; font-weight: 600; color: var(--text); background: #fff;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.tab:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
/* Tab 过滤隐藏项 */
.js-filter-item.is-hidden { display: none; }

/* ============================================================
   新增组件 05：分页页码
============================================================ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination__item {
  min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 15px; font-weight: 600; color: var(--text);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.pagination__item:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.pagination__item.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination__item[disabled] { opacity: .45; cursor: not-allowed; }
.pagination__ellipsis { padding: 0 6px; color: var(--text-light); font-weight: 600; }

@media (max-width: 768px) {
  .carousel__arrow { width: 38px; height: 38px; font-size: 18px; }
  .carousel__arrow--prev { left: -6px; }
  .carousel__arrow--next { right: -6px; }
  .tabs { gap: 8px; margin-bottom: 28px; }
  .tab { padding: 8px 16px; font-size: 14px; }
  .float-contact__panel { width: 180px; }
}

/* 二维码浮层内的图片不受深色背景"图标转白"滤镜影响 */
.social-qr img, .modal__qr { filter: none !important; }

/* 浮动工具栏避让：1280–1560 视口下给内容区补足侧边距，
   避免右侧固定工具栏压住正文、表格与搜索框（头部保持原边距不被压窄） */
@media (min-width: 1280px) and (max-width: 1560px) {
  .container { padding-left: 88px; padding-right: 88px; }
  .header .container, .topbar .container { padding-left: 32px; padding-right: 32px; }
}
