/* 新闻中心页面样式 */
.news-page {
  padding: 3rem 0 4rem;
  background-color: #fff;
}

/* 页面标题：居中 + 装饰下划线 */
.page-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.page-header h1 {
  display: inline-block;
  font-size: 2.2rem;
  color: #000;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.75rem;
  position: relative;
}

.page-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #002fff, #1e5aa8);
  border-radius: 2px;
}

.page-header .subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #888;
}

/* 分类筛选：水平标签 */
.news-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.news-filter a {
  position: relative;
  font-size: 0.95rem;
  color: #666;
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  transition: color 0.3s ease;
}

.news-filter a:hover {
  color: #002fff;
}

.news-filter a.active {
  color: #002fff;
  font-weight: 500;
}

.news-filter a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #002fff;
  border-radius: 1px;
}

/* 主布局：左侧大图 + 右侧列表 */
.news-featured-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.featured-news {
  flex: 0 0 45%;
  max-width: 520px;
}

.featured-news .featured-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.featured-news .featured-image {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 */
  background: #f4f4f4;
  border-radius: 4px;
  overflow: hidden;
}

.featured-news .featured-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-news .featured-link:hover .featured-image img {
  transform: scale(1.04);
}

.featured-news .featured-title {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.featured-news .featured-link:hover .featured-title {
  color: #002fff;
}

.featured-news .featured-date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #999;
}

/* 右侧紧凑列表 */
.news-list-compact {
  flex: 1;
  min-width: 0;
}

.news-list-compact .news-item-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.25s ease;
}

.news-list-compact .news-item-row:hover {
  background-color: #fafbff;
}

.news-list-compact .news-bullet {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: background-color 0.25s ease;
}

.news-list-compact .news-item-row:hover .news-bullet {
  background: #002fff;
}

.news-list-compact .news-title {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.news-list-compact .news-title:hover {
  color: #002fff;
}

.news-list-compact .news-date {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: #aaa;
  white-space: nowrap;
}

.news-list-compact .empty-tip {
  padding: 2rem 0;
  text-align: center;
  color: #999;
}

/* 分页 */
.pagination {
  margin-top: 2rem;
  text-align: center;
}

.pagination ul {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.pagination li {
  margin: 0;
}

.pagination a {
  display: block;
  padding: 0.7rem 1.1rem;
  color: #666;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  background: #fff;
}

.pagination a:hover {
  background-color: rgba(0, 47, 255, 0.08);
  color: #002fff;
  border-color: #002fff;
}

.pagination li.active a {
  background-color: #002fff;
  color: #fff;
  border-color: #002fff;
}

.pagination span {
  display: block;
  padding: 0.7rem 1.1rem;
  color: #999;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #fff;
}

/* 空状态 */
.news-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
}

/* 新闻详情页面样式 */
.news-detail-page {
  padding: 3rem 0;
  background-color: #f9f9f9;
}

.news-detail-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-article {
  margin-bottom: 2rem;
}

.news-article h2 {
  font-size: 1.8rem;
  color: #000;
  margin: 0 0 1rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.article-meta {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.article-meta span {
  color: #666;
  font-size: 0.9rem;
  margin-right: 1.5rem;
}

.article-body {
  margin-bottom: 2rem;
}

.article-body p {
  margin: 0 0 1.5rem 0;
  color: #333;
  line-height: 1.8;
  text-align: justify;
}

.article-navigation {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid #e0e0e0;
}

.prev-article, .next-article {
  flex: 1;
}

.prev-article {
  margin-right: 1rem;
}

.next-article {
  margin-left: 1rem;
  text-align: right;
}

.article-navigation span {
  color: #999;
  font-size: 0.9rem;
}

.article-navigation a {
  color: #002fff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-navigation a:hover {
  text-decoration: underline;
}

.related-news {
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.related-news h3 {
  font-size: 1.2rem;
  color: #000;
  margin: 0 0 1rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #002fff;
}

.related-news ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-news li {
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed #e0e0e0;
}

.related-news li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-news a {
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 0.5rem 0;
}

.related-news a:hover {
  color: #002fff;
  transform: translateX(5px);
}

/* 媒体查询 - 平板设备 */
@media (max-width: 992px) {
  .news-featured-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .featured-news {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .featured-news .featured-image {
    padding-top: 56.25%; /* 16:9 */
  }

  .news-list-compact {
    width: 100%;
  }
}

/* 媒体查询 - 大型手机 */
@media (max-width: 768px) {
  .news-page,
  .news-detail-page {
    padding: 2rem 0;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .news-filter {
    gap: 0.4rem 1rem;
  }

  .news-list-compact .news-item-row {
    padding: 0.85rem 0;
    gap: 0.7rem;
  }

  .news-list-compact .news-title {
    font-size: 0.9rem;
  }

  .news-list-compact .news-date {
    font-size: 0.8rem;
  }

  .pagination a,
  .pagination span {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }

  .news-detail-content {
    padding: 1.5rem;
  }

  .news-article h2 {
    font-size: 1.5rem;
  }

  .article-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .prev-article, .next-article {
    margin: 0;
    text-align: left;
  }
}

/* 媒体查询 - 小型手机 */
@media (max-width: 480px) {
  .news-page,
  .news-detail-page {
    padding: 1.5rem 0;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .news-filter a {
    font-size: 0.9rem;
  }

  .featured-news .featured-title {
    font-size: 1rem;
  }

  .news-list-compact .news-item-row {
    align-items: flex-start;
    padding: 0.75rem 0;
  }

  .news-list-compact .news-bullet {
    margin-top: 0.55rem;
  }

  .news-list-compact .news-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .news-list-compact .news-date {
    display: none; /* 超窄屏幕隐藏日期，避免标题被压得太短 */
  }

  .pagination ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination a,
  .pagination span {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .news-detail-content {
    padding: 1rem;
  }

  .news-article h2 {
    font-size: 1.3rem;
  }

  .article-meta {
    padding: 0.8rem;
  }

  .article-meta span {
    display: block;
    margin-bottom: 0.5rem;
    margin-right: 0;
  }

  .article-meta span:last-child {
    margin-bottom: 0;
  }

  .article-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
  }
}
