/* site.css — 云南协研检测官网前台样式（设计令牌取自 Ardot 设计稿）
   ink #14171A / paper #FFF / mist #F6F6F7 / brand red #C9182B / 红底 #FBEDEE / line #E7E9EB
   字体：Noto Sans SC（正文/标题）+ Inter Tight（数字/英文标签，降级 sans-serif） */
:root {
  --ink: #14171A;
  --ink-2: #262A31;
  --paper: #FFFFFF;
  --mist: #F6F6F7;
  --red: #C9182B;
  --red-bg: #FBEDEE;
  --line: #E7E9EB;
  --muted: #70737A;
  --muted-2: #AEAEBB;
  --en: "Inter Tight", "Segoe UI", Arial, sans-serif;
  --zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--zh); color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.75; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 44px; width: auto; }
.site-nav { display: flex; gap: 34px; }
.site-nav a { font-size: 15px; color: var(--ink-2); padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); border-bottom-color: var(--red); font-weight: 600; }

/* ---------- 导航下拉 / 飞出（检测服务：二级「物性检测」→ 三级板块） ---------- */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-caret { font-size: 10px; color: var(--muted-2); transition: transform .15s; }
.nav-item:hover > a .nav-caret { transform: rotate(180deg); }
.nav-drop { display: none; position: absolute; top: 100%; left: -16px; margin-top: 6px; min-width: 172px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 36px rgba(20, 23, 26, .12); padding: 8px; z-index: 60; }
.nav-drop::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* 悬停过桥 */
.nav-item:hover > .nav-drop { display: block; }
.nav-sub { position: relative; }
.nav-sub-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--ink-2); }
.nav-sub-link:hover { background: var(--mist); color: var(--ink); }
.nav-sub-link .nav-arrow { color: var(--muted-2); font-size: 11px; }
.nav-flyout { display: none; position: absolute; left: 100%; top: -9px; margin-left: 6px; width: 480px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 36px rgba(20, 23, 26, .12); padding: 14px 16px; }
.nav-flyout::before { content: ""; position: absolute; top: 0; bottom: 0; left: -8px; width: 8px; } /* 悬停过桥 */
.nav-sub:hover .nav-flyout { display: block; }
.flyout-head { font-family: var(--en); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.flyout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.flyout-grid a { padding: 7px 10px; font-size: 13.5px; color: var(--ink-2); border-radius: 6px; line-height: 1.45; }
.flyout-grid a:hover { background: var(--red-bg); color: var(--red); }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 84px 0 92px; }
.hero .eyebrow { font-family: var(--en); font-size: 12px; letter-spacing: .22em; color: var(--muted-2); text-transform: uppercase; }
.hero h1 { font-size: 44px; font-weight: 700; line-height: 1.28; margin: 14px 0 18px; }
.hero h1 .red { color: #E8394A; }
.hero p.lead { color: #C8CBD0; font-size: 16px; max-width: 640px; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; }
.btn-primary { display: inline-block; background: var(--red); color: #fff; padding: 13px 30px; border-radius: 8px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; }
.btn-primary:hover { background: #A61525; }
.btn-ghost { display: inline-block; border: 1px solid rgba(255, 255, 255, .28); color: #fff; padding: 13px 28px; border-radius: 8px; font-size: 15px; }
.btn-ghost:hover { border-color: #fff; }

/* ---------- 区块通用 ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--mist); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.sec-eyebrow { font-family: var(--en); font-size: 11px; letter-spacing: .2em; color: var(--red); text-transform: uppercase; }
.sec-title { font-size: 30px; font-weight: 700; margin: 8px 0 6px; }
.sec-sub { color: var(--muted); font-size: 14px; }
.sec-more { font-size: 13px; color: var(--muted); }
.sec-more:hover { color: var(--red); }

/* ---------- 检测项目卡（6 张，342×150 图片位） ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; transition: box-shadow .18s, transform .18s; }
.project-card:hover { box-shadow: 0 12px 32px rgba(20, 23, 26, .08); transform: translateY(-2px); }
.project-card .ph { height: 150px; background: #F2F3F4; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted-2); position: relative; overflow: hidden; }
.project-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.project-card:hover .ph img { transform: scale(1.04); }
.project-card .ph svg { width: 22px; height: 22px; stroke: var(--muted-2); fill: none; stroke-width: 1.2; }
.project-card .ph span { font-size: 11px; }
.project-card .body { padding: 18px 20px 20px; }
.project-card .code { font-family: var(--en); font-size: 11px; color: var(--muted-2); letter-spacing: .08em; }
.project-card .name { font-size: 18px; font-weight: 700; margin: 4px 0 6px; }
.project-card .desc { font-size: 13px; color: var(--muted); min-height: 44px; }
.project-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }
.project-card .price { font-family: var(--en); font-weight: 600; color: var(--red); }

/* ---------- 新闻区 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; background: var(--paper); transition: box-shadow .18s; }
.news-card:hover { box-shadow: 0 12px 32px rgba(20, 23, 26, .08); }
.news-card .cover { height: 170px; object-fit: cover; width: 100%; background: #F2F3F4; }
.news-card .cover-ph { height: 170px; background: #F2F3F4; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 12px; }
.news-card .body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.news-card .meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted-2); }
.news-card .cat { color: var(--red); background: var(--red-bg); border-radius: 4px; padding: 1px 8px; font-size: 12px; }
.news-card .title { font-size: 16px; font-weight: 600; line-height: 1.5; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .excerpt { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.news-card .date { font-family: var(--en); }

/* ---------- Lab 区（3 图 + 文案） ---------- */
.lab-grid { display: grid; grid-template-columns: 696px 1fr; gap: 20px; align-items: start; }
.lab-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lab-photos .tall { grid-row: span 2; }
.lab-photo { position: relative; border-radius: 12px; overflow: hidden; background: #F2F3F4; }
.lab-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.lab-photo .tall img { aspect-ratio: auto; height: 100%; }
.lab-photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(transparent, rgba(20, 23, 26, .72)); color: #fff; font-size: 12px; }
.lab-photo .cap b { font-family: var(--en); letter-spacing: .06em; display: block; }
.lab-text { display: flex; flex-direction: column; gap: 18px; }
.lab-text .item { border-left: 2px solid var(--red); padding-left: 16px; }
.lab-text .item h4 { margin: 0 0 4px; font-size: 16px; }
.lab-text .item p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- 数据条 ---------- */
.metric-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric .num { font-family: var(--en); font-size: 34px; font-weight: 700; color: var(--ink); }
.metric .num small { font-size: 16px; color: var(--red); }
.metric .label { font-size: 13px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #fff; padding: 60px 0; text-align: center; }
.cta h2 { font-size: 26px; margin: 0 0 8px; }
.cta p { color: var(--muted-2); margin: 0 0 24px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: #C8CBD0; padding: 52px 0 0; font-size: 13px; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.site-footer h5 { color: #fff; font-size: 13px; margin: 0 0 12px; }
.site-footer a { display: block; padding: 3px 0; color: #C8CBD0; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 40px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; text-align: center; color: var(--muted-2); font-size: 12px; }

/* ---------- 新闻列表页 / 详情页 ---------- */
.page-banner { background: var(--mist); padding: 48px 0; border-bottom: 1px solid var(--line); }
.page-banner .sec-eyebrow { color: var(--red); }
.page-banner h1 { font-size: 30px; margin: 8px 0 4px; }
.page-banner p { color: var(--muted); margin: 0; font-size: 14px; }

.news-list { padding: 40px 0 72px; }
.cat-tabs { display: flex; gap: 10px; margin-bottom: 26px; }
.cat-tabs a { padding: 7px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--paper); }
.cat-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-tabs a:hover:not(.active) { border-color: var(--muted-2); color: var(--ink); }

.article-layout { display: grid; grid-template-columns: minmax(0, 680px) 300px; gap: 56px; padding: 48px 0 72px; align-items: start; justify-content: center; }
.article h1 { font-size: 26px; font-weight: 700; line-height: 1.45; margin: 10px 0 14px; }
.article .meta { display: flex; gap: 6px; align-items: baseline; color: var(--muted); font-size: 13.5px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.article .meta .src { color: var(--ink); font-weight: 600; }
.article .meta .dot { color: var(--muted-2); }
.article .meta .nums { font-family: var(--en); }
.article .content { padding-top: 24px; }
.article .cover { border-radius: 6px; margin: 20px 0 24px; }
.aside-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.aside-card h3 { font-size: 15px; margin: 0 0 12px; }
.aside-card a { display: block; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--line); line-height: 1.5; }
.aside-card a:last-child { border-bottom: none; }
.aside-card a:hover { color: var(--red); }

/* ---------- 检测服务页 ---------- */
.svc-back { margin-bottom: 22px; }
.svc-back a { font-size: 13px; color: var(--muted); }
.svc-back a:hover { color: var(--red); }
.svc-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 分页 ---------- */
.site-pager { display: flex; gap: 8px; margin-top: 32px; align-items: center; }
.site-pager .info { color: var(--muted); font-size: 13px; }
.site-pager a, .site-pager span {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: var(--en);
}
.site-pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.site-pager a:hover { border-color: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-3, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .lab-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .nav-flyout { width: 340px; }
  .flyout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .news-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 13px; }
  .metric-bar { grid-template-columns: repeat(2, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

/* ---------- 富文本正文（排版参考腾讯新闻：17px 正文 / 1.85 行距 / 段距 22px） ---------- */
.article .content p { font-size: 17px; line-height: 1.85; margin: 0 0 22px; color: var(--ink-2); text-align: justify; }
.article .content p:last-child { margin-bottom: 0; }
.article .content strong { color: var(--ink); }
.article .content h2 { font-size: 20px; font-weight: 700; margin: 34px 0 16px; line-height: 1.5; }
.article .content h3 { font-size: 18px; font-weight: 700; margin: 30px 0 14px; line-height: 1.5; }
.article .content h4 { font-size: 16.5px; font-weight: 700; margin: 26px 0 12px; line-height: 1.5; }
.article .content ul, .article .content ol { padding-left: 26px; margin: 0 0 22px; }
.article .content li { font-size: 17px; line-height: 1.85; color: var(--ink-2); margin-bottom: 6px; }
.article .content img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 6px auto 8px; }
.article .content video { display: block; max-width: 100%; border-radius: 6px; margin: 6px auto 8px; }
.article .content audio { width: 100%; margin: 10px 0; }
.article .content figure { margin: 6px 0 24px; }
.article .content figcaption { color: var(--muted-2); font-size: 13px; line-height: 1.6; text-align: center; margin-top: 0; }
.article .content blockquote { border-left: 3px solid var(--red); background: var(--mist); padding: 14px 18px; margin: 0 0 22px; border-radius: 0 8px 8px 0; color: var(--muted); }
.article .content blockquote p { margin: 0; font-size: 15.5px; line-height: 1.8; color: var(--muted); }
.article .content a { color: var(--red); text-decoration: underline; }
.article .content table { width: 100%; border-collapse: collapse; margin: 20px 0 24px; font-size: 14px; }
.article .content th, .article .content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; line-height: 1.6; }
.article .content th { background: var(--mist); font-weight: 600; }
.article .content pre { background: var(--ink); color: #E8EAEC; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.article .content code { background: var(--mist); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article .content pre code { background: none; padding: 0; }
.article .content hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- 留言区 ---------- */
.comments { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line); }
.cmt-title { font-size: 20px; margin: 0 0 20px; }
.cmt-title span { color: var(--muted-2); font-family: var(--en); font-size: 15px; font-weight: 400; }
.cmt-form { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--paper); }
.cmt-form-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.cmt-nick { width: 220px; max-width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 14px; outline: none; }
.cmt-nick:focus { border-color: var(--ink); }
.cmt-tip { color: var(--muted-2); font-size: 12.5px; }
.cmt-textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.7; resize: vertical; outline: none; font-family: inherit; }
.cmt-textarea:focus { border-color: var(--ink); }
.cmt-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.cmt-reply-bar { font-size: 13px; color: var(--muted); }
.cmt-reply-bar b { color: var(--ink); margin: 0 4px 0 8px; }
.cmt-reply-cancel { border: none; background: none; color: var(--red); cursor: pointer; font-size: 13px; margin-left: 8px; }
.cmt-submit { height: 38px; padding: 0 24px; border: none; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; cursor: pointer; }
.cmt-submit:hover { background: #000; }
.cmt-list { list-style: none; margin: 26px 0 0; padding: 0; }
.cmt { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.cmt:last-child { border-bottom: none; }
.cmt-avatar { flex-basis: 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cmt-avatar-sm { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; background: var(--muted-2); }
.cmt-main { flex: 1; min-width: 0; }
.cmt-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cmt-meta b { font-size: 14px; }
.cmt-meta time { color: var(--muted-2); font-size: 12.5px; font-family: var(--en); }
.cmt-replyto { color: var(--red); font-size: 12.5px; }
.cmt-text { margin: 8px 0 0; font-size: 14.5px; line-height: 1.8; color: var(--ink); word-break: break-word; }
.cmt-reply-btn { border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 0 0; }
.cmt-reply-btn:hover { color: var(--red); }
.cmt-replies { margin-top: 10px; }
.cmt-replies summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; user-select: none; }
.cmt-replies summary:hover { color: var(--ink); }
.cmt-replies .cmt-arrow { transition: transform .15s; }
.cmt-replies[open] .cmt-arrow { transform: rotate(90deg); }
.cmt-child-list { list-style: none; margin: 4px 0 0; padding: 0 0 0 6px; border-left: 2px solid var(--line); }
.cmt-child { padding: 12px 0 4px 10px; border-bottom: none; }
.cmt-empty { color: var(--muted-2); font-size: 14px; padding: 14px 0; margin: 0; list-style: none; }
.comments-closed .cmt-empty { padding: 0 0 20px; }

@media (max-width: 640px) {
  .cmt-nick { width: 100%; }
  .cmt-form-head { gap: 6px; }
  .cmt-tip { width: 100%; }
}
