/* 文件描述：品牌动态新闻详情页样式 */

.nws-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.nws-back:hover {
  color: var(--primary);
}

.nws-back-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: none;
  transform: none;
  background: url('/static/skin/images/news/icon_back.svg') center / contain no-repeat;
  flex-shrink: 0;
}

.nws-article-title {
  margin: 0 0 12px;
  font-size: clamp(22px, calc(100vw * 28 / 1440), 28px);
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.35;
}

/* 标题下元信息行：栏目标签 + 发布时间 */
.nws-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 clamp(24px, calc(100vw * 32 / 1440), 32px);
  padding-bottom: clamp(16px, calc(100vw * 20 / 1440), 20px);
  border-bottom: 1px solid var(--slate-200);
}

.nws-article-cate {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--blue-bg);
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--primary);
  line-height: 1.6;
}

.nws-article-time {
  font-size: var(--fs-14);
  color: #9aa3b2;
}

.nws-article-body {
  font-size: var(--fs-16);
  color: var(--on-surface);
  line-height: 1.85;
  word-break: break-word;
}

/* 导语：正文首段略大略深，对齐参考页标题下引导句 */
.nws-article-body > p:first-child {
  margin-bottom: 1.4em;
  font-size: clamp(16px, calc(100vw * 18 / 1440), 18px);
  font-weight: 500;
  color: var(--on-surface);
}

.nws-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r8);
  margin: 8px auto;
}

.nws-article-body p {
  margin: 0 0 1em;
}

.nws-article-body a {
  color: var(--primary);
  text-decoration: underline;
}

/* ── 正文标题层级（CMS 富文本 h2~h5 / #####） ── */
.nws-article-body h2,
.nws-article-body h3,
.nws-article-body h4,
.nws-article-body h5,
.nws-article-body h6 {
  margin: 1.8em 0 0.8em;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.4;
}

.nws-article-body h2 {
  font-size: clamp(20px, calc(100vw * 24 / 1440), 24px);
}

.nws-article-body h3 {
  font-size: clamp(18px, calc(100vw * 22 / 1440), 22px);
}

/* h4/h5 小标题：左侧主题色竖条，对齐参考页 ##### 分节标题 */
.nws-article-body h4,
.nws-article-body h5,
.nws-article-body h6 {
  position: relative;
  padding-left: 12px;
  font-size: clamp(16px, calc(100vw * 18 / 1440), 18px);
}

.nws-article-body h4::before,
.nws-article-body h5::before,
.nws-article-body h6::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
}

/* ── 正文列表 ── */
.nws-article-body ul,
.nws-article-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.nws-article-body li {
  margin: 0.4em 0;
  line-height: 1.8;
}

.nws-article-body ul li::marker {
  color: var(--primary);
}

/* ── 强调与引用 ── */
.nws-article-body strong,
.nws-article-body b {
  font-weight: 700;
  color: var(--on-surface);
}

.nws-article-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--primary);
  background: var(--blue-bg);
  border-radius: 0 var(--r8) var(--r8) 0;
  color: var(--on-surface-variant);
}

.nws-article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* ── 分隔线 ── */
.nws-article-body hr {
  margin: 1.8em 0;
  border: 0;
  border-top: 1px solid var(--slate-200);
}

/* ── 表格 ── */
.nws-article-body table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: var(--fs-14);
}

.nws-article-body th,
.nws-article-body td {
  padding: 10px 14px;
  border: 1px solid var(--slate-200);
  text-align: left;
  line-height: 1.6;
}

.nws-article-body th {
  background: var(--blue-bg);
  font-weight: 600;
  color: var(--on-surface);
}

.nws-article-body tr:nth-child(even) td {
  background: var(--slate-50);
}

/* ── 代码段（行内 code / 块级 pre，兼容 UEditor insertcode 的 brush） ── */
.nws-article-body code {
  padding: 1px 6px;
  font-family: Consolas, "Courier New", Monaco, monospace;
  font-size: 0.92em;
  color: var(--on-surface);
  background: var(--blue-bg);
  border: 1px solid var(--slate-200);
  border-radius: var(--r8);
  word-break: break-word;
}

.nws-article-body pre,
.nws-article-body pre[class*="brush"] {
  margin: 1.2em 0;
  padding: 12px 16px;
  overflow-x: auto;
  font-family: Consolas, "Courier New", Monaco, monospace;
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--on-surface);
  background: #f5f7fb;
  border: 1px solid var(--slate-200);
  border-radius: var(--r8);
  white-space: pre;
  word-wrap: normal;
}

.nws-article-body pre > code {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
  word-break: normal;
}

/* SyntaxHighlighter 高亮后容器与正文间距 */
.nws-article-body .syntaxhighlighter {
  margin: 1.2em 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  border: 1px solid var(--slate-200) !important;
  border-radius: var(--r8);
  background: #f5f7fb !important;
}

.nws-turn {
  margin-top: clamp(32px, calc(100vw * 48 / 1440), 48px);
  padding-top: clamp(20px, calc(100vw * 28 / 1440), 28px);
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nws-turn-item {
  font-size: var(--fs-14);
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.nws-turn-item a {
  color: var(--primary);
  font-weight: 500;
}

.nws-turn-item a:hover {
  text-decoration: underline;
}
