/* ============================================================
   global-nav.css —— 全站统一导航栏 + 页脚（复刻参考站首页样式）
   作用域类名 .gHeader / .gFooter，避免与各页主体样式冲突
   ============================================================ */
:root {
  --brand:        #12b76a;
  --brand-dark:   #0a8f52;
  --brand-deep:   #076b3d;
  --brand-50:     #eafaf1;
  --brand-100:    #d3f2e2;
  --sky:          #0ea5e9;
  --sky-dark:     #0284c7;
  --sky-50:       #e6f5fd;
  --amber:        #f59e0b;
  --amber-dark:   #d97706;
  --amber-50:     #fef4e2;
  --danger:       #e5484d;
  --danger-50:    #fdecec;
  --ink:          #0d1f16;
  --ink-2:        #33473c;
  --ink-3:        #5b6f63;
  --muted:        #7a8c82;
  --line:         rgba(13, 31, 22, .09);
  --line-soft:    rgba(13, 31, 22, .05);
  --surface:      #ffffff;
  --surface-alt:  #f5faf7;
  --surface-sink: #eef5f1;
  --dark:         #0f2a1e;
  --dark-2:       #123a4a;
  --mint:         #6ef0ad;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
  --sp-1: 6px;  --sp-2: 10px; --sp-3: 14px; --sp-4: 18px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 44px; --sp-8: 64px;
  --r-sm: 10px;  --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --sh-xs: 0 1px 2px rgba(13, 31, 22, .05);
  --sh-sm: 0 6px 18px -10px rgba(13, 31, 22, .18);
  --sh-md: 0 14px 34px -16px rgba(13, 31, 22, .22);
  --sh-lg: 0 30px 70px -28px rgba(13, 31, 22, .30);
  --sh-brand: 0 12px 26px -12px rgba(18, 183, 106, .85);
  --nav-h: 68px;
  --wrap:  1220px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .2s;
  --t: .28s;
}

/* body 顶部为固定导航预留高度 */
body.has-gnav { padding-top: var(--nav-h); }

/* —— 顶部导航（作用域 .gHeader） —— */
.gHeader {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  height: var(--nav-h); display: flex; align-items: center;
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px -20px rgba(13,31,22,.5);
}
.gHeader .g-nav { width: min(var(--wrap), 92vw); margin-inline: auto; display: flex; align-items: center; gap: var(--sp-5); }
.gHeader .g-brand { display: flex; align-items: center; gap: var(--sp-2); flex: none; text-decoration: none; }
.gHeader .g-brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), #0bb3a0 55%, var(--sky));
  box-shadow: 0 6px 16px -6px rgba(18,183,106,.7);
}
.gHeader .g-brand-mark img { width: 22px; height: 22px; display: block; }
.gHeader .g-brand-text { font-weight: 800; font-size: 18px; letter-spacing: -.4px; line-height: 1.1; color: var(--ink); }
.gHeader .g-brand-text small {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: 2.2px;
  color: var(--muted); line-height: 1; margin-top: 3px;
}
.gHeader .g-menu { display: flex; gap: 2px; align-items: center; list-style: none; margin: 0 0 0 auto; padding: 0; }
.gHeader .g-menu > li { position: relative; }
.gHeader .g-menu a {
  display: block; padding: 8px 13px; border-radius: var(--r-sm); font-size: 14.5px;
  color: var(--ink-2); font-weight: 500; text-decoration: none; transition: var(--t-fast);
}
.gHeader .g-menu a:hover { color: var(--brand-dark); background: var(--brand-50); }
.gHeader .g-menu a.on { color: var(--brand-dark); background: var(--brand-50); font-weight: 600; }
.gHeader .g-menu a.t { padding: 8px 13px; }
.gHeader .g-menu a.t::after { content: '⌄'; margin-left: 6px; font-size: 12px; }
.gHeader .g-dd {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 172px; padding: 7px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,.98);
  box-shadow: var(--sh-md); z-index: 170; flex-direction: column;
}
.gHeader .g-menu > li:hover .g-dd, .gHeader .g-menu > li:focus-within .g-dd { display: flex; }
.gHeader .g-dd a { display: block; white-space: nowrap; }
.gHeader .g-actions { display: flex; gap: var(--sp-2); align-items: center; }
.gHeader .g-burger { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: #fff; place-items: center; cursor: pointer; }
.gHeader .g-burger span { display: block; width: 17px; height: 1.8px; background: var(--ink); border-radius: 2px; margin: 3px auto; }

/* —— 按钮（作用域内，不影响页面主体按钮） —— */
.gHeader .btn, .gFooter .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap; text-decoration: none;
}
.gHeader .btn:hover, .gFooter .btn:hover { transform: translateY(-1px); }
.gHeader .btn-primary, .gFooter .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: var(--sh-brand);
}
.gHeader .btn-primary:hover, .gFooter .btn-primary:hover { box-shadow: 0 18px 34px -12px rgba(18,183,106,.95); }
.gHeader .btn-ghost, .gFooter .btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--sh-xs); }
.gHeader .btn-ghost:hover, .gFooter .btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

/* —— 页脚（作用域 .gFooter） —— */
.gFooter { background: var(--ink); color: rgba(255,255,255,.7); padding: 60px 0 30px; margin-top: var(--sp-6); }
.gFooter .g-foot-wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }
.gFooter .g-foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.gFooter .g-foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; margin-bottom: 16px; }
.gFooter .g-foot-brand .g-brand-mark { width: 32px; height: 32px; background: #fff; }
.gFooter .g-foot-brand .g-brand-mark img { width: 23px; height: 23px; }
.gFooter .g-foot-desc { max-width: 320px; color: rgba(255,255,255,.55); font-size: 13px; line-height: 1.7; }
.gFooter .g-foot-col h4 { color: #fff; font-size: 14px; margin-bottom: 16px; }
.gFooter .g-foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gFooter .g-foot-col a { color: rgba(255,255,255,.55); font-size: 13px; text-decoration: none; }
.gFooter .g-foot-col a:hover { color: #fff; }
.gFooter .g-foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; font-size: 12px; color: rgba(255,255,255,.4); }
.gFooter .g-foot-bottom a { color: rgba(255,255,255,.4); text-decoration: none; }
.gFooter .g-foot-bottom a:hover { color: #fff; }

/* —— 响应式 —— */
@media (max-width: 900px) {
  body.has-gnav { padding-top: var(--nav-h); }
  .gHeader .g-menu { display: none; }
  .gHeader .g-actions .btn { display: none; }
  .gHeader .g-burger { display: grid; }
  .gHeader .g-menu.is-open {
    display: flex; position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: #fff; padding: var(--sp-3); gap: 4px; z-index: 140;
    border-bottom: 1px solid var(--line); box-shadow: var(--sh-md);
  }
  .gHeader .g-menu > li { width: 100%; }
  .gHeader .g-menu a.t { width: 100%; text-align: left; }
  .gHeader .g-dd { position: static; min-width: 0; margin: 2px 0 4px 12px; box-shadow: none; border: 0; background: var(--surface-alt); }
  .gFooter .g-foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .gFooter .g-foot-bottom { align-items: flex-start; flex-direction: column; }
}
