/* ============================================================
 * GTG 广测集团 - 认证资讯（news.html / news-detail.html）专属样式
 * 依赖 certification.css 的子页基础模块（Banner / 锚点导航 / 区块 / dt-side / FAQ）
 * ============================================================ */

/* ---------- 资讯卡片（列表页） ---------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.news-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease, border-color .35s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 155, 76, .35);
  box-shadow: 0 18px 40px rgba(0, 90, 45, .1);
}
.news-card.hide { display: none; }

/* 左：日期块 */
.nw-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: var(--bg-light);
  border-radius: 12px;
  transition: background .3s ease;
}
.news-card:hover .nw-date { background: rgba(0, 155, 76, .1); }
.nw-date b {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--green);
}
.nw-date i {
  margin-top: 5px;
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--text-light);
}

/* 中：分类 + 标题 + 摘要 */
.nw-body { flex: 1; min-width: 0; }
.nw-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  background: rgba(0, 155, 76, .1);
  color: var(--green);
}
.nw-cat-company { background: rgba(21, 127, 151, .1); color: #157f97; }
.nw-cat-faq { background: rgba(220, 140, 20, .12); color: #c8871a; }
.nw-body > b {
  display: block;
  margin-top: 8px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .5px;
  transition: color .25s ease;
}
.news-card:hover .nw-body > b { color: var(--green); }
.nw-body > i {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .cert-go { flex-shrink: 0; margin-top: 0; }

/* ---------- 详情页：文章排版 ---------- */
.nw-article { min-width: 0; }
.nw-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.nw-head h1 {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .5px;
}
.nw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: .5px;
  color: var(--text-light);
}
.nw-meta span { display: inline-flex; align-items: center; gap: 6px; }
.nw-meta .icon { width: 14px; font-size: 14px; height: 14px; color: var(--green); }

.nw-content p {
  font-size: 14.5px;
  line-height: 2.1;
  letter-spacing: .5px;
  color: var(--text);
}
.nw-content p + p { margin-top: 10px; }
.nw-content .nw-lead {
  font-size: 15.5px;
  font-weight: 600;
  padding: 18px 22px;
  background: var(--bg-light);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
}
.nw-content p b { color: var(--green-dark); }
.nw-content h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 16px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
}
.nw-content h3 span {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

/* 上一篇 / 下一篇 */
.nw-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 48px;
}
.nw-pn-item {
  display: block;
  padding: 18px 22px;
  background: var(--bg-light);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: all .25s ease;
}
.nw-pn-item span {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-light);
}
.nw-pn-item b {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .25s ease;
}
.nw-pn-next { text-align: right; }
.nw-pn-item:hover {
  border-color: rgba(0, 155, 76, .35);
  background: rgba(0, 155, 76, .05);
}
.nw-pn-item:hover b { color: var(--green); }

/* 侧栏最新资讯：日期小字 */
.nw-rel a { flex-wrap: wrap; }
.nw-rel a i {
  flex-basis: 100%;
  margin-top: 3px;
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--text-light);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .news-card { gap: 16px; padding: 18px 16px; }
  .nw-date { width: 60px; height: 60px; }
  .nw-date b { font-size: 20px; }
  .news-card .cert-go { display: none; }
  .nw-head h1 { font-size: 21px; }
  .nw-pn { grid-template-columns: 1fr; }
  .nw-pn-next { text-align: left; }
}

/* ============================================================
 * 资讯页 v2：列表标题栏去横线 / 缩略图卡片 / 详情页分享区
 * ============================================================ */

/* 列表标题栏：不要底部横线 */
.wall-head:has(+ .news-list),
.wall-head:has(#newsSearchForm) { border-bottom: none; padding-bottom: 0; }

/* ---------- 缩略图资讯卡 ---------- */
.news-card { gap: 22px; padding: 16px; }
.nw-thumb {
  flex-shrink: 0;
  width: 208px;
  aspect-ratio: 8 / 5;
  border-radius: 10px;
  overflow: hidden;
}
.nw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.22, .61, .36, 1);
}
.news-card:hover .nw-thumb img { transform: scale(1.06); }
.nw-body > b { margin-top: 7px; }
.nw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.nw-foot .nw-d {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-light);
}
.nw-foot .cert-go { margin-top: 0; }

/* ---------- 详情页：分享区（发布时间栏右侧） ---------- */
.nw-meta { justify-content: flex-start; }
.nw-share { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nw-share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  font-size: 12.5px;
  letter-spacing: .5px;
  color: var(--text-light);
  cursor: pointer;
  transition: all .25s ease;
}
.nw-share-btn .icon { width: 13px; font-size: 13px; height: 13px; }
.nw-share-btn:hover {
  border-color: var(--green);
  color: var(--green);
}
.nw-share-btn.copied {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.nw-social-icon { width: 14px; height: 14px; flex: 0 0 14px; }
.nw-share-btn { white-space: nowrap; }
.nw-share-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* 复制成功：全站提示条 */
.copy-toast {
  position: fixed;
  top: calc(var(--header-total) + 24px);
  left: 50%;
  z-index: 300;
  transform: translateX(-50%) translateY(-12px);
  padding: 12px 26px;
  background: rgba(15, 25, 20, .88);
  border-radius: 24px;
  font-size: 13.5px;
  letter-spacing: 1px;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .3s;
}
.copy-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
}

@media (max-width: 768px) {
  .news-card { gap: 14px; padding: 14px; }
  .nw-thumb { width: 128px; }
  .nw-body > b { font-size: 15px; }
  .nw-body > i { -webkit-line-clamp: 2; }
  .nw-foot .cert-go { display: none; }
  .nw-share { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 480px) {
  .news-card { flex-direction: column; align-items: stretch; }
  .nw-thumb { width: 100%; }
}

.nw-thumb > picture { display: block; width: 100%; height: 100%; }

/* Match other detail pages while keeping the inquiry below article navigation. */
.nw-inquiry { margin-top: 48px; }
@media (max-width: 768px) { .nw-inquiry { margin-top: 32px; } }

/* 正文锚点为固定导航留出位置。 */
#article{scroll-margin-top:calc(var(--header-total) + 24px)}

/* 新闻详情手机返回按钮与产品详情保持相同的左右留白。 */
@media (max-width: 768px) {
  .dt-back.nw-back { padding-left: 20px; padding-right: 20px; }
}

/* 最新资讯仅限制标题行数，日期和完整链接保留。 */
.nw-rel-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  flex: 0 0 100%;
  min-width: 0;
  max-height: 3.2em;
  line-height: 1.6;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.nw-social-help { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-light); text-align: right; }
@media (max-width: 768px) { .nw-social-help { text-align: left; } }
