/* 资讯列表 & 详情 */
body.site-nav-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.site-nav-page > .news-page-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.news-page-main {
  max-width: var(--container);
  margin: 24px auto 48px;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.news-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.news-page-title.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.news-page-count {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* 列表布局：右侧热门阅读固定在顶部 */
.news-list-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  flex: 1;
}

.news-list-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.news-list-col .news-feed,
.news-list-col .news-empty {
  flex: 0 0 auto;
}

.news-list-col .news-pagination {
  margin-top: auto;
  padding-top: 28px;
}

/* 资讯 feed */
.news-feed {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.news-feed-item {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.news-feed-item:last-child {
  border-bottom: none;
}

.news-feed-item:hover {
  background: #fafafa;
}

.news-feed-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.news-feed-thumb {
  position: relative;
  z-index: 2;
  width: 168px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-gray, #f5f5f5);
}

.news-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-feed-item:hover .news-feed-thumb img {
  transform: scale(1.04);
}

.news-feed-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.news-feed-body a {
  pointer-events: auto;
}

.news-feed-date {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.news-feed-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 10px;
}

.news-feed-title a {
  color: var(--text);
  transition: color 0.2s;
}

.news-feed-title a:hover {
  color: var(--primary);
}

.news-feed-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-feed-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.news-feed-meta-dot {
  opacity: 0.5;
}

/* 侧栏：热门阅读固定在右侧顶部，滚动时跟随视口 */
.news-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  width: 100%;
}

.news-sidebar .sidebar-block {
  width: 100%;
}

.sidebar-block {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 16px;
  background: #fff;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-left: 12px;
  position: relative;
}

.sidebar-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--primary);
  border-radius: 1px;
}

.hot-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hot-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.hot-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hot-list li:first-child {
  padding-top: 0;
}

.hot-list a {
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.hot-list a:hover {
  color: var(--primary);
}

.hot-list .num {
  display: inline-block;
  width: 18px;
  color: var(--primary);
  font-weight: 700;
  margin-right: 4px;
}

/* 分页 */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 8px;
  white-space: nowrap;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 14px;
  user-select: none;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.news-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: #fff;
}

/* ========== 详情页 ========== */
.news-detail-main {
  max-width: 800px;
  margin: 24px auto 80px;
  padding: 0 16px;
}

.news-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.news-breadcrumb a {
  color: var(--text-muted);
}

.news-breadcrumb a:hover {
  color: var(--primary);
}

.news-breadcrumb span {
  margin: 0 8px;
}

.article-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-cat {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 12px;
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-cover {
  margin-bottom: 28px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1.2em;
  text-indent: 2em;
}

.article-tags {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.article-tags span.label {
  font-size: 13px;
  color: var(--text-muted);
}

.tag-item {
  padding: 4px 12px;
  background: var(--bg-gray);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.article-nav {
  max-width: var(--container);
  margin: 0 auto 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.article-nav a {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s;
}

.article-nav a:hover {
  border-color: var(--primary);
}

.article-nav .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.article-nav .title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-nav .next {
  text-align: right;
}

.not-found {
  text-align: center;
  padding: 80px 20px;
}

.not-found h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.not-found a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 992px) {
  .news-list-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .news-sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .news-feed-item {
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
  }

  .news-feed-thumb {
    width: 100%;
    height: 180px;
  }

  .news-feed-title {
    font-size: 17px;
  }
}

@media (max-width: 576px) {
  .article-title {
    font-size: 24px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav .next {
    text-align: left;
  }
}
