/* ============================================================
   NEWS · 资讯模板样式
   类名统一 ns- 前缀，避免与全局样式冲突
   ============================================================ */

.ns-home {
  --ns-primary: #1d4ed8;
  --ns-accent: #e8590c;
  --ns-text: #1f2937;
  --ns-muted: #6b7280;
  --ns-border: #e5e7eb;
  --ns-bg: #f6f8fb;
  color: var(--ns-text);
}

/* ---------- 首页刊头 ---------- */
.ns-hero {
  background: linear-gradient(135deg, var(--ns-primary) 0%, color-mix(in srgb, var(--ns-primary) 70%, #0ea5e9) 100%);
  color: #fff;
  padding: 56px 0 48px;
}
.ns-hero-kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  opacity: .85;
  margin-bottom: 12px;
}
.ns-hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.ns-hero-desc {
  font-size: 16px;
  line-height: 1.8;
  opacity: .92;
  max-width: 620px;
  margin: 0 0 22px;
}

.ns-search {
  position: relative;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.ns-search i {
  color: var(--ns-muted);
  margin-right: 8px;
}
.ns-search input {
  flex: 1;
  border: 0;
  outline: 0;
  height: 40px;
  font-size: 15px;
  background: transparent;
}
.ns-search button {
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--ns-primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- 栏目导航 ---------- */
.ns-cats {
  border-bottom: 1px solid var(--ns-border);
  background: #fff;
}
.ns-cats .container,
.ns-cats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ns-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--ns-text);
  border-bottom: 2px solid transparent;
}
.ns-cat em {
  font-style: normal;
  font-size: 12px;
  color: var(--ns-muted);
}
.ns-cat.on {
  color: var(--ns-primary);
  border-bottom-color: var(--ns-primary);
  font-weight: 600;
}
.ns-cats-inline {
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.ns-cats-inline .ns-cat {
  border: 1px solid var(--ns-border);
  border-radius: 999px;
  padding: 7px 15px;
}
.ns-cats-inline .ns-cat.on {
  background: var(--ns-primary);
  border-color: var(--ns-primary);
  color: #fff;
}
.ns-cats-inline .ns-cat.on em { color: rgba(255,255,255,.85); }

/* ---------- 布局 ---------- */
.ns-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px 0 48px;
}
.ns-layout.has-side {
  grid-template-columns: 1fr 320px;
}
.ns-main { min-width: 0; }
.ns-side { min-width: 0; }

/* ---------- 头条 ---------- */
.ns-lead {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--ns-border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}
.ns-lead-cover { position: relative; min-height: 280px; }
.ns-lead-cover img,
.ns-lead-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.ns-lead-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 56px;
  font-weight: 800;
}
.ns-lead-body {
  padding: 30px 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ns-lead-body h2 {
  font-size: 24px;
  line-height: 1.4;
  margin: 10px 0 12px;
}
.ns-lead-body h2 a { color: inherit; }
.ns-lead-body p {
  color: var(--ns-muted);
  line-height: 1.8;
  margin: 0 0 16px;
}

/* ---------- 区块标题 ---------- */
.ns-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ns-section-head h2 {
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ns-section-head h2 i { color: var(--ns-primary); }
.ns-more {
  font-size: 14px;
  color: var(--ns-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 文章列表 ---------- */
.ns-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ns-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--ns-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.ns-item:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .1);
  transform: translateY(-2px);
}
.ns-item-cover {
  position: relative;
  min-height: 150px;
  display: block;
}
.ns-item-cover img,
.ns-item-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.ns-item-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}
.ns-item-main {
  padding: 20px 22px 18px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.ns-item-main h3 {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.ns-item-main h3 a { color: var(--ns-text); }
.ns-item-main h3 a:hover { color: var(--ns-primary); }
.ns-item-main p {
  color: var(--ns-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ns-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ns-muted);
}
.ns-meta i { margin-right: 4px; }
.ns-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ns-primary) 10%, #fff);
  color: var(--ns-primary);
  font-size: 12px;
}

/* ---------- 侧栏 ---------- */
.ns-side-card {
  background: #fff;
  border: 1px solid var(--ns-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 22px;
}
.ns-side-card h3 {
  font-size: 16px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ns-side-card h3 i { color: var(--ns-primary); }

.ns-hot {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--ns-border);
}
.ns-hot:last-child { border-bottom: 0; }
.ns-hot-no {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ns-bg);
  color: var(--ns-muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ns-hot-no.top { background: var(--ns-accent); color: #fff; }
.ns-hot-main { min-width: 0; }
.ns-hot-main strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ns-text);
  margin-bottom: 4px;
}
.ns-hot-main strong:hover { color: var(--ns-primary); }
.ns-hot-main em {
  font-style: normal;
  font-size: 12px;
  color: var(--ns-muted);
}

.ns-notice {
  display: block;
  padding: 10px 0;
  border-bottom: 1px dashed var(--ns-border);
}
.ns-notice:last-child { border-bottom: 0; }
.ns-notice strong {
  display: block;
  font-size: 14px;
  color: var(--ns-text);
  margin-bottom: 4px;
}
.ns-notice em { font-style: normal; font-size: 12px; color: var(--ns-muted); }
.ns-side-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ns-primary);
}
.ns-side-tip p {
  font-size: 13px;
  color: var(--ns-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.ns-empty, .ns-empty-line {
  text-align: center;
  color: var(--ns-muted);
  padding: 40px 0;
}
.ns-empty i { font-size: 40px; margin-bottom: 10px; }
.ns-empty-line { padding: 10px 0; font-size: 13px; }

/* ---------- 二级页头 ---------- */
.ns-page-head {
  background: var(--ns-bg);
  border-bottom: 1px solid var(--ns-border);
  padding: 34px 0 28px;
}
.ns-page-head h1 { font-size: 28px; margin: 8px 0 6px; }
.ns-page-head p { color: var(--ns-muted); margin: 0 0 18px; }
.ns-page-head .ns-search { max-width: 420px; box-shadow: none; border: 1px solid var(--ns-border); }

/* ---------- 三级详情 ---------- */
.ns-detail {
  background: #fff;
  border: 1px solid var(--ns-border);
  border-radius: 18px;
  padding: 34px 36px;
}
.ns-crumb { margin-bottom: 18px; font-size: 14px; }
.ns-detail h1 {
  font-size: 30px;
  line-height: 1.4;
  margin: 0 0 16px;
}
.ns-detail .ns-meta { margin-bottom: 22px; }
.ns-detail-cover {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
}
.ns-detail-cover img { width: 100%; height: auto; display: block; }
.ns-detail-summary {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ns-muted);
  background: var(--ns-bg);
  border-left: 3px solid var(--ns-primary);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin-bottom: 22px;
}

.ns-cite {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--ns-bg);
  border: 1px solid var(--ns-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.ns-cite-main { flex: 1; min-width: 0; }
.ns-cite-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ns-primary);
  margin-bottom: 8px;
}
.ns-cite-main p { margin: 0 0 6px; line-height: 1.7; color: var(--ns-text); }
.ns-cite-main em { font-style: normal; font-size: 12px; color: var(--ns-muted); }
.ns-cite-copy {
  flex: 0 0 auto;
  border: 1px solid var(--ns-border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ns-text);
}

.ns-detail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--ns-border);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .ns-layout.has-side { grid-template-columns: 1fr; }
  .ns-side { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .ns-hero { padding: 36px 0 30px; }
  .ns-hero h1 { font-size: 26px; }
  .ns-lead { grid-template-columns: 1fr; }
  .ns-lead-cover { min-height: 200px; }
  .ns-item { grid-template-columns: 1fr; }
  .ns-item-cover { min-height: 180px; }
  .ns-item-main { padding: 16px 18px; }
  .ns-side { grid-template-columns: 1fr; }
  .ns-detail { padding: 22px 18px; }
  .ns-detail h1 { font-size: 23px; }
}
