/* ============================================
   news.css — 新闻列表页 + 详情页
   ============================================ */

/* —— 新闻列表页 Banner —— */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
  color: #fff;
  text-align: center;
  padding: 140px 20px 60px;
}
.page-banner h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-banner p {
  opacity: .85;
  font-size: .95rem;
}

/* —— 分类Tabs —— */
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.news-tab {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: .88rem;
  color: var(--text);
  background: #f5f6f8;
  transition: all .2s;
}
.news-tab:hover,
.news-tab.active {
  background: var(--primary);
  color: #fff;
}

/* —— 新闻Grid —— */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* —— 新闻卡片 —— */
.news-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.news-card-img {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0f2f5;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.news-card:hover .news-card-img img {
  transform: scale(1.05);
}
.news-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  color: #bbb;
}
.news-top-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  padding: 2px 10px;
  border-radius: 999px;
}
.news-card-body {
  padding: 18px 20px 20px;
}
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-light);
  margin-bottom: 8px;
}
.news-card-category {
  background: rgba(26,86,219,.08);
  color: var(--primary);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: .75rem;
}
.news-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}
.news-card-title a {
  color: var(--text);
}
.news-card-title a:hover {
  color: var(--primary);
}
.news-card-summary {
  font-size: .86rem;
  color: var(--text-light);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--text-light);
}

/* —— 空状态 —— */
.news-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}
.news-empty svg {
  margin-bottom: 16px;
}
.news-empty p {
  font-size: 1rem;
}

/* —— 分页 —— */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-bottom: 20px;
}
.news-pagination .page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: .9rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: all .2s;
}
.news-pagination .page-btn:hover {
  background: var(--primary);
  color: #fff;
}
.news-pagination .page-info {
  font-size: .88rem;
  color: var(--text-light);
}

/* —— 详情页 Banner —— */
.news-detail-banner {
  padding: 140px 20px 48px;
  text-align: left;
}
.news-detail-banner h1 {
  font-size: 1.6rem;
  margin: 12px 0 14px;
  line-height: 1.4;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  transition: color .2s;
}
.back-link:hover { color: #fff; }
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}

/* —— 详情正文 —— */
.news-detail {
  padding-top: 48px;
  padding-bottom: 60px;
}
.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.news-detail-cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}
.news-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
}
.news-content {
  font-size: 1rem;
  line-height: 1.85;
  color: #333;
}
.news-content h2,
.news-content h3 {
  margin: 28px 0 14px;
  color: #111;
}
.news-content p {
  margin-bottom: 16px;
}
.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}
.news-content ul,
.news-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.news-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(26,86,219,.04);
  border-radius: 0 8px 8px 0;
  color: var(--text-light);
}

/* —— 相关推荐 —— */
.news-related {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.news-related h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}
.news-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 600px) {
  .news-related-grid { grid-template-columns: 1fr; }
}
.news-related-card {
  display: block;
  padding: 14px 18px;
  border-radius: 10px;
  background: #f5f6f8;
  transition: background .2s;
}
.news-related-card:hover { background: rgba(26,86,219,.08); }
.news-related-title {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.news-related-date {
  font-size: .78rem;
  color: var(--text-light);
}
