/* =========================================================
   新闻动态：列表页（.news-*）+ 详情页（.nd-* / .news-article 富文本）
   ========================================================= */

/* ---------- 顶部推荐轮播 ---------- */
.news-banner { position: relative; background: var(--c-bg-gray); }
.news-banner .swiper-slide { position: relative; }
.news-banner-item { position: relative; display: block; overflow: hidden; }
.news-banner-pic img { width: 100%; height: auto; }
.news-banner-mask { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(to top, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)); pointer-events: none; }
.news-banner-text { position: absolute; z-index: 2; left: 0; right: 0; bottom: .8rem; width: 14.4rem; max-width: 92%; margin: 0 auto; padding-right: 3rem; color: #fff; }
.news-banner-title { max-width: 10rem; font-size: .44rem; font-weight: 700; line-height: 1.35; text-shadow: 0 .02rem .12rem rgba(0, 0, 0, .18); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.news-banner-date { margin-top: .14rem; font-size: .2rem; opacity: .9; letter-spacing: .01rem; }
.news-banner-item:hover .news-banner-pic img { transform: scale(1.02); }
.news-banner-pic img { transition: transform 1.2s var(--ease); }

/* 分页指示器：右下角短横线，当前项更长、黑色 */
.news-banner .swiper-pagination.news-banner-dots { position: absolute; z-index: 3; left: 0; right: 0; top: auto; bottom: .84rem; width: 14.4rem; max-width: 92%; margin: 0 auto; text-align: right; line-height: 0; pointer-events: none; --swiper-pagination-bullet-horizontal-gap: .05rem; }
.news-banner .news-banner-dots .swiper-pagination-bullet { width: .3rem; height: .04rem; border-radius: .04rem; background: rgba(255, 255, 255, .8); opacity: 1; pointer-events: auto; cursor: pointer; transition: width .4s var(--ease), background .4s; }
.news-banner .news-banner-dots .swiper-pagination-bullet::before { content: ""; position: absolute; left: 0; right: 0; top: -.14rem; bottom: -.14rem; }
.news-banner .news-banner-dots .swiper-pagination-bullet { position: relative; }
.news-banner .news-banner-dots .swiper-pagination-bullet:last-child { margin-right: 0; }
.news-banner .news-banner-dots .swiper-pagination-bullet-active { width: .64rem; background: var(--c-primary); }

/* ---------- 新闻列表 ---------- */
.news-list { padding-top: 1rem; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .4rem; }
.news-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-bg-gray-2); -webkit-mask-image: -webkit-radial-gradient(white, black); }
.news-card-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-bg-gray); }
.news-card-cover .pic { width: 100%; height: 100%; }
.news-card-cover .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news-card-body { flex: 1; display: flex; flex-direction: column; padding: .34rem .4rem .36rem; transition: background-color .4s, color .4s; }
.news-card-title { font-size: .24rem; font-weight: 600; line-height: 1.5; min-height: 3em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.news-card-summary { display: none; }
.news-card-foot { margin-top: auto; padding-top: .2rem; display: flex; align-items: center; justify-content: space-between; gap: .2rem; }
.news-card-date { font-size: .16rem; color: var(--c-text-3); transition: color .4s; }
.news-card-more { display: none; }
@media (hover: hover) and (min-width: 761px) {
  .news-card:hover .news-card-body { background: var(--c-primary); color: #fff; }
  .news-card:hover .news-card-date { color: rgba(255, 255, 255, .6); }
  .news-card:hover .news-card-cover .pic img { transform: scale(1.1); }
}

/* 空状态 */
.news-empty { padding: .7rem 0 .4rem; text-align: center; color: var(--c-text-3); }
.news-empty .ico { font-size: .64rem; stroke-width: 1.1; }
.news-empty p { margin-top: .14rem; font-size: .2rem; }
.news-empty-back { margin-top: .3rem; }

/* 分页 */
.news-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .12rem; margin-top: .8rem; }
.news-pager-item { min-width: .48rem; height: .48rem; padding: 0 .1rem; border: 1px solid var(--c-line); border-radius: .48rem; display: inline-flex; align-items: center; justify-content: center; font-size: .18rem; line-height: 1; color: var(--c-text-2); background: #fff; transition: all .3s; }
.news-pager-arrow .ico { font-size: .22rem; }
a.news-pager-item:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.news-pager-item.is-current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.news-pager-item.is-disabled { color: #c8c8c8; border-color: #eee; cursor: not-allowed; }
.news-pager-dots { min-width: .3rem; text-align: center; color: var(--c-text-3); font-size: .18rem; }

/* =========================================================
   新闻详情
   ========================================================= */
.nd { padding: .8rem 0 1.2rem; }
.nd-inner { width: 10rem; max-width: 92%; margin: 0 auto; }
.nd-head { text-align: center; padding-bottom: .44rem; }
.nd-title { font-size: .4rem; font-weight: 700; line-height: 1.4; }
.nd-meta { margin-top: .22rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .4rem; font-size: .16rem; color: var(--c-text-3); }
.nd-meta-item { display: inline-flex; align-items: center; gap: .06rem; }
.nd-meta-item .ico { font-size: .18rem; }
.nd-source { margin-top: .2rem; text-align: right; font-size: .14rem; color: var(--c-text-3); }

/* 上一篇 / 返回列表 / 下一篇 */
.nd-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .24rem; margin-top: .6rem; }
.nd-btn { min-width: 0; max-width: 100%; height: .56rem; padding: 0 .28rem; display: inline-flex; align-items: center; gap: .14rem; border: 1px solid var(--c-text); border-radius: .56rem; font-size: .16rem; background: #fff; transition: all .3s; }
.nd-prev { justify-self: start; }
.nd-next { justify-self: end; }
.nd-back { justify-self: center; justify-content: center; padding: 0 .4rem; font-weight: 600; white-space: nowrap; }
.nd-btn-label { flex-shrink: 0; display: inline-flex; align-items: center; gap: .02rem; font-weight: 600; white-space: nowrap; }
.nd-btn-label .ico { font-size: .18rem; }
.nd-btn-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text-2); transition: color .3s; }
a.nd-btn:hover { background: var(--c-primary); color: #fff; }
a.nd-btn:hover .nd-btn-title { color: rgba(255, 255, 255, .75); }
.nd-btn.is-disabled { border-color: var(--c-line); color: #c4c4c4; cursor: not-allowed; }
.nd-btn.is-disabled .nd-btn-title { color: #c4c4c4; }

/* ---------- 富文本正文（后台编辑器内容） ---------- */
.news-article { padding: .5rem 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); font-size: .18rem; line-height: 2; color: #333; overflow-wrap: break-word; word-wrap: break-word; }
.news-article.is-empty { padding: 0; border-bottom: 0; }
.news-article > :first-child { margin-top: 0 !important; }
.news-article > :last-child { margin-bottom: 0 !important; }
.news-article p { margin: 0 0 .24rem; }
.news-article h1, .news-article h2, .news-article h3, .news-article h4, .news-article h5, .news-article h6 { margin: .5rem 0 .2rem; color: var(--c-text); font-weight: 700; line-height: 1.45; }
.news-article h1 { font-size: .32rem; }
.news-article h2 { font-size: .28rem; }
.news-article h3 { font-size: .24rem; }
.news-article h4 { font-size: .2rem; }
.news-article h5, .news-article h6 { font-size: .18rem; }
.news-article strong, .news-article b { font-weight: 700; color: var(--c-text); }
.news-article em, .news-article i { font-style: italic; }
.news-article u { text-decoration: underline; }
.news-article s, .news-article del { text-decoration: line-through; }
.news-article a { color: var(--c-accent); text-decoration: underline; text-underline-offset: .04rem; }
.news-article img { display: block; max-width: 100% !important; height: auto !important; margin: .3rem auto; border-radius: .08rem; }
.news-article p > img:only-child { margin-top: .06rem; margin-bottom: .06rem; }
.news-article video, .news-article iframe, .news-article embed { display: block; width: 100%; max-width: 100%; margin: .3rem auto; border: 0; border-radius: .08rem; background: #000; }
.news-article iframe { height: auto; aspect-ratio: 16 / 9; }
.news-article ul, .news-article ol { margin: 0 0 .24rem; padding-left: .32rem; }
.news-article ul { list-style: disc; }
.news-article ol { list-style: decimal; }
.news-article li { margin-bottom: .06rem; }
.news-article li > ul, .news-article li > ol { margin: .06rem 0 0; }
.news-article li > ul { list-style: circle; }
.news-article blockquote { margin: .3rem 0; padding: .18rem .3rem; border-left: 3px solid var(--c-text); border-radius: 0 .08rem .08rem 0; background: var(--c-bg-gray-2); color: var(--c-text-2); }
.news-article blockquote p:last-child { margin-bottom: 0; }
.news-article hr { margin: .4rem 0; border: 0; border-top: 1px solid var(--c-line); }
.news-article figure { margin: .3rem 0; }
.news-article figure img { margin-bottom: 0; }
.news-article figcaption { margin-top: .1rem; text-align: center; font-size: .14rem; color: var(--c-text-3); }
.news-article .news-table-wrap { margin: .3rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.news-article table { width: 100%; margin: .3rem 0; border-collapse: collapse; font-size: .16rem; line-height: 1.6; }
.news-article .news-table-wrap > table { margin: 0; }
.news-article th, .news-article td { padding: .12rem .16rem; border: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.news-article th { background: var(--c-bg-gray); color: var(--c-text); font-weight: 600; }
.news-article pre { margin: .3rem 0; padding: .2rem .24rem; border-radius: .08rem; background: var(--c-bg-gray); font-size: .15rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.news-article code { font-family: Menlo, Consolas, "Courier New", monospace; font-size: .9em; }
.news-article :not(pre) > code { padding: .02rem .06rem; border-radius: .04rem; background: var(--c-bg-gray); }

/* =========================================================
   手机（≤760px）
   ========================================================= */
@media (max-width: 760px) {
  /* 推荐轮播：手机图 + 底部渐变遮罩 */
  .news-banner-mask { height: 62%; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .3) 55%, rgba(0, 0, 0, 0)); }
  .news-banner-text { left: .3rem; right: .3rem; bottom: .76rem; width: auto; max-width: none; padding-right: 0; }
  .news-banner-title { max-width: none; font-size: .4rem; }
  .news-banner-date { margin-top: .1rem; font-size: .24rem; }
  .news-banner .swiper-pagination.news-banner-dots { left: .3rem; right: .3rem; bottom: .36rem; width: auto; max-width: none; --swiper-pagination-bullet-horizontal-gap: .06rem; }
  .news-banner .news-banner-dots .swiper-pagination-bullet { width: .36rem; height: .05rem; background: rgba(255, 255, 255, .45); }
  .news-banner .news-banner-dots .swiper-pagination-bullet-active { width: .72rem; background: #fff; }

  /* 列表：单列 */
  .news-list { padding-top: .8rem; }
  .news-grid { grid-template-columns: 1fr; gap: .4rem; }
  .news-card { border-radius: .2rem; }
  .news-card-body { padding: .3rem .3rem .32rem; }
  .news-card-title { min-height: 0; font-size: .32rem; font-weight: 700; line-height: 1.45; }
  .news-card-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: .14rem; font-size: .26rem; line-height: 1.6; color: var(--c-text-2); }
  .news-card-foot { padding-top: .24rem; }
  .news-card-date { font-size: .24rem; }
  .news-card-more { display: inline-flex; font-size: .26rem; }

  .news-empty { padding: .6rem 0 .3rem; }
  .news-empty .ico { font-size: .9rem; }
  .news-empty p { font-size: .28rem; }

  .news-pager { margin-top: .6rem; gap: .08rem; }
  .news-pager-item { min-width: .58rem; height: .58rem; padding: 0 .1rem; border-radius: .58rem; font-size: .26rem; }
  .news-pager-arrow .ico { font-size: .3rem; }
  .news-pager-dots { min-width: .3rem; font-size: .26rem; }

  /* 详情 */
  .nd { padding: .56rem 0 1rem; }
  .nd-inner { width: auto; max-width: none; margin: 0 .3rem; }
  .nd-head { text-align: left; padding-bottom: .36rem; }
  .nd-title { font-size: .4rem; }
  .nd-meta { justify-content: flex-start; margin-top: .2rem; gap: .1rem .3rem; font-size: .24rem; }
  .nd-meta-item .ico { font-size: .26rem; }
  .nd-source { margin-top: .24rem; font-size: .22rem; }
  .nd-nav { grid-template-columns: minmax(0, 1fr); gap: .2rem; margin-top: .5rem; }
  .nd-btn { width: 100%; height: .88rem; padding: 0 .32rem; gap: .2rem; border-radius: .88rem; font-size: .26rem; }
  .nd-prev, .nd-next, .nd-back { justify-self: stretch; }
  .nd-next { flex-direction: row-reverse; justify-content: flex-end; }
  .nd-back { order: 3; justify-content: center; }
  .nd-btn-label .ico { font-size: .3rem; }

  .news-article { padding: .4rem 0; font-size: .28rem; line-height: 1.9; }
  .news-article p { margin-bottom: .28rem; }
  .news-article h1 { font-size: .4rem; }
  .news-article h2 { font-size: .36rem; }
  .news-article h3 { font-size: .32rem; }
  .news-article h4, .news-article h5, .news-article h6 { font-size: .3rem; }
  .news-article h1, .news-article h2, .news-article h3, .news-article h4, .news-article h5, .news-article h6 { margin: .44rem 0 .18rem; }
  .news-article img, .news-article video, .news-article iframe, .news-article embed { margin: .24rem auto; border-radius: .12rem; }
  .news-article ul, .news-article ol { padding-left: .44rem; }
  .news-article blockquote { padding: .2rem .28rem; }
  .news-article figcaption { font-size: .22rem; }
  .news-article table { font-size: .24rem; }
  .news-article th, .news-article td { padding: .14rem .18rem; min-width: 1.6rem; }
  .news-article pre { font-size: .22rem; }
}
