/* ==========================================================================
   News / Blogs article detail page (ldcms template: detail_news.html)

   All numbers below are measured pixel-for-pixel from the 1920px design and
   expressed against the 1520px content container:
     article column 948 | gap 226 | recommendation column 346
   ========================================================================== */

/* ---------- Hero: same banner as the list page ---------- */
.nd-hero-title {
    margin: 0 0 12px;
    font-size: var(--fs-h2);
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
}

/* ---------- Section ---------- */
.nd-sec {
    padding: 70px 0 65px;
    background: #fff;
}
.nd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 346px;
    column-gap: 170px;
    align-items: start;
}

/* ---------- Article ---------- */
.nd-title {
    /* 标题内容宽度上限 775px，居中显示；列宽不足时自动收缩，无需额外断点 */
    width: 100%;
    max-width: 775px;
    margin: 0 auto 15px;
    text-align: center;
    font-size: var(--fs-h3);
    line-height: 40px;
    font-weight: 700;
    color: var(--ink);
}
.nd-date {
    margin: 0 0 20px;
    text-align: center;
    font-size: var(--fs-small);
    line-height: 24px;
    color: #33363c;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e8ec;
}

/* The rich text comes from the backend and carries inline sizes/colours set
   in the editor; reset them here so the article matches the design type scale. */
.nd-body {
    font-size: var(--fs-body);
    line-height: 28px;
    color: #33363c;
    word-break: break-word;
}
.nd-body :where(p, span, font, div, li, td) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    letter-spacing: normal !important;
}
.nd-body p {
    margin: 0 0 20px;
    text-indent: 0 !important;
}
.nd-body > p:last-child { margin-bottom: 0; }
.nd-body img {
    width: 100%;
    height: auto;
    margin: 28px 0;
}
.nd-body a {
    color: var(--red);
    text-decoration: underline;
}
.nd-body h2, .nd-body h3, .nd-body h4 {
    margin: 28px 0 14px;
    font-size: var(--fs-h4);
    line-height: 1.4;
    font-weight: 700;
    color: var(--ink);
}

/* ---------- Prev / next (no divider above it in the design) ---------- */
.nd-pn {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 74px;
    margin-top: 60px;
}
.nd-pn-item { min-width: 0; }
.nd-pn-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--fs-h5);
    line-height: 28px;
    font-weight: 700;
    color: var(--ink);
}
.nd-pn-link {
    display: block;
    font-size: var(--fs-lead);
    line-height: 28px;
    color: #33363c;
    /* long titles are truncated with an ellipsis, as in the design */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
a.nd-pn-link:hover { color: var(--red); }

/* ---------- Recommendation ---------- */
.nd-side-title {
    position: relative;
    margin: 0 0 40px;
    padding-left: 12px;
    font-size: var(--fs-h3);
    line-height: 1.2;
    font-weight: 700;
    color: var(--ink);
}
/* red vertical bar before the heading: 3px x 26px, 5px clear of the text */
.nd-side-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 26px;
    transform: translateY(-50%);
    background: var(--red);
}
.nd-side-list li {
    padding: 30px 0 30px;
    border-top: 1px solid #e5e7eb;
}
.nd-side-date {
    margin: 0 0 14px;
    font-size: var(--fs-body);
    line-height: 24px;
    color: #33363c;
}
.nd-side-link {
    display: block;
    font-size: var(--fs-body);
    line-height: 28px;
    color: #33363c;
}
.nd-side-link:hover { color: var(--red); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1440px) {
    .nd-layout { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 90px; }
}

@media (max-width: 991px) {
    .nd-layout { grid-template-columns: minmax(0, 1fr); row-gap: 70px; }
    .nd-side { padding-top: 0; }
    .nd-pn { column-gap: 40px; }
}

@media (max-width: 767px) {
    .nd-sec { padding: 34px 0 60px; }
    .nd-title { font-size: 26px; line-height: 36px; margin: 0 auto 10px; }
    .nd-date { margin-bottom: 26px; }
    .nd-body { font-size: 16px; line-height: 26px; }
    .nd-body p { margin-bottom: 16px; }
    .nd-body img { margin: 18px 0; }
    .nd-pn { grid-template-columns: minmax(0, 1fr); row-gap: 24px; margin-top: 36px; }
    .nd-pn-label, .nd-pn-link { font-size: 16px; line-height: 26px; }
    .nd-side-title { font-size: 22px; margin-bottom: 28px; }
    .nd-side-title::before { height: 22px; }
    .nd-side-list li { padding: 24px 0 26px; }
    .nd-side-link { font-size: 16px; line-height: 26px; }
}

@media (max-width: 575px) {
    .nd-hero-title { font-size: 34px; }
}
