/* ==========================================================================
   新闻详情页（NEWS DETAIL）
   ========================================================================== */

/* ---------------- 页头 Banner（与 WHY CHOOSE US 同图） ---------------- */
.banner {
    width: 100%;
    height: clamp(220px, 26vw, 420px);
    position: relative;
    background: var(--c-primary);
}

.banner .swiper {
    width: 100%;
    height: 100%;
}

.banner .swiper-slide {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    overflow: hidden;
}

.banner .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner .swiper-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 25, 47, .15) 0%, rgba(10, 25, 47, .35) 100%);
    pointer-events: none;
}

.banner .swiper-pagination-bullet-active {
    background: #fff !important;
    border-radius: 5px;
    width: 28px;
}

/* ---------------- 正文区 ---------------- */
.NEWS_DETAIL {
    background: var(--c-bg);
    padding: 70px 0 100px;
}

.NEWS_DETAIL .NEWS_DETAIL_w {
    max-width: 900px;
}

/* 面包屑 */
.crumb {
    font-size: 14px;
    color: var(--c-text-2);
    margin-bottom: 28px;
}

.crumb a {
    color: var(--c-text-2);
    transition: color .25s ease;
}

.crumb a:hover {
    color: var(--c-accent);
}

.crumb span {
    margin: 0 10px;
    color: #c3cad6;
}

.crumb em {
    font-style: normal;
    color: var(--c-primary);
}

/* 文章 */
.article {
    background: #fff;
    padding: 50px 56px 46px;
}

.article .article-title {
    font-size: clamp(24px, 3vw, 34px);
    color: var(--c-primary);
    line-height: 1.35;
    letter-spacing: .5px;
}

.article .article-meta {
    margin-top: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--c-text-2);
}

.article .article-meta .meta-date {
    position: relative;
    padding-left: 20px;
}

.article .article-meta .meta-date::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    background: var(--c-accent);
}

.article .article-meta .meta-cat {
    padding: 2px 12px;
    border: 1px solid var(--c-line);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--c-primary);
}

/* 封面 */
.article .article-cover {
    margin-top: 34px;
    overflow: hidden;
}

.article .article-cover img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

/* 正文 */
.article .article-body {
    margin-top: 34px;
}

.article .article-body p {
    color: var(--c-text);
    font-size: 15px;
    line-height: 2;
    margin-bottom: 20px;
}

.article .article-body p:first-child {
    font-size: 16px;
    color: #3d4757;
}

/* ---------------- 上下篇导航（兼容 PbootCMS precontent / nextcontent） ---------------- */
.article .article-nav {
    margin-top: 44px;
    padding-top: 30px;
    border-top: 1px solid var(--c-line);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 18px;
    flex-wrap: nowrap;
    font-size: 0;          /* 隐藏模板里的 PREC: / NEXT: 裸文字 */
    line-height: 0;
}

/* 每篇作为卡片：上方小标签 + 下方标题 */
.article .article-nav a {
    flex: 0 1 48%;
    max-width: 48%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .2px;
    color: var(--c-primary);
    overflow: hidden;
    transition: border-color .3s ease, box-shadow .3s ease, color .3s ease, transform .3s ease;
}

/* 上/下一篇标签 */
.article .article-nav a::before {
    display: block;
    flex: none;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 1.5px;
    color: var(--c-text-2);
    transition: color .3s ease;
}

.article .article-nav a:first-of-type::before {
    content: "← PREVIOUS NEWS";
}

.article .article-nav a:last-of-type::before {
    content: "NEXT NEWS →";
}

/* 悬停 */
.article .article-nav a:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    box-shadow: 0 6px 18px rgba(239, 130, 0, .12);
    transform: translateY(-2px);
}

.article .article-nav a:hover::before {
    color: var(--c-accent);
}

/* 只有一篇（首篇或末篇）时靠左显示，标签只保留一个 */
.article .article-nav a:only-of-type {
    flex: 0 1 48%;
    max-width: 48%;
    margin-right: auto;
}

.article .article-nav a:only-of-type::before {
    content: "← PREVIOUS NEWS";
}

/* 兼容旧版按钮类名（服务器模板未使用，保留不影响） */
.article .article-nav .btn-back,
.article .article-nav .btn-next {
    color: var(--c-primary);
    border: 1px solid var(--c-line);
    background: #fff;
}

.article .article-nav .btn-next {
    margin-left: auto;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
    .NEWS_DETAIL {
        padding: 50px 0 64px;
    }

    .article {
        padding: 36px 30px 34px;
    }
}

@media (max-width: 560px) {
    .NEWS_DETAIL {
        padding: 36px 0 52px;
    }

    .article {
        padding: 26px 20px 26px;
    }

    .article .article-body p {
        font-size: 14px;
        line-height: 1.9;
    }

    .article .article-nav {
        margin-top: 32px;
        padding-top: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .article .article-nav a,
    .article .article-nav a:only-of-type {
        flex: 1 1 auto;
        max-width: 100%;
        padding: 14px 16px;
        font-size: 13px;
        margin-right: 0;
    }
}
