/* =========================================================
   components.css · 通用组件：按钮 / 卡片 / 标签 / Header / Footer
   ========================================================= */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: 0 1.6rem;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
}
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 125%; }
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(11, 78, 162, .28);
}

.btn-outline { background: transparent; color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline:hover { background: var(--bg-light-blue); transform: translateY(-1px); border-color: var(--brand-blue); }

.btn-light { background: #fff; color: var(--brand-primary); }
.btn-light:hover { background: #f2f7fd; transform: translateY(-1px); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--border-subtle), var(--border-subtle)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  background: linear-gradient(#fff, #fff) padding-box, var(--grad-brand) border-box;
}

/* 标签 pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .9rem;
  font-size: var(--fs-note);
  font-weight: 500;
  color: var(--brand-primary);
  background: var(--bg-light-blue);
  border-radius: 999px;
  white-space: nowrap;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-blue);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: .3rem; margin-inline: auto; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 1rem;
  font-size: var(--fs-body);
  color: var(--text-primary);
  position: relative;
  border-radius: var(--radius-btn);
  transition: background var(--ease), color var(--ease);
}
.main-nav a:hover {
  background: var(--bg-light-blue);
  color: var(--brand-primary);
}
.main-nav a.active {
  color: #fff;
  font-weight: 600;
  background: var(--grad-brand);
}

.header-cta { flex-shrink: 0; }
.header-cta .btn { min-height: 42px; padding: 0 1.2rem; }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-subtle);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--text-primary); margin: 2.5px 0; transition: transform var(--ease), opacity var(--ease); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0A2E54;
  color: #c6d6e8;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding: 4rem 0 3rem;
}
.footer-brand .brand-text { color: #fff; font-weight: 700; font-size: 1.2rem; margin-bottom: .5rem; }
.footer-brand .brand-sub { color: #9db7d0; }
.footer-brand p { margin-top: 1rem; font-size: var(--fs-note); max-width: 260px; }
.footer-col h4 { color: #fff; font-size: var(--fs-note); font-weight: 600; margin-bottom: 1rem; }
.footer-col a {
  display: block;
  color: #c6d6e8;
  font-size: var(--fs-note);
  padding: .3rem 0;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.25rem 0;
  font-size: var(--fs-note);
  color: #8da8c4;
}

/* ---------- 咨询弹层 ---------- */
.consult-dialog {
  border: none;
  border-radius: var(--radius-card-lg);
  padding: 0;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 64px rgba(11, 78, 162, .25);
}
.consult-dialog::backdrop { background: rgba(18, 48, 74, .45); }
.consult-body { padding: 2rem 2rem 1.8rem; }
.consult-body h3 { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); margin-bottom: .8rem; }
.consult-body p { color: var(--text-secondary); font-size: var(--fs-note); line-height: 1.7; margin-bottom: 1.5rem; }
.consult-body p:last-of-type { margin-bottom: 1.2rem; }
.consult-phone { font-size: .95rem !important; color: var(--text-primary) !important; }
.consult-phone a { color: var(--c-blue, #1677D2); font-weight: 600; text-decoration: none; }
.consult-phone a:hover { text-decoration: underline; }

/* ---------- 移动端菜单 ---------- */
@media (max-width: 767px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 16px 32px rgba(11, 78, 162, .12);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    height: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--bg-alt);
    border-radius: 0;
  }
}

/* 页脚响应式（全站共用） */
@media (max-width: 991px) {
  .footer-main { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .footer-main { grid-template-columns: 1fr; }
}

/* ---------- 模块通用（全站共用） ---------- */
.section { padding: var(--section-pad) 0; }
.section.bg-blue { background: var(--bg-light-blue); }
.section.bg-alt { background: var(--bg-alt); }

/* ---------- CTA 咨询横幅（全站共用） ---------- */
.cta-band {
  margin-top: 4rem;
  background: var(--grad-deep);
  border-radius: var(--radius-card-lg);
  padding: 3.5rem 3rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -70%; right: -8%;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
  pointer-events: none;
}
.cta-band::after {
  content: "";
  position: absolute;
  bottom: -60%; left: -6%;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 200, .22), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: 1.7rem; font-weight: 600; margin-bottom: .6rem; }
.cta-band p { color: #e0ecfa; max-width: 560px; }
.cta-band .cta-actions { display: flex; gap: 1rem; flex-shrink: 0; }

/* ---------- 返回顶部（全站共用） ---------- */
.back-top {
  position: fixed;
  right: 1.6rem; bottom: 1.6rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--brand-primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 78, 162, .3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease), background var(--ease);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--brand-deep); }

@media (max-width: 991px) {
  .cta-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  .cta-band { padding: 2.4rem 1.6rem; }
  .cta-band .cta-actions { flex-direction: column; width: 100%; }
  .cta-band .cta-actions .btn { width: 100%; }
}

/* ---------- 文章卡（全站共用：首页技术知识 / 技术中心 / 新闻动态） ---------- */
.article-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.article-card .a-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  overflow: hidden;
}
.article-card .a-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card .a-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.8rem 1.8rem;
}
.article-card .a-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: .22rem .7rem;
  border-radius: 999px;
  background: var(--bg-light-blue);
  color: var(--brand-primary);
  margin-bottom: .8rem;
}
.article-card h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.5; color: var(--text-primary); margin-bottom: .7rem; }
.article-card p {
  font-size: var(--fs-note);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .a-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: var(--fs-note);
  font-weight: 500;
  color: var(--brand-primary);
}
.article-card .a-link:hover { color: var(--brand-blue); }

/* =========================================================
   V1 定稿层 · 全站共用的工程制图语言与收敛规则
   依据：首页排版方案-V1.md 第 2.1 节（2026-11-06 用户确认）
   说明：首页与所有内页复用这一层，不单独发明新样式
   ========================================================= */

/* --- 标题断行：避免末行只剩 1~2 字的孤字（V1 验收 #1） --- */
.article-card h3, .honor-card h3, .case-body h3, .solution-item h3,
.cat-card h3, .model-card .p-model, .product-item .p-model { text-wrap: balance; }

/* --- 三段渐变收敛：导航激活态由「渐变圆角方块」改「文字 + 2px 细下划线」 --- */
/* hover 的圆角方框反馈按用户此前明确要求保留，只改 active 态 */
.main-nav a.active {
  color: var(--brand-primary);
  font-weight: 600;
  background: transparent;
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem; bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-primary);
}

/* --- 卡片：移除 hover 渐变边框，改 1px 边框变色 + 轻微上浮 --- */
.card {
  background: #fff;
  border: 1px solid var(--border-subtle);
}
.card:hover {
  border-color: var(--brand-blue);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* --- CTA 通栏：去掉漂浮光斑，改 1px 工程网格底纹 --- */
.cta-band::before {
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .065) 1px, transparent 1px);
  background-size: 36px 36px;
}
.cta-band::after { display: none; }
.cta-band .cta-tel {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem;
  color: #fff; font-size: 1.15rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45);
  text-underline-offset: 5px;
}
.cta-band .cta-tel:hover { text-decoration-color: #fff; }

/* --- 页脚 ICP --- */
.footer-bottom .footer-icp { margin-top: .4rem; }
.footer-bottom .footer-icp a { color: inherit; }
.footer-bottom .footer-icp a:hover { color: #fff; text-decoration: underline; }

/* --- 工程制图原语 --- */
.v1-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: .65rem;
  font-size: var(--fs-note); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: .75rem;
}
.v1-no {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 24px; padding: 0 .35rem;
  border: 1px solid var(--line-tech);
  border-radius: 4px;
  background: #fff;
  color: var(--brand-primary);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.v1-kicker--light { color: #9fc9ef; }
.v1-kicker--light .v1-no {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(159, 201, 239, .45);
  color: #eaf3fc;
}

/* 1px 网格底纹（浅底 / 深底两种） */
.tech-grid { position: relative; }
.tech-grid::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-tech) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-tech) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.tech-grid--dark::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
}
.tech-grid > * { position: relative; }

/* 角落十字定位标记 */
.tech-cross { position: absolute; z-index: 2; width: 14px; height: 14px; opacity: .75; pointer-events: none; }
.tech-cross::before, .tech-cross::after { content: ""; position: absolute; background: var(--brand-blue); }
.tech-cross::before { width: 14px; height: 1px; top: 6px; left: 0; }
.tech-cross::after { width: 1px; height: 14px; left: 6px; top: 0; }
.tech-cross--tl { top: 14px; left: 14px; }
.tech-cross--br { bottom: 14px; right: 14px; }
.tech-cross--light::before, .tech-cross--light::after { background: #8fc4f2; }

/* 尺寸标注线：|—— 8" × 40" ——| */
.dim-line { display: flex; align-items: center; gap: .7rem; width: 100%; }
.dim-tick { position: relative; flex: 1; height: 1px; background: var(--line-tech); }
.dim-tick::before, .dim-tick::after {
  content: ""; position: absolute; top: -3px;
  width: 1px; height: 7px; background: var(--line-tech);
}
.dim-tick::before { left: 0; }
.dim-tick::after { right: 0; }
.dim-text {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

/* 深色信任证据通栏（首页模块 4，内页可复用同一结构） */
.evidence-band {
  position: relative;
  background: var(--grad-deep);
  color: #fff;
  padding: 3.2rem 0;
  overflow: hidden;
}
.evidence-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.evidence-item { padding: .4rem 2.2rem; border-right: 1px solid rgba(255, 255, 255, .16); }
.evidence-item:first-child { padding-left: 0; }
.evidence-item:last-child { border-right: none; padding-right: 0; }
.evidence-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: #9fc9ef; margin-bottom: .7rem;
}
.evidence-value {
  display: block; font-size: 1.3rem; font-weight: 600; line-height: 1.5;
  color: #fff; margin-bottom: .45rem;
}
.evidence-value a { color: #fff; }
.evidence-value a:hover { text-decoration: underline; text-underline-offset: 5px; }
.evidence-value--tel { font-size: 1.85rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.evidence-note { display: block; font-size: 12px; line-height: 1.6; color: #b9d2ea; }
.evidence-note a { color: #eaf3fc; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 767px) {
  .main-nav a.active::after { display: none; }
  .main-nav a.active { background: var(--bg-light-blue); }
  .evidence-inner { grid-template-columns: 1fr; }
  .evidence-item { padding: 1.1rem 0; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, .16); }
  .evidence-item:first-child { padding-top: 0; }
  .evidence-item:last-child { border-bottom: none; padding-bottom: 0; }
  .evidence-value--tel { font-size: 1.6rem; }
}
