﻿/* ── 新闻模块（参考 TRI 列表/详情布局） ── */

.news-page .page-banner,
.news-detail-page .page-banner {
  margin-bottom: 0;
}

.news-layout {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  min-height: 520px;
  align-items: stretch;
}

/* 左侧分类栏 */
.news-sidebar {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 0 24px;
}

.news-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-cat-item {
  display: block;
  padding: 14px 20px 14px 8px;
  font-size: 0.98em;
  color: #555;
  text-decoration: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}

.news-cat-item:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

.news-cat-item.active {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06);
}

/* 右侧主内容 */
.news-main {
  flex: 1;
  min-width: 0;
  padding: 0 0 0 36px;
}

.news-table-header {
  display: flex;
  align-items: center;
  padding: 0 8px 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  font-size: 0.92em;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.02em;
}

.news-col-date {
  width: 120px;
  flex-shrink: 0;
}

.news-col-content {
  flex: 1;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-row {
  display: flex;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  cursor: pointer;
}

.news-row:hover {
  background: rgba(var(--primary-rgb), 0.04);
}

.news-row-date {
  width: 120px;
  flex-shrink: 0;
  font-size: 0.95em;
  color: #666;
  font-variant-numeric: tabular-nums;
}

.news-row-sep {
  margin: 0 12px 0 0;
  color: #bbb;
  flex-shrink: 0;
}

.news-row-title {
  flex: 1;
  font-size: 1em;
  color: #222;
  line-height: 1.5;
  transition: color 0.15s;
}

.news-row:hover .news-row-title {
  color: var(--primary);
}

.news-empty {
  padding: 48px 8px;
  color: #888;
  text-align: center;
  font-size: 0.98em;
}

/* 分页 */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 36px;
  padding-top: 8px;
}

.news-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #555;
  font-size: 0.92em;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.news-page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.news-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.news-page-btn.disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── 新闻详情 ── */
.news-detail-wrap {
  max-width: 820px;
}

.news-detail-title {
  margin: 0 0 16px;
  font-size: 1.55em;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
}

.news-detail-date {
  font-size: 0.95em;
  color: #888;
  margin-bottom: 28px;
  font-variant-numeric: tabular-nums;
}

.news-detail-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin: 0 0 28px;
  border-radius: 2px;
}

.news-detail-body {
  font-size: 1.02em;
  line-height: 1.85;
  color: #333;
}

.news-detail-body p {
  margin: 0 0 1.1em;
}

.news-detail-body ul,
.news-detail-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

.news-detail-body li {
  margin-bottom: 0.4em;
}

.news-detail-body h3 {
  margin: 1.6em 0 0.7em;
  font-size: 1.15em;
  color: #1a1a1a;
}

.news-back-link {
  display: inline-block;
  margin-top: 36px;
  padding: 10px 22px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #444;
  text-decoration: none;
  font-size: 0.95em;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.news-back-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

/* 响应式 */
@media (max-width: 900px) {
  .news-layout {
    flex-direction: column;
    padding: 24px 16px 60px;
  }

  .news-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 0 12px;
    margin-bottom: 20px;
  }

  .news-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .news-cat-item {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 10px 16px;
  }

  .news-cat-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .news-main {
    padding-left: 0;
  }

  .news-col-date,
  .news-row-date {
    width: 100px;
  }

  .news-detail-title {
    font-size: 1.3em;
  }
}

@media (max-width: 560px) {
  .news-table-header {
    display: none;
  }

  .news-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 4px;
  }

  .news-row-date {
    width: auto;
  }

  .news-row-sep {
    margin-right: 0;
  }

  .news-row-title {
    flex: 1 1 100%;
    padding-left: 0;
  }
}
