/* 前台公共导航 + 页脚（大厂官网风格）。首页和产品页等前台页面共用：由 lib/sitechrome.php 输出 HTML。
 * 变量只定义在导航/页脚自己的范围内，不会影响页面里原有的 style.css。 */
.h-nav, .h-foot, .h-flash, body.home {
  --blue: #1366ec; --blue-d: #0d4fc0; --blue-weak: #eaf1fe;
  --orange: #ff6a00;
  --text: #181818; --t2: #595959; --t3: #8c8c8c;
  --bg: #f5f7fa; --card: #fff; --line: #e8ebf0;
  --navy: #0a1b3a; --navy-2: #0f2a57;
  --radius: 8px; --wrap: 1200px;
  --shadow: 0 6px 24px rgba(16, 42, 90, .10);
}
.h-nav, .h-nav *, .h-foot, .h-foot *, .h-flash, .h-flash * { box-sizing: border-box; }
.h-nav, .h-foot, .h-flash { font: 14px/1.65 "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; color: var(--text); }
.h-nav a, .h-foot a { color: inherit; text-decoration: none; }
.h-nav h1, .h-nav h2, .h-nav h3, .h-nav p, .h-nav ul, .h-foot p, .h-foot ul { margin: 0; padding: 0; }
.h-nav ul, .h-foot ul { list-style: none; }
.h-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.hi { width: 1em; height: 1em; flex: none; vertical-align: -.15em; }
/* ---------- 按钮 ---------- */
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 22px; border-radius: 4px; border: 1px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.h-btn-sm { height: 32px; padding: 0 16px; font-size: 13px; }
.h-btn-lg { height: 48px; padding: 0 32px; font-size: 16px; }
.h-btn-block { width: 100%; }
/* .h-btn.h-btn-x 的优先级高于 a { color: inherit }，按钮文字色不会被盖掉 */
.h-btn.h-btn-primary { background: var(--blue); color: #fff; }
.h-btn.h-btn-primary:hover { background: var(--blue-d); }
.h-btn.h-btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.h-btn.h-btn-outline:hover { background: var(--blue); color: #fff; }
.h-btn.h-btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .55); }
.h-btn.h-btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.h-btn.h-btn-white { background: #fff; color: var(--blue); }
.h-btn.h-btn-white:hover { background: #eaf1fe; }

/* ---------- 顶部导航 ---------- */
.h-nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(16, 42, 90, .05); }
.h-nav-in { display: flex; align-items: center; height: 64px; gap: 22px; }
.h-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text); }
.h-brand img { width: 30px; height: 30px; object-fit: contain; }
.h-menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.h-links { display: flex; align-items: center; gap: 4px; }
.h-links > a, .h-dd-t { display: inline-flex; align-items: center; gap: 4px; height: 64px; padding: 0 12px; color: var(--text); font-size: 15px; white-space: nowrap; transition: color .15s; }
.h-nav .h-links > a:hover, .h-nav .h-dd:hover .h-dd-t { color: var(--blue); }
.h-dd { position: relative; }
.h-dd-t .hi { width: 14px; height: 14px; transition: transform .15s; }
.h-dd:hover .h-dd-t .hi { transform: rotate(180deg); }
.h-mega { position: absolute; left: -8px; top: 64px; width: 560px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); display: none; grid-template-columns: 1fr 1fr; gap: 6px; }
.h-dd:hover .h-mega, .h-dd:focus-within .h-mega { display: grid; }
.h-mega-i { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 6px; position: relative; }
.h-mega-i:hover { background: var(--blue-weak); }
.h-mega-ico { width: 38px; height: 38px; border-radius: 8px; background: var(--blue-weak); color: var(--blue); display: grid; place-items: center; font-size: 20px; flex: none; }
.h-mega-tx { display: flex; flex-direction: column; min-width: 0; }
.h-mega-tx b { font-size: 14px; font-weight: 600; }
.h-mega-tx small { color: var(--t3); font-size: 12px; line-height: 1.4; margin-top: 1px; }
.h-mega-i em { position: absolute; right: 12px; top: 10px; font-style: normal; font-size: 12px; color: var(--orange); }
.h-about-menu { width: 220px; grid-template-columns: 1fr; padding: 8px; }
.h-about-menu .h-mega-i { padding: 11px 12px; }
.h-about-menu .h-mega-tx b { font-size: 14px; }
.h-about-menu .h-mega-tx small { max-width: 165px; }
.h-user { display: flex; align-items: center; gap: 8px; flex: none; }
.h-link { position: relative; padding: 0 10px; color: var(--t2); font-size: 14px; }
.h-link:hover { color: var(--blue); }
.h-badge { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px; border-radius: 8px; background: var(--orange); color: #fff; font-size: 11px; line-height: 1; }
.h-nav-cb { display: none; }
.h-burger { display: none; width: 40px; height: 40px; margin-left: auto; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 0 9px; }
.h-burger i { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.h-flash { background: #fff7e6; border-bottom: 1px solid #ffe2a8; color: #8a5a00; padding: 10px 0; font-size: 14px; }


/* ---------- 页脚 ---------- */
.h-foot { background: linear-gradient(180deg, #edf6ff 0%, #e3f0ff 100%); color: #526580; padding-top: 52px; }
.h-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 36px; }
.h-foot .h-brand { color: #10233f; }
.h-foot-brand p { margin-top: 14px; font-size: 13px; line-height: 1.8; max-width: 320px; }
.h-foot h5 { margin: 0 0 14px; color: #10233f; font-size: 15px; font-weight: 600; }
.h-foot-grid a:not(.h-brand) { display: block; padding: 4px 0; font-size: 13.5px; transition: color .15s; }
.h-foot-grid a:not(.h-brand):hover { color: #1266e3; }
.h-foot-grid p { font-size: 13.5px; margin-bottom: 6px; }
.h-foot a.inl { display: inline; margin-left: 8px; padding: 0; }
.h-foot-links { padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(18, 102, 227, .14); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.h-foot-links span { color: #10233f; }
.h-foot-links a:hover { color: #1266e3; }
.h-foot-copy { border-top: 1px solid rgba(18, 102, 227, .14); padding: 18px 0; font-size: 12.5px; text-align: center; }


@media (max-width: 1100px) {
  .h-foot-grid { grid-template-columns: 1fr 1fr; }
  .h-nav-in { gap: 10px; }
  .h-menu { gap: 8px; }
  .h-links > a, .h-dd-t { padding-left: 8px; padding-right: 8px; }
  .h-link { padding-left: 5px; padding-right: 5px; }
}
@media (max-width: 1040px) {
  .h-burger { display: flex; }
  .h-nav-in { gap: 8px; }
  .h-menu { position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; padding: 8px 24px 18px; display: none; }
  .h-nav-cb:checked ~ .h-menu { display: flex; }
  .h-links { flex-direction: column; align-items: stretch; gap: 0; }
  .h-links > a, .h-dd-t { height: 46px; padding: 0; border-bottom: 1px solid var(--line); }
  .h-mega { position: static; display: grid; width: auto; padding: 4px 0 8px; border: 0; box-shadow: none; grid-template-columns: 1fr; }
  .h-dd-t .hi { display: none; }
  .h-user { padding-top: 14px; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .h-wrap { padding: 0 16px; }
  .h-foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { .h-nav *, .h-foot * { transition: none !important; } }
