/* ============================================================
   [品牌名称] 检测机构 - 全站公共样式（基于 TailwindCSS CDN 扩展）
   后期替换品牌色：仅需修改 :root 中的 CSS 变量
   ============================================================ */

:root {
  --brand-primary: #0E5FA5;     /* 主品牌色（蓝） */
  --brand-primary-dark: #0A4A82;
  --brand-accent: #00A9B7;      /* 点缀色（青） */
  --brand-dark: #1C1C1E;        /* 深炭灰（限时优惠/页脚/咨询/悬浮栏） */
  --brand-text: #1f2937;
  --brand-text-soft: #6b7280;
  --brand-bg: #ffffff;
  --brand-bg-soft: #f6f8fa;
  --brand-border: #e5e7eb;
}

/* ---------- 基础重置 ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--brand-text);
  background: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 容器 ---------- */
.container-x { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部工具条 ---------- */
.utility-bar {
  background: #f3f5f7;
  border-bottom: 1px solid var(--brand-border);
  font-size: 13px;
  color: var(--brand-text-soft);
}
.utility-bar a:hover { color: var(--brand-primary); }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.nav-link {
  position: relative;
  padding: 22px 18px;
  display: inline-flex; align-items: center;
  font-size: 16px; font-weight: 500;
  color: var(--brand-text);
  transition: color .2s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0;
  height: 3px; background: var(--brand-primary);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--brand-primary); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* 二级下拉 */
.has-dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: 100%; left: 0;
  min-width: 240px; background: #fff;
  border: 1px solid var(--brand-border);
  border-top: 3px solid var(--brand-primary);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s ease;
}
.has-dropdown:hover .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a {
  display: block; padding: 11px 22px; font-size: 14px; color: var(--brand-text);
}
.dropdown-panel a:hover { background: var(--brand-bg-soft); color: var(--brand-primary); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: 4px; font-size: 15px; font-weight: 500; transition: all .2s ease; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: #f3f4f6; }

/* ---------- 区块标题 ---------- */
.section-title { text-align: center; margin-bottom: 48px; }
.section-title .en { display:block; font-size: 14px; letter-spacing: .2em; color: var(--brand-primary); text-transform: uppercase; margin-bottom: 8px; }
.section-title .cn { font-size: 30px; font-weight: 700; color: var(--brand-text); position: relative; display: inline-block; }
.section-title .cn::after { content:""; position:absolute; left:50%; bottom:-14px; transform:translateX(-50%); width:48px; height:3px; background: var(--brand-primary); }

/* ---------- 服务卡片 ---------- */
.service-card {
  background: #fff; border: 1px solid var(--brand-border);
  border-radius: 6px; overflow: hidden;
  transition: all .25s ease;
}
.service-card:hover { box-shadow: 0 14px 32px rgba(14,95,165,.12); transform: translateY(-4px); border-color: transparent; }
.service-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.service-card .thumb img { width:100%; height:100%; object-fit: cover; transition: transform .4s ease; }
.service-card:hover .thumb img { transform: scale(1.06); }
.service-card .body { padding: 20px 22px 24px; }
.service-card .body h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.service-card .body p { font-size: 14px; color: var(--brand-text-soft); line-height: 1.7; }
.service-card .more { display:inline-flex; align-items:center; gap:6px; margin-top: 14px; font-size: 13px; color: var(--brand-primary); font-weight: 500; }

/* ---------- 优势卡片 ---------- */
.advantage-card {
  text-align: center; padding: 36px 24px;
  background: #fff; border-radius: 8px;
  border: 1px solid var(--brand-border);
  transition: all .25s ease;
}
.advantage-card:hover { background: var(--brand-primary); color: #fff; border-color: transparent; }
.advantage-card:hover .ico, .advantage-card:hover h3, .advantage-card:hover p { color: #fff; }
.advantage-card .ico { width: 56px; height: 56px; margin: 0 auto 18px; color: var(--brand-primary); transition: color .25s; }
.advantage-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; transition: color .25s; }
.advantage-card p { font-size: 14px; color: var(--brand-text-soft); line-height: 1.7; transition: color .25s; }

/* ---------- 资讯列表项 ---------- */
.news-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px dashed var(--brand-border); }
.news-item:last-child { border-bottom: 0; }
.news-item .date { flex-shrink:0; width: 64px; text-align:center; background: var(--brand-bg-soft); border-radius: 4px; padding: 8px 0; }
.news-item .date .d { font-size: 22px; font-weight: 700; color: var(--brand-primary); line-height: 1; }
.news-item .date .m { font-size: 12px; color: var(--brand-text-soft); margin-top: 4px; }
.news-item .info h4 { font-size: 16px; font-weight: 500; margin-bottom: 8px; transition: color .2s; }
.news-item .info p { font-size: 13px; color: var(--brand-text-soft); line-height: 1.7; }
.news-item:hover .info h4 { color: var(--brand-primary); }

/* ---------- CTA 深色带 ---------- */
.cta-band { background: var(--brand-dark); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--brand-dark); color: #c7c7cc; font-size: 14px; }
.site-footer h4 { color:#fff; font-size: 16px; font-weight: 600; margin-bottom: 22px; }
.site-footer a { color: #c7c7cc; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2c2c2e; padding-top: 20px; margin-top: 40px; }

/* ---------- 悬浮侧边栏 ---------- */
.float-bar { position: fixed; right: 16px; bottom: 96px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.float-bar .item {
  width: 52px; height: 52px; border-radius: 4px;
  background: var(--brand-dark); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; position: relative;
}
.float-bar .item:hover { background: var(--brand-primary); }
.float-bar .item .tip {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: #fff; color: var(--brand-text); padding: 8px 14px; border-radius: 4px;
  white-space: nowrap; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.12);
  opacity: 0; visibility: hidden; transition: all .2s;
}
.float-bar .item:hover .tip { opacity: 1; visibility: visible; }
.float-bar .back-top { display: none; }
.float-bar .back-top.show { display: flex; }

/* ---------- 面包屑 ---------- */
.breadcrumb { background: var(--brand-bg-soft); padding: 18px 0; font-size: 14px; color: var(--brand-text-soft); }
.breadcrumb a:hover { color: var(--brand-primary); }
.breadcrumb .sep { margin: 0 8px; color: #d1d5db; }

/* ---------- 内页横幅 ---------- */
.page-banner { position: relative; height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.page-banner img { width: 100%; height: 100%; object-fit: cover; }
.page-banner .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,74,130,.78), rgba(14,95,165,.55)); }
.page-banner .txt { position: relative; z-index: 2; color: #fff; text-align: center; }
.page-banner .txt h1 { font-size: 34px; font-weight: 700; margin-bottom: 10px; }
.page-banner .txt p { font-size: 15px; opacity: .9; letter-spacing: .1em; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 40px 0; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--brand-border); border-radius: 4px; font-size: 14px; color: var(--brand-text);
}
.pagination a:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.pagination .current { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ---------- 表单 ---------- */
.form-field { margin-bottom: 20px; }
.form-field label { display:block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--brand-text); }
.form-field label .req { color: #e11d48; margin-left: 2px; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--brand-border); border-radius: 4px;
  font-size: 14px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(14,95,165,.12);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-error { display:none; font-size: 12px; color: #e11d48; margin-top: 6px; }
.form-field.has-error .form-input, .form-field.has-error .form-textarea { border-color: #e11d48; }
.form-field.has-error .form-error { display: block; }

/* ---------- 移动端导航 ---------- */
.mobile-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 1024px) {
  .desktop-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .mobile-menu {
    display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 80%; max-width: 360px;
    background: #fff; z-index: 100; padding: 80px 0 24px; overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0,0,0,.12);
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a { display:block; padding: 14px 24px; border-bottom: 1px solid var(--brand-border); font-size: 15px; }
  .mobile-menu .sub a { padding-left: 44px; font-size: 14px; color: var(--brand-text-soft); }
  .menu-mask { display:none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
  .menu-mask.open { display: block; }
  .section-title .cn { font-size: 26px; }
}

@media (max-width: 640px) {
  .nav-link { padding: 16px 12px; font-size: 15px; }
  .section-title .cn { font-size: 22px; }
  .page-banner { height: 180px; }
  .page-banner .txt h1 { font-size: 24px; }
  .float-bar { right: 10px; bottom: 80px; }
  .float-bar .item { width: 44px; height: 44px; }
}

/* ---------- 占位图样式（后期替换为真实素材） ---------- */
.placeholder-img {
  background: linear-gradient(135deg, #eef2f7, #dde6f0);
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 13px; letter-spacing: .1em;
}
.placeholder-img::before { content: "占位图 · 后期替换"; }
