/* 新闻详情 — 左侧主栏对齐 news.aspx 卡片风格 */

body.page-news-detail .header-spacer {
    margin-bottom: 0 !important;
}

/*
 * 全局 zhima/common.css 有 body{ overflow:hidden }，会彻底打断 position:sticky。
 * 详情页两侧都放开；横向裁切用 clip，避免出现横向滚动条。
 */
html:has(body.page-news-detail),
html:has(.news-layout--detail),
body.page-news-detail,
body.page-news-detail.site-page,
body:has(.news-layout--detail) {
    overflow: visible !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/*
 * 双栏：外层 stretch 拉高侧栏容器，内层 .news-aside__stick 做 sticky。
 * （sticky 直接加在 height:fit-content 的列上时，可滚动区间为 0，等于没效果）
 */
.news-layout--detail {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    column-gap: 20px;
    row-gap: 0;
    grid-template-columns: none;
    position: relative;
}

/* 面包屑在双栏上方通栏，左右卡片顶边对齐 */
.news-section__head--detail {
    grid-column: auto;
    grid-row: auto;
    margin: 0 0 12px;
    padding: 0 2px;
}

.news-layout--detail .news-main {
    flex: 1 1 auto;
    min-width: 0;
}

.news-layout--detail .news-aside {
    flex: 0 0 280px;
    width: 280px;
    align-self: stretch;
    position: relative !important;
    top: auto !important;
    height: auto !important;
    display: block;
    gap: 0;
    z-index: 2;
    overflow: visible !important;
}

.news-layout--detail .news-aside__stick {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.news-detail__crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ny-muted);
    line-height: 1.4;
}

.news-detail__crumb a {
    color: var(--ny-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-detail__crumb a:hover {
    color: var(--ny-brand-dark);
}

.news-detail__crumb-sep {
    color: #c5cbd1;
}

.news-detail__crumb-current {
    color: #5f6b76;
}

/* 左侧正文卡片：与列表项同一套圆角 / 阴影 / 边框 */
.news-detail {
    margin: 0;
    padding: 22px 24px 20px;
    border: 1px solid rgba(31, 35, 41, 0.04);
    border-radius: var(--ny-radius);
    background: #fff;
    box-shadow: var(--ny-shadow);
    overflow: hidden;
}

.news-detail__title {
    margin: 0;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ny-text);
    text-align: center;
    word-break: break-word;
}

.news-detail__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ny-line);
    font-size: 12px;
    color: var(--ny-meta);
    line-height: 1.2;
    position: relative;
}

.news-detail__font {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.news-detail__font-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e2e8ee;
    border-radius: 6px;
    background: #f7f9fb;
    color: #6a7682;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.news-detail__font-btn:hover {
    color: #067db2;
    border-color: rgba(15, 187, 216, 0.45);
    background: rgba(15, 187, 216, 0.08);
}

.news-detail__font-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 187, 216, 0.2);
}

.news-detail__meta .meta-source {
    color: #5f6b76;
    font-weight: 600;
}

.news-detail__meta .meta-dot {
    color: #c5cbd1;
}

.news-detail__meta .meta-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--ny-brand-dark);
    font-size: 12px;
    line-height: 1.3;
    background: var(--ny-soft);
    font-weight: 500;
}

.news-detail__meta .meta-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    color: #a0adb8;
}

.news-detail__meta .meta-views i {
    font-size: 13px;
}

.news-detail__body {
    margin-top: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-detail__cover {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 18px;
    border-radius: 8px;
}

.news-detail__content {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.news-detail__content p {
    margin: 0 0 1em;
    line-height: 1.85;
}

.news-detail__content img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin: 12px auto;
    border-radius: 6px;
}

.news-detail__content table {
    max-width: 100%;
    width: auto !important;
}

.news-detail__content iframe,
.news-detail__content video,
.news-detail__content embed,
.news-detail__content object {
    max-width: 100% !important;
}

.news-detail__content pre,
.news-detail__content code {
    white-space: pre-wrap;
    word-break: break-word;
}

.news-detail__pager {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--ny-line);
}

.news-detail__pager-link {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.news-detail__pager-link--next {
    justify-content: flex-end;
    text-align: right;
}

.news-detail__pager-link > .bi {
    flex: 0 0 auto;
    font-size: 12px;
    color: #067db2;
}

.news-detail__pager-link:hover:not(.is-disabled) {
    background: var(--ny-soft);
    text-decoration: none;
    color: inherit;
}

.news-detail__pager-link:hover:not(.is-disabled) > .bi,
.news-detail__pager-link:hover:not(.is-disabled) .news-detail__pager-label,
.news-detail__pager-link:hover:not(.is-disabled) .news-detail__pager-title {
    color: var(--ny-brand-dark);
}

.news-detail__pager-link.is-disabled {
    opacity: 0.4;
    cursor: default;
}

.news-detail__pager-link.is-disabled > .bi {
    color: #9aa3ad;
}

.news-detail__pager-label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #067db2;
    white-space: nowrap;
}

.news-detail__pager-link.is-disabled .news-detail__pager-label {
    color: #8a9199;
}

.news-detail__pager-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.3;
    color: #5a6874;
}

.news-detail__related {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ny-line);
}

.news-detail__related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.news-detail__related-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2a33;
    line-height: 1.3;
}

.news-detail__related-new {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.4;
    vertical-align: middle;
}

.news-detail__related-more {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #067db2;
    text-decoration: none;
    white-space: nowrap;
}

.news-detail__related-more:hover {
    color: var(--ny-brand-dark);
    text-decoration: none;
}

.news-detail__related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e6edf3;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.news-detail__related-list > li {
    border-right: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.news-detail__related-list > li:nth-child(2n) {
    border-right: none;
}

.news-detail__related-list > li:nth-last-child(-n+2) {
    border-bottom: none;
}

.news-detail__related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 12px 10px 12px 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background 0.2s ease;
}

.news-detail__related-item:hover {
    background: var(--ny-soft);
    text-decoration: none;
    color: inherit;
}

.news-detail__related-num {
    flex: 0 0 auto;
    width: 26px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: rgba(15, 187, 216, 0.55);
    font-variant-numeric: tabular-nums;
}

.news-detail__related-item:hover .news-detail__related-num {
    color: #0fbbd8;
}

.news-detail__related-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 52px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #e8eef3;
    align-self: center;
}

.news-detail__related-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.35s ease;
}

.news-detail__related-thumb-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 0 4px;
    box-sizing: border-box;
    text-align: center;
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-all;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.news-detail__related-item:hover .news-detail__related-thumb img {
    transform: scale(1.08);
}

.news-detail__related-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-detail__related-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #243039;
    word-break: break-word;
}

.news-detail__related-item:hover .news-detail__related-name {
    color: var(--ny-brand-dark);
}

.news-detail__related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.news-detail__related-tag {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    color: #067db2;
    line-height: 1.2;
}

.news-detail__related-time {
    flex: 0 0 auto;
    font-size: 11px;
    color: #9aa3ad;
    line-height: 1.2;
}

.news-detail__related-arrow {
    flex: 0 0 auto;
    font-size: 12px;
    color: #c5ced6;
    transition: color 0.2s ease, transform 0.2s ease;
}

.news-detail__related-item:hover .news-detail__related-arrow {
    color: #0fbbd8;
    transform: translateX(2px);
}

.news-detail__foot {
    margin-top: 16px;
    padding-top: 0;
    border-top: none;
}

.news-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e6edf3;
    border-radius: 8px;
    background: #fff;
    color: #667788;
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.news-detail__back:hover {
    border-color: rgba(15, 187, 216, 0.45);
    color: var(--ny-brand-dark);
    background: var(--ny-soft);
}

@media (max-width: 992px) {
    .news-layout--detail {
        flex-direction: column;
    }

    .news-layout--detail .news-main,
    .news-layout--detail .news-aside {
        width: 100%;
        flex: none;
    }

    .news-layout--detail .news-aside {
        position: relative !important;
        top: auto !important;
        align-self: auto;
        min-height: 0 !important;
    }

    .news-layout--detail .news-aside__stick {
        position: static;
        top: auto;
    }

    .news-detail {
        padding: 18px 16px 16px;
    }

    .news-detail__title {
        font-size: 20px;
    }

    .news-detail__pager {
        flex-direction: column;
        gap: 2px;
    }

    .news-detail__pager-link--next {
        justify-content: flex-start;
        text-align: left;
    }

    .news-detail__related-list {
        grid-template-columns: 1fr;
    }

    .news-detail__related-list > li,
    .news-detail__related-list > li:nth-last-child(-n+2) {
        border-right: none;
        border-bottom: 1px solid #eef2f6;
    }

    .news-detail__related-list > li:last-child {
        border-bottom: none;
    }

    .news-detail__meta .meta-views {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .news-detail {
        padding: 16px 14px 14px;
        border-radius: 10px;
    }

    .news-detail__title {
        font-size: 18px;
        line-height: 1.45;
    }

    .news-detail__meta {
        margin-top: 12px;
        padding-bottom: 12px;
    }

    .news-detail__body {
        margin-top: 14px;
    }

    .news-detail__content,
    .news-detail__content p {
        font-size: 15px;
        line-height: 1.75;
    }
}
