/* ==========================================================
   新闻详情页专属样式（前缀 nsd-）
   依赖：main.css（全局基础、.container、.page-banner）
   ========================================================== */

/* ── Banner ─────────────────────────────────────────────── */
.page-banner--news-detail {
    height: 355px;
}

.nsd-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── 内容区块（向上伸入 banner 100px）────────────────────── */
.nsd-content-wrap {
    position: relative;
    z-index: 1;           /* 叠于 banner 之上 */
    margin-top: -150px;
    background-color: transparent;
    padding-bottom: 80px;
}

.nsd-body {
        /* 内容块顶部留白（被 banner 遮挡后的可视起始距离） */
}

/* ── 标题 ─────────────────────────────────────────────────── */
.nsd-title {
    font-size: 33.5px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* ── 发布日期（标题下方 35px）───────────────────────────────── */
.nsd-date {
    font-size: 20px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 35px 0 0;
    line-height: 1.4;
    text-align: center;
}

/* ── 文章正文区（日期下方 100px）────────────────────────────── */
.nsd-article {
    margin-top: 100px;
}

/* 正文段落文字 */
.nsd-article p,
.nsd-article li,
.nsd-article td,
.nsd-article th,
.nsd-article blockquote {
    font-size: 20px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    line-height: 1.8;
}

/* 正文标题层级 */
.nsd-article h1,
.nsd-article h2,
.nsd-article h3,
.nsd-article h4,
.nsd-article h5,
.nsd-article h6 {
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 400;
    color: #000;
    margin: 40px 0 20px;
    line-height: 1.4;
}

/* 正文图片：居中对齐，上下各 60px 间距 */
.nsd-article img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 60px;
    margin-bottom: 60px;
    margin-left: auto;
    margin-right: auto;
}

/* WordPress 编辑器图片默认有 .wp-block-image 包裹 */
.nsd-article .wp-block-image {
    margin-top: 60px;
    margin-bottom: 60px;
    text-align: center;
}

.nsd-article .wp-block-image img {
    margin-top: 0;
    margin-bottom: 0;
}

/* 正文中连续段落间距 */
.nsd-article p + p {
    margin-top: 20px;
}

/* 引用块 */
.nsd-article blockquote {
    border-left: 3px solid #0091e2;
    padding-left: 20px;
    margin: 30px 0;
    color: #555;
}

/* 链接 */
.nsd-article a {
    color: #0091e2;
    text-decoration: none;
}

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

/* ── 上一篇 / 下一篇导航 ─────────────────────────────────── */
.nsd-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;   /* 两侧各自靠上/靠下需要拉伸父容器高度 */
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
    min-height: 80px;
}

/* 左侧（上一篇）：靠下对齐 */
.nsd-nav__prev {
    display: flex;
    align-items: flex-end; /* 靠下 */
}

/* 右侧（下一篇）：靠上对齐 */
.nsd-nav__next {
    display: flex;
    align-items: flex-start; /* 靠上 */
}

.nsd-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000;
    transition: color 0.2s;
}

.nsd-nav__link:hover {
    color: #0091e2;
}

/* PREV 文字标签 */
.nsd-nav__label {
    font-size: 32px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 1;
}

/*
 * 向左箭头（PREV）：左侧角的上边 + 横线
 * SVG path: M10 1 L0 7 H46
 * 视觉效果：从右上到左中（`\`）然后向右延伸横线（`——`）
 *
 * 向右箭头（NEXT）：横线 + 右侧角的下边
 * SVG path: M0 7 H46 L36 13
 * 视觉效果：横线向右延伸（`——`）然后从右向左下（`\`）
 */
.nsd-nav__arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.nsd-nav__prev .nsd-nav__link{
    align-items: flex-end;
}
.nsd-nav__next .nsd-nav__link{
    align-items: flex-start;
}
.nsd-nav__prev .nsd-nav__link:hover .nsd-nav__arrow {
    transform: translateX(-4px);
}

.nsd-nav__next .nsd-nav__link:hover .nsd-nav__arrow {
    transform: translateX(4px);
}

/* ==========================================================
   响应式
   ========================================================== */
@media screen and (max-width: 1200px) {
    .page-banner--news-detail {
        height: 260px;
    }

    .nsd-content-wrap {
        margin-top: -70px;
    }
}

@media screen and (max-width: 960px) {
    .page-banner--news-detail {
        height: 200px;
    }

    .nsd-content-wrap {
        margin-top: -50px;
    }

    .nsd-body {
        padding-top: 40px;
    }

    .nsd-title {
        font-size: 24px;
    }

    .nsd-date {
        font-size: 16px;
        margin-top: 20px;
    }

    .nsd-article {
        margin-top: 60px;
    }

    .nsd-article p,
    .nsd-article li {
        font-size: 16px;
    }

    .nsd-article img,
    .nsd-article .wp-block-image {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .nsd-nav {
        margin-top: 40px;
        padding-top: 28px;
    }
}

@media screen and (max-width: 600px) {
    .page-banner--news-detail {
        height: 140px;
    }

    .nsd-content-wrap {
        margin-top: -30px;
    }

    .nsd-body {
        padding-top: 24px;
    }

    .nsd-title {
        font-size: 20px;
    }

    .nsd-date {
        font-size: 14px;
        margin-top: 14px;
    }

    .nsd-article {
        margin-top: 40px;
    }

    .nsd-article p,
    .nsd-article li {
        font-size: 15px;
        line-height: 1.7;
    }

    .nsd-article img,
    .nsd-article .wp-block-image {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .nsd-nav {
        flex-direction: column;
        gap: 20px;
        min-height: auto;
    }

    .nsd-nav__prev,
    .nsd-nav__next {
        align-items: center;
    }
}
