@charset "UTF-8";

/* =========================================================
   news-detail.css — 新闻资讯 · 内容页（电脑端）
   对应设计稿：蓝湖「9电脑端-新闻资讯-内容页」1920 坐标系

   排版原则：与 news.css / about.css / certificates.css 保持一致
             · 区块内部一律 flex 排版（外边距定位）
             · 横向位置用 px（设计稿 1920 坐标系），纵向按设计稿 px
             · 切图按设计尺寸还原（width/height 用 px），避免缩放失真
             · 背景图、装饰图全部由 HTML 的 <img> 承载，
               CSS 只负责定位与尺寸，不再使用 background-image
   ========================================================= */

/* ---------- 1. 主题变量 ---------- */
:root {
    --nd-gray: #f3f4f6;          /* 正文区底色 */
    --nd-navy: #090762;          /* 标题藏青 */
    --nd-text: #666666;          /* 正文 / 文章标题 */
    --nd-muted: #999999;         /* 日期 */
    --nd-rule: #d7d3d3;          /* 细分隔线 */
    --nd-active: #cccccc;        /* 「上一篇」按钮底色 */

    /* 标题区 */
    --nd-hero-h: 421px;
    --nd-hero-pad-x: 238px;
    --nd-title-size: 54px;
    --nd-sub-size: 26px;

    /* 正文区 */
    --nd-main-pad-x: 208px;      /* 画布左边距（分隔线起点） */
    --nd-rule-w: 1208px;         /* 顶部分隔线宽度 */
    --nd-art-w: 886px;           /* 正文列宽度 */
    --nd-art-gap: 131px;         /* 正文列与右侧栏间距 */
    --nd-side-w: 336px;          /* 右侧栏宽度 */
    --nd-side-h: 613px;          /* 右侧栏高度 */
}

/* ---------- 2. 页面标题区 ---------- */
.news-detail-page .news-detail-hero {
    height: calc(var(--nd-hero-h) + 1px);
}

/* ---------- 3. 正文区 ---------- */
.news-detail-page .news-detail-main {
    background-color: var(--nd-gray);
    padding: 61px 0 38px;
}

.news-detail-page .news-detail-main .canvas {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: var(--nd-main-pad-x);
}

/* 正文区顶部分隔线 */
.news-detail-page .news-detail__rule {
    display: block;
    flex: 0 0 auto;
    width: var(--nd-rule-w);
    height: 1px;
    background-color: var(--nd-rule);
}

/* 正文列 + 右侧栏 */
.news-detail-page .news-detail__row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* ---------- 4. 文章 ---------- */
.news-detail-page .news-detail__article {
    flex: 0 0 auto;
    width: var(--nd-art-w);
    /* 正文列左侧留出 268px（分隔线起点 208 + 设计稿正文列偏移） */
    margin: 30px 0 0 268px;
}

/* 标题 + 日期 */
.news-detail-page .news-detail__head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 64px;
    padding-left: 84px;
}

.news-detail-page .news-detail__title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 2;
    color: var(--nd-text);

    overflow: hidden;
}

.news-detail-page .news-detail__date {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: var(--nd-muted);
    white-space: nowrap;
}

/* 正文段落 */
.news-detail-page .news-detail__body {
    margin-top: 19px;
}

.news-detail-page .news-detail__body p {
    margin: 0;
    font-size: 19px;
    font-weight: 400;
    line-height: 31.5px;
    color: var(--nd-text);
    /* 设计稿正文按固定行断行（<br>），此处不再二次折行 */
    white-space: nowrap;
}

/* 配图 */
.news-detail-page .news-detail__photos {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.news-detail-page .news-detail__photo {
    display: block;
    flex: 0 0 auto;
    width: 426px;
    height: 306px;
    object-fit: cover;
}

.news-detail-page .news-detail__photo--2 {
    width: 449px;
    height: 303px;
}

/* 上一篇 / 下一篇 */
.news-detail-page .news-detail__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 116px;
    margin-top: 50px;
    padding-left: 64px;
}

.news-detail-page .news-detail__prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 115px;
    height: 34px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: var(--nd-text);
    text-decoration: none;
    background-color: var(--nd-active);
    transition: background-color 0.25s ease;
}

.news-detail-page .news-detail__prev:hover,
.news-detail-page .news-detail__prev:focus-visible {
    background-color: #b8b8b8;
}

.news-detail-page .news-detail__next {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: var(--nd-text);
    text-decoration: none;
}

.news-detail-page .news-detail__next:hover,
.news-detail-page .news-detail__next:focus-visible {
    color: var(--nd-navy);
}

/* ---------- 5. 右侧「新闻类别」栏 ----------
   组件样式来自 news.css（与列表页共用同一套组件），
   这里仅覆盖位置：与正文列的间距与上边距 */
.news-detail-page .news-categories {
    flex: 0 0 auto;
    width: var(--nd-side-w);
    height: var(--nd-side-h);
    margin: -56px 0 0 var(--nd-art-gap);
}

.news-item__summary img {
    max-width: 100%;
}

.news-pager {
    margin-top: 20px;
}
/* ---------- 5. 右侧「新闻类别」栏 ----------
   组件完整样式由 news.css 提供；本文件只修改外层位置/宽高，不修改内部子组件 */
.news-detail-page .news-categories {
    flex: 0 0 auto;
    width: var(--nd-side-w);
    height: var(--nd-side-h);
    margin: -56px 0 0 var(--nd-art-gap);
}

/* 关键：解除子选择器被 .news‑detail‑page 父类锁死；
子组件全部交由 news.css 的 .news‑page .news‑categories 控制 */

.news-item__summary img {
    max-width: 100%;
}

/* news‑detail.css补充，复制news.css里面news‑categories全部子样式 */
.news-detail-page .news-categories{
    flex-shrink:0;
    position:relative;
    background-color:#FFFFFF;
}
.news-detail-page .news-categories__title{
    position:relative;
    z-index:2;
    padding:30px 0 0 20px;
    font-size:26px;
    font-weight:bold;
    line-height:1;
    color:#000000;
}
.news-detail-page .news-categories__body{
    padding:20px 20px 60px 0;
}
.news-detail-page .news-categories__item{
    display:flex;
    align-items:center;
    width:100%;
    font-size:24px;
    font-weight:400;
    line-height:1;
    color:#000000;
    white-space:nowrap;
    transition:color 0.25s ease;
    padding:10px;
    margin:0 10px 10px;
    gap:10px;
}
.news-detail-page .news-categories__item.is-active,
.news-detail-page .news-categories__item:hover{
    background-image:linear-gradient(90deg,#ffdc9a,rgba(255,255,255,0));
    border-radius:20px;
}
.news-detail-page .news-categories__item img{
    width:48px;
}
.news-detail-page .news-categories__item:hover{
    color:var(--news-navy);
}
