/* =============================================================
 * 资讯页面 专用样式（/pc/news.html + /pc/news-detail.html）
 * 左右分栏布局 + 侧栏部件
 * ============================================================= */

/* ---- 资讯页左右分栏 ---- */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  margin-top: 4px;
}
.news-layout__main { min-width: 0; }
.news-layout__side { display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 960px) {
  .news-layout { grid-template-columns: 1fr; gap: 24px; }
  .news-layout__side { order: -1; }
}

/* ---- 资讯详情页左右分栏 ---- */
.news-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  margin-top: 10px;
}
.news-detail-layout__main { min-width: 0; }
.news-detail-layout__side { display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 960px) {
  .news-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .news-detail-layout__side { order: -1; }
}

/* ---- 侧栏通用部件 ---- */
.news-sidebar .widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow: hidden;
}
.news-sidebar .widget__h {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gov-red);
  display: flex;
  align-items: center;
  gap: 6px;
}
.news-sidebar .widget__h::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--gov-red);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- 热门排行（样式已统一到 pc.css .rank .num，此处避免重复编号） ---- */
.rank { list-style: none; padding: 0; margin: 0; }
.rank li {
  padding: 8px 0;
  font-size: 13.5px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.rank li:last-child { border-bottom: none; }
.rank a {
  color: var(--ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rank a:hover { color: var(--primary); }

/* ---- 区域分类标签 ---- */
.news-sidebar .region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.news-sidebar .region-tags a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  background: var(--surface);
  text-decoration: none;
  transition: .15s;
}
.news-sidebar .region-tags a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--brand-tint);
}

/* ---- 分类导航 ---- */
.news-sidebar .cat-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.news-sidebar .cat-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: .15s;
}
.news-sidebar .cat-links a:last-child { border-bottom: none; }
.news-sidebar .cat-links a:hover { color: var(--primary); padding-left: 4px; }
.news-sidebar .cat-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

/* ---- 详情页相关文章 ---- */
.news-detail-sidebar .related-mini {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-detail-sidebar .related-mini a {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.news-detail-sidebar .related-mini a:last-child { border-bottom: none; }
.related-mini__thumb {
  width: 60px;
  height: 45px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--brand-tint);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  overflow: hidden;
}
.related-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-mini__info { flex: 1; min-width: 0; }
.related-mini__title {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-mini__meta {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 3px;
}

/* ---- 详情页文章封面 ---- */
.article__cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 0 22px;
  background: var(--muted);
}

/* ---- 加载失败提示 ---- */
.news-detail-err {
  padding: 56px 16px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 15px;
}

/* ---- 详情页正文图片 ---- */
.article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
/* ---- 骨架屏（JS 加载前占位） ---- */
.post--skeleton { pointer-events: none; }
.post--skeleton .post__cat, .post--skeleton .post__title, .post--skeleton .post__excerpt, .post--skeleton .post__meta, .post--skeleton .post__thumb { background: linear-gradient(90deg, var(--muted, #f0ece6) 25%, var(--border, #e5ddd3) 50%, var(--muted, #f0ece6) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease infinite; border-radius: 4px; }
.post--skeleton .post__cat { display: inline-block; width: 80px; height: 14px; }
.post--skeleton .post__title { display: block; width: 90%; height: 22px; margin: 8px 0; }
.post--skeleton .post__excerpt { display: block; width: 70%; height: 14px; }
.post--skeleton .post__meta { display: block; width: 50%; height: 12px; margin-top: 10px; }
.post--skeleton .post__thumb { width: 120px; height: 80px; flex: none; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
