@charset "utf-8";

/* ==========================================================
   news.css
   模块：新闻列表页 + 新闻内容详情页
   作用：
   1. 统一二级Banner、双栏主体、栏目标题、右侧原创文章、
      宣传图片及响应式规则；
   2. 保留新闻列表页专用的列表样式；
   3. 保留新闻详情页专用的正文排版与媒体兼容样式；
   4. 右侧宣传图片统一使用新闻列表页的
      .news-sidebar__promotions 与 .news-promo-card；
   5. 删除 news-list.css 与 news-detail.css 中重复定义。
   说明：
   - 新闻列表分页继续由独立的 list-pagination.css 控制；
   - 本文件不定义公共头部、公共底部和分页组件。
   ========================================================== */

:root {
  --news-primary: #064b9f;
  --news-primary-dark: #023b83;
  --news-gold: #f0cb58;
  --news-list-text: #343a42;
  --news-detail-text: #4e555d;
  --news-heading: #252b32;
  --news-muted: #8a9199;
  --news-line: #d7dce2;
  --news-line-soft: #e7eaee;
  --news-detail-link: #d84436;
  --news-container: 1280px;
}

/* ==========================================================
   页面基础
   ========================================================== */

.news-list-page,
.news-detail-page {
  min-width: 0;
  overflow-x: hidden;
  background: #ffffff;
}

.news-list-page {
  color: var(--news-list-text);
}

.news-detail-page {
  color: var(--news-detail-text);
}

.news-list-page *,
.news-list-page *::before,
.news-list-page *::after,
.news-detail-page *,
.news-detail-page *::before,
.news-detail-page *::after {
  box-sizing: border-box;
}

/* ==========================================================
   共用二级Banner
   PC端图片：/banner/eb9.jpg
   移动端图片：/banner/eb1-mobile.jpg
   移动端设计尺寸：750 × 400px
   ========================================================== */

.news-inner-banner,
.news-detail-banner {
  position: relative;
  width: 100%;
  height: clamp(280px, 28vw, 430px);
  min-height: 280px;
  overflow: hidden;
  background: #1e3757;
}

.news-inner-banner__image,
.news-detail-banner__image {
  width: 100%;
  height: 100%;
  background-image: url("/banner/eb9.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* ==========================================================
   共用主体容器与双栏布局
   ========================================================== */

.news-page-main,
.news-detail {
  width: 100%;
  background: #ffffff;
}

.news-page-main {
  padding: 52px 0 86px;
}

.news-detail {
  padding: 52px 0 88px;
}

.news-page-container,
.news-detail__container {
  width: min(var(--news-container), calc(100% - 48px));
  margin: 0 auto;
}

.news-page-layout,
.news-detail__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 58px;
  align-items: start;
}

.news-main-column,
.news-detail__main,
.news-detail__sidebar,
.news-sidebar {
  min-width: 0;
}

/* ==========================================================
   共用栏目标题
   列表页：.news-module-heading
   详情页：.news-section-title
   ========================================================== */

.news-module-heading,
.news-section-title {
  position: relative;
  width: 100%;
  margin: 0 0 18px;
  padding: 0 0 12px 14px;
  border-bottom: 1px solid #b9bec5;
}

.news-module-heading::before,
.news-section-title::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 4px;
  height: 21px;
  background: var(--news-primary);
}

.news-module-heading__title,
.news-section-title__text {
  margin: 0;
  color: var(--news-primary-dark);
  font-size: 21px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ==========================================================
   新闻列表页：新闻动态列表
   ========================================================== */

.news-list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list__item {
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px dashed var(--news-line-soft);
}

.news-list__article {
  padding: 17px 8px 20px;
}

.news-list__title {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  color: var(--news-primary);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
}

.news-list__title a {
  display: inline;
  min-width: 0;
  color: inherit;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.25s ease;
}

.news-list__title a:hover,
.news-list__title a:focus-visible {
  color: var(--news-gold);
  text-decoration: none;
}

/* 新闻小图标：纯CSS绘制 */
.news-list__icon {
  position: relative;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin-top: 7px;
  border: 1px solid #d3aa3c;
  background: #fff9d9;
}

.news-list__icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 5px;
  height: 5px;
  background: #f0c54a;
}

.news-list__icon::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 5px;
  height: 5px;
  border-right: 1px solid #b9c0c8;
  border-bottom: 1px solid #b9c0c8;
}

.news-list__summary {
  margin: 9px 0 0 22px;
  color: #727983;
  font-size: 15px;
  line-height: 1.9;
}

.news-list__summary-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-list__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  margin-top: 5px;
}

.news-list__date {
  flex: 0 0 auto;
  color: #8a919a;
  font-size: 13px;
  line-height: 1.6;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
  text-align: left;
}

.news-list__detail-link {
  flex: 0 0 auto;
  display: inline-block;
  margin-left: auto;
  color: var(--news-detail-link);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  text-decoration: none;
  white-space: nowrap;
}

.news-list__detail-link:hover,
.news-list__detail-link:focus-visible {
  color: #b72d24;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================
   新闻详情页：文章头部
   ========================================================== */

.news-article__inner {
  width: 100%;
}

.news-article__header {
  width: 100%;
  padding: 28px 16px 18px;
  border-bottom: 1px solid var(--news-line);
  text-align: center;
}

.news-article__title {
  margin: 0;
  color: var(--news-heading);
  font-size: 25px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 22px;
  margin-top: 15px;
  color: var(--news-muted);
  font-size: 13px;
  line-height: 1.6;
}

.news-article__meta-item {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-article__source:has(span:empty) {
  display: none;
}

/* ==========================================================
   新闻详情页：正文排版
   ========================================================== */

.news-article__content {
  width: 100%;
  min-width: 0;
  padding: 28px 16px 0;
  color: var(--news-detail-text);
  font-size: 16px;
  line-height: 2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__content p {
  margin: 0 0 18px;
  text-align: justify;
  text-indent: 2em;
}

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


/* 包含媒体或表格的段落不使用首行缩进 */
.news-article__content p:has(img),
.news-article__content p:has(video),
.news-article__content p:has(iframe),
.news-article__content p:has(table) {
  text-indent: 0;
  text-align: center;
}

.news-article__content h2,
.news-article__content h3,
.news-article__content h4,
.news-article__content h5,
.news-article__content h6 {
  margin: 30px 0 15px;
  color: #2f353c;
  line-height: 1.55;
  font-weight: 600;
  text-indent: 0;
}

.news-article__content h2 {
  font-size: 22px;
}

.news-article__content h3 {
  font-size: 20px;
}

.news-article__content h4,
.news-article__content h5,
.news-article__content h6 {
  font-size: 18px;
}

.news-article__content strong,
.news-article__content b {
  color: #343a41;
  font-weight: 600;
}

.news-article__content a {
  color: var(--news-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.news-article__content a:hover,
.news-article__content a:focus-visible {
  color: var(--news-gold);
}

.news-article__content img {
  display: block;
  max-width: 100%;
  height: auto !important;
  margin: 22px auto;
}

.news-article__content figure {
  max-width: 100%;
  margin: 24px auto;
  text-align: center;
}

.news-article__content figcaption {
  margin-top: 8px;
  color: var(--news-muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.news-article__content ul,
.news-article__content ol {
  margin: 0 0 20px;
  padding-left: 2em;
  text-indent: 0;
}

.news-article__content ul {
  list-style: disc;
}

.news-article__content ol {
  list-style: decimal;
}

.news-article__content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.news-article__content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--news-primary);
  background: #f5f7fa;
  color: #616872;
  line-height: 1.9;
}

.news-article__content blockquote p {
  margin-bottom: 10px;
  text-indent: 0;
}

.news-article__content blockquote p:last-child {
  margin-bottom: 0;
}

.news-article__content hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: var(--news-line);
}

/* 正文宽表格包装层，由 news-detail.js 自动添加 */
.news-article__table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 22px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.news-article__content table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border-spacing: 0;
  background: #ffffff;
  text-indent: 0;
}

.news-article__content th,
.news-article__content td {
  padding: 10px 12px;
  border: 1px solid #d9dde2;
  color: #515860;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.news-article__content th {
  background: #f3f6f9;
  color: #333a42;
  font-weight: 600;
}

/* iframe、embed、object响应式包装层 */
.news-article__media-wrap {
  position: relative;
  width: 100%;
  margin: 24px 0;
  overflow: hidden;
  background: #000000;
  aspect-ratio: var(--news-media-ratio, 16 / 9);
}

.news-article__media-wrap iframe,
.news-article__media-wrap embed,
.news-article__media-wrap object,
.news-article__media-wrap video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.news-article__content video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

.news-article__content pre {
  max-width: 100%;
  margin: 22px 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid #e0e4e8;
  background: #f7f8fa;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.news-article__content code {
  font-family: Consolas, Monaco, monospace;
}

.news-article__content img.is-image-error {
  display: none;
}

/* ==========================================================
   共用右侧原创文章列表
   ========================================================== */

.news-sidebar__articles {
  width: 100%;
}

.news-sidebar__article-list,
.news-sidebar__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-sidebar__article-item,
.news-sidebar__item {
  position: relative;
  width: 100%;
  padding: 11px 4px 11px 18px;
  border-bottom: 1px dashed #cfd4da;
}

.news-sidebar__article-item::before,
.news-sidebar__item::before {
  content: "";
  position: absolute;
  left: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #484e55;
}

.news-sidebar__article-item::before {
  top: 50%;
  transform: translateY(-50%);
}

.news-sidebar__item::before {
  top: 20px;
}

.news-sidebar__article-item a,
.news-sidebar__item a {
  display: block;
  width: 100%;
  color: #3f454c;
  text-decoration: none;
  transition: color 0.25s ease;
}

.news-sidebar__article-item a {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-sidebar__item a {
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-sidebar__article-item a:hover,
.news-sidebar__article-item a:focus-visible,
.news-sidebar__item a:hover,
.news-sidebar__item a:focus-visible {
  color: var(--news-gold);
}

/* ==========================================================
   共用右侧宣传图片
   ========================================================== */

.news-sidebar__promotions {
  display: grid;
  gap: 20px;
  width: 100%;
  margin-top: 26px;
}

.news-promo-card {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #edf1f5;
  text-decoration: none;
}

.news-promo-card img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.news-promo-card:hover img,
.news-promo-card:focus-visible img {
  transform: scale(1.018);
}

.news-promo-card.is-image-error {
  display: none;
}

/* ==========================================================
   平板端适配
   ========================================================== */

@media (max-width: 1100px) {
  .news-page-container,
  .news-detail__container {
    width: calc(100% - 40px);
  }

  .news-page-layout,
  .news-detail__container {
    grid-template-columns: minmax(0, 62%) minmax(280px, 34%);
    gap: 38px;
  }

  .news-module-heading__title,
  .news-section-title__text {
    font-size: 19px;
  }

  /* 新闻列表页 */
  .news-list__title {
    font-size: 15px;
  }

  .news-list__summary {
    font-size: 13px;
  }

  .news-sidebar__article-item a {
    font-size: 13px;
  }

  /* 新闻详情页 */
  .news-article__header {
    padding-right: 10px;
    padding-left: 10px;
  }

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

  .news-article__content {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 15px;
  }

  .news-sidebar__item a {
    font-size: 14px;
  }
}

/* ==========================================================
   手机端适配
   ========================================================== */

@media (max-width: 768px) {
  /*
   * 移动端使用专用Banner：
   * /banner/eb1-mobile.jpg
   * 图片尺寸：750 × 400px
   *
   * 容器与图片保持同一比例，
   * 避免左侧文字或右侧Logo被裁切。
   */
  .news-inner-banner,
  .news-detail-banner {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 750 / 400;
    background: #0b3d88;
  }

  .news-inner-banner__image,
  .news-detail-banner__image {
    background-image: url("/banner/eb1-mobile.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  .news-page-main {
    padding: 38px 0 58px;
  }

  .news-detail {
    padding: 38px 0 60px;
  }

  .news-page-container,
  .news-detail__container {
    width: calc(100% - 32px);
  }

  .news-page-layout,
  .news-detail__container {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .news-module-heading,
  .news-section-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .news-module-heading::before,
  .news-section-title::before {
    top: 3px;
    height: 20px;
  }

  .news-module-heading__title,
  .news-section-title__text {
    font-size: 19px;
  }

  .news-sidebar__promotions {
    gap: 18px;
    margin-top: 22px;
  }

  /* 新闻列表页 */
  .news-list__article {
    padding: 15px 2px 18px;
  }

  .news-list__title {
    gap: 8px;
    font-size: 15px;
    line-height: 1.6;
  }

  .news-list__footer {
    gap: 12px;
    margin-top: 6px;
  }

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

  .news-list__summary {
    margin: 8px 0 0 21px;
    font-size: 14px;
    line-height: 1.8;
  }

  .news-list__summary-text {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  /* 新闻详情页 */
  .news-article__header {
    padding: 24px 0 17px;
  }

  .news-article__title {
    font-size: 22px;
    line-height: 1.5;
  }

  .news-article__meta {
    gap: 5px 15px;
    margin-top: 13px;
    font-size: 12px;
  }

  .news-article__content {
    padding: 24px 0 0;
    font-size: 15px;
    line-height: 1.95;
  }

  .news-article__content p {
    margin-bottom: 16px;
  }

  .news-article__content h2 {
    font-size: 20px;
  }

  .news-article__content h3 {
    font-size: 18px;
  }

  .news-article__content h4,
  .news-article__content h5,
  .news-article__content h6 {
    font-size: 17px;
  }

  .news-article__content table {
    min-width: 620px;
  }

  .news-sidebar__item {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .news-sidebar__item a {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  /*
   * 超窄屏继续沿用750×400比例，
   * 不再设置固定165px高度。
   */

  .news-page-container,
  .news-detail__container {
    width: calc(100% - 28px);
  }

  /* 新闻列表页 */
  .news-list__title {
    font-size: 14px;
  }

  .news-list__summary {
    font-size: 13px;
  }

  /* 新闻详情页 */
  .news-article__title {
    font-size: 21px;
  }

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

  .news-article__meta {
    display: grid;
    justify-items: center;
    gap: 3px;
  }
}

/* ==========================================================
   减少动态效果
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .news-list__title a,
  .news-sidebar__article-item a,
  .news-sidebar__item a,
  .news-promo-card img,
  .news-article__content a {
    transition: none;
  }
}
