/* ═══════════════════════════════════════════════════════════
   行业资讯频道（news.html / news-article.html）
   数据来自 /api/public/news*，文章存数据库，发布无需发版。
   封面为 6 款 CSS 渐变主题（.cov-1..6），与 web-admin 编辑器的
   色板一一对应，不使用图片。
   ═══════════════════════════════════════════════════════════ */

/* ── 封面主题（与 web-admin NewsEdit.vue 的 coverOptions 同步）── */
.cov-1 { background: linear-gradient(135deg, #2f5fe0, #5b8cff); }
.cov-2 { background: linear-gradient(135deg, #0e9f6e, #34d399); }
.cov-3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.cov-4 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.cov-5 { background: linear-gradient(135deg, #be3455, #fb7185); }
.cov-6 { background: linear-gradient(135deg, #0f766e, #2dd4bf); }

/* ── 列表页 Hero ── */
.news-hero {
  background: linear-gradient(180deg, var(--brand-soft), #fff);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
.news-hero h1 {
  font-size: 34px;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
  color: var(--ink);
}
.news-hero .sub {
  color: var(--text);
  font-size: 16px;
  max-width: 640px;
  line-height: 1.7;
  margin: 0;
}

/* ── 检索条：分类 chips + 月份 + 关键词，一屏完成定位 ── */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.news-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}
.news-chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.news-chip:hover { border-color: var(--brand); color: var(--brand); }
.news-chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.news-chip .n { opacity: 0.65; font-size: 12px; margin-left: 3px; }
.news-select,
.news-search {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.news-select:focus,
.news-search:focus { border-color: var(--brand); }
.news-search { width: 220px; }
.news-reset {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 4px;
}
.news-reset:hover { color: var(--brand); }

/* ── 文章卡片栅格 ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding-bottom: 12px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.news-card .cover {
  position: relative;
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
}
.news-card .cover::after {
  /* 装饰性大字，让无图封面也有视觉重心 */
  content: "「」";
  position: absolute;
  right: 10px;
  top: 2px;
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.16);
  font-family: Georgia, serif;
}
.news-card .cover .cat {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
}
.news-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.news-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.news-card .meta .more { color: var(--brand); font-weight: 600; }

/* ── 分页 / 空态 / 加载 ── */
.news-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 34px 0 56px;
}
.news-pager button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.news-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.news-pager button:not(:disabled):hover { border-color: var(--brand); color: var(--brand); }
.news-pager .info { color: var(--muted); font-size: 13px; }
.news-empty, .news-loading {
  text-align: center;
  color: var(--muted);
  padding: 90px 0 110px;
  font-size: 15px;
  line-height: 2;
}
.news-error { color: var(--danger); }

/* ── 详情页 ── */
.na-cover {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.na-cover::after {
  content: "「」";
  position: absolute;
  right: 4%;
  top: -30px;
  font-size: 200px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.14);
  font-family: Georgia, serif;
}
.na-cover .inner { padding: 64px 0 36px; position: relative; z-index: 1; }
.na-cover .cat {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.na-cover h1 {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -0.3px;
  max-width: 760px;
}
.na-cover .meta { font-size: 13.5px; opacity: 0.9; display: flex; gap: 16px; flex-wrap: wrap; }
.na-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
}
.na-crumb:hover { color: var(--brand); }
.na-summary {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 18px 0 34px;
}
.na-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.9;
  color: #2b3345;
  padding-bottom: 20px;
}
.na-body h1, .na-body h2, .na-body h3 {
  color: var(--ink);
  line-height: 1.4;
  margin: 1.8em 0 0.7em;
}
.na-body h2 { font-size: 23px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.na-body h3 { font-size: 18px; }
.na-body p { margin: 1em 0; }
.na-body ul, .na-body ol { padding-left: 1.5em; margin: 1em 0; }
.na-body li { margin: 0.35em 0; }
.na-body a { color: var(--brand); }
.na-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}
.na-body table { border-collapse: collapse; margin: 1.2em 0; width: 100%; font-size: 14.5px; }
.na-body th, .na-body td { border: 1px solid var(--line); padding: 8px 14px; text-align: left; }
.na-body th { background: var(--bg); }
.na-body code {
  background: var(--bg);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.88em;
}
.na-body pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px; overflow: auto; }
.na-body pre code { background: none; padding: 0; }
.na-body img { max-width: 100%; border-radius: 10px; }

/* ── 详情页尾：相关阅读 + CTA（引导性收口）── */
.na-related { max-width: 760px; margin: 26px auto 0; }
.na-related h2 { font-size: 18px; color: var(--ink); margin: 0 0 14px; }
.na-related a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
}
.na-related a:hover { color: var(--brand); }
.na-related a .d { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.na-cta {
  max-width: 760px;
  margin: 44px auto 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  border-radius: 16px;
  padding: 30px 32px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.na-cta h2 { margin: 0 0 6px; font-size: 19px; }
.na-cta p { margin: 0; font-size: 14px; opacity: 0.88; }
.na-cta .btn { background: #fff; color: var(--brand); }
.na-cta .btn:hover { opacity: 0.92; }

@media (max-width: 640px) {
  .news-hero h1 { font-size: 26px; }
  .news-search { width: 100%; }
  .na-cover h1 { font-size: 23px; }
  .na-cover { min-height: 240px; }
}
