/* ===========================================================
   新闻中心响应式样式（newslist.html + news.html 共用）
   设计原则：
   1. 移动优先：默认单列，侧边栏在上、文章列表在下
   2. PC 增强：≥992px 切换为左侧文章 + 右侧侧边栏
   3. 全部使用新类名，避免与 baseLayOut.css 旧样式冲突
   =========================================================== */

:root {
  --news-primary: #077ee3;
  --news-primary-light: #3a9cf5;
  --news-text: #333;
  --news-text-secondary: #666;
  --news-text-muted: #999;
  --news-border: #eee;
  --news-bg: #fff;
  --news-radius: 8px;
  --news-gap: 20px;
  --news-max-width: 1200px;
  --news-sidebar-width: 340px;
}

/* ---------- 外层容器 ---------- */
.news-page {
  width: 100%;
  max-width: var(--news-max-width);
  margin: 0 auto;
  padding: 20px 15px 40px;
  box-sizing: border-box;
}

.news-page__grid {
  display: flex;
  flex-direction: column;
  gap: var(--news-gap);
}

/* 移动端：侧边栏排在上方（DOM 顺序决定） */
.news-page__sidebar {
  order: -1;
}

.news-page__main {
  order: 1;
}

/* ---------- Banner ---------- */
.news-banner {
  background: linear-gradient(135deg, #077ee3 0%, #3a9cf5 100%);
  color: #fff;
  text-align: center;
  padding: 70px 15px 28px;
}

.news-banner__inner {
  max-width: var(--news-max-width);
  margin: 0 auto;
}

.news-banner h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 600;
}

.news-banner p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 15px;
  opacity: 0.9;
}

.news-banner a {
  display: inline-block;
  background: #fff;
  color: #333;
  padding: 8px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-banner a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ---------- 侧边栏卡片 ---------- */
.news-card {
  background: var(--news-bg);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
  padding: 15px;
  margin-bottom: 15px;
}

.news-card:last-child {
  margin-bottom: 0;
}

.news-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--news-text);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--news-border);
  line-height: 1.4;
}

.news-card__title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--news-primary);
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
}

.news-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f5f5f5;
}

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

.news-list-item__num {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #999;
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  margin-top: 1px;
}

.news-list-item__num--top {
  background: #e66060;
}

.news-list-item a {
  flex: 1;
  min-width: 0;
  color: var(--news-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

/* 轮播图 */
.news-card .swiper-container {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.news-card .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- 列表页文章 ---------- */
.news-articles {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-article {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--news-border);
}

.news-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.news-article > a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.news-article__thumb {
  flex: 0 0 110px;
  width: 110px;
  height: 80px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.news-article__body {
  flex: 1;
  min-width: 0;
}

.news-article__title {
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 6px;
  color: var(--news-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}

.news-article__meta {
  font-size: 12px;
  color: var(--news-text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.news-article__meta span {
  margin-right: 12px;
  display: inline-block;
}

.news-article__meta img {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-right: 3px;
}

.news-article__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--news-text-secondary);
  margin: 0;
  word-break: break-word;
  white-space: normal;
  overflow: visible;
}

/* ---------- 分页 ---------- */
.news-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 25px 0 0;
}

.news-pagination a,
.news-pagination span,
.news-pagination p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ccc;
  background: #fff;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.news-pagination a.cur,
.news-pagination span.current,
.news-pagination p.current {
  background: var(--news-primary);
  color: #fff;
  border-color: var(--news-primary);
}

.news-pagination p.pageRemark {
  border-style: none;
  background: none;
  color: #666;
  letter-spacing: 1px;
  cursor: default;
}

.news-pagination p.pageRemark b {
  color: #e66060;
  margin: 0 2px;
}

.news-pagination p.pageEllipsis {
  border-style: none;
  background: none;
  color: #808080;
  cursor: default;
}

/* ---------- 详情页 ---------- */
.news-detail__title {
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--news-text);
  font-weight: 600;
}

.news-detail__meta {
  font-size: 13px;
  color: var(--news-text-muted);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--news-border);
}

.news-detail__meta span {
  margin-right: 15px;
  display: inline-block;
  margin-bottom: 4px;
}

.news-detail__content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--news-text);
  word-break: break-word;
}

.news-detail__content img,
.news-detail__content video {
  max-width: 100%;
  height: auto;
  display: block;
}

.news-detail__content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.news-detail__nav {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--news-border);
  font-size: 13px;
  color: var(--news-text-secondary);
  line-height: 1.8;
}

.news-detail__nav p {
  margin: 0;
}

/* 面包屑（复用原类名，但做移动端微调） */
.content_tabbar {
  font-size: 13px;
  color: var(--news-text-muted);
  margin-bottom: 15px;
  line-height: 1.5;
}

/* ===========================================================
   PC 端：左侧文章，右侧侧边栏
   =========================================================== */
@media (min-width: 992px) {
  .news-page {
    padding: 30px 15px 50px;
  }

  .news-page__grid {
    display: grid;
    grid-template-columns: 1fr var(--news-sidebar-width);
    gap: 30px;
    align-items: start;
  }

  /* PC 端调整视觉顺序：主内容在左，侧边栏在右 */
  .news-page__main {
    order: 1;
  }

  .news-page__sidebar {
    order: 2;
  }

  .news-banner {
    padding: 90px 15px 45px;
  }

  .news-banner h2 {
    font-size: 28px;
  }

  .news-banner p {
    font-size: 14px;
  }

  .news-banner a {
    padding: 9px 28px;
  }

  .news-article__thumb {
    flex: 0 0 160px;
    width: 160px;
    height: 110px;
  }

  .news-article__title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .news-article__meta {
    margin-bottom: 8px;
  }

  .news-article__desc {
    font-size: 14px;
  }

  .news-detail__title {
    font-size: 26px;
  }
}

/* 更小屏幕的微调 */
@media (max-width: 360px) {
  .news-article__thumb {
    flex: 0 0 90px;
    width: 90px;
    height: 68px;
  }

  .news-article__title {
    font-size: 14px;
  }

  .news-article__desc {
    font-size: 12px;
  }
}
