/* ==========================================================================
   新闻中心列表页专用样式  newslist.css
   作用域：.nl-* 前缀，与站内其它页面零冲突
   设计基线：
     主色 #ce010b（品牌红）  深文 #1f2328  次文 #5b6470  浅文 #9aa4b2
     分割线 #eceff3  卡片面 #ffffff  页面底 #f6f7f9
   版式：Hero（标题+面包屑）→ 工具条 → 头条大卡 + 三列网格 → 品牌分页
   ========================================================================== */

/* ---------- 1. 页面骨架 ---------- */
.nl-page {
    background: #f6f7f9;
    color: #1f2328;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* 顶部 fixed 导航栏高度补偿 */
    padding-top: 78px;
    line-height: 1.7;
}

.nl-wrap {
    width: calc(100% - 48px);
    max-width: 1472px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 2. Hero 头部 ---------- */
.nl-hero {
    position: relative;
    /* 与文章详情页 .banner-sub 完全同宽、同圆角 */
    width: calc(100% - 48px);
    max-width: 1472px;
    min-height: 296px;
    /* .nl-page 已有 78px 导航补偿，+20px = 98px，与 .banner-sub 的 margin-top 一致 */
    margin: 20px auto 22px;
    border-radius: 20px;
    border: 1px solid rgba(17, 20, 24, .085);
    box-shadow: 0 12px 34px rgba(17, 20, 24, .07);
    overflow: hidden;
    background: #fff;
    isolation: isolate;
}

/* 纯 CSS 渐变背景：全站顶部统一不再使用产品照片，
   与内页 .banner-sub 深色圆角 Hero 同一套视觉语言 */
.nl-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, #ce010b 0%, #e8322a 18%, #1b1e23 58%, rgba(27, 30, 35, 0) 90%) 0 0 / 100% 3px no-repeat,
        radial-gradient(680px 340px at 86% 6%, rgba(17, 20, 24, .022), transparent 72%),
        linear-gradient(120deg, #ffffff 0%, #fdfdfe 54%, #f6f7f9 100%);
    opacity: 1;
}

/* 超大品牌水印字 */
.nl-hero__bg::after {
    content: "SAINTCOOK";
    position: absolute;
    right: -26px;
    bottom: -46px;
    font-size: 148px;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1;
    color: rgba(17, 20, 24, .055);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* 背景本身已是深色，遮罩只补足文字区对比度 */
.nl-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .50) 0%, rgba(255, 255, 255, 0) 58%);
}

.nl-hero__inner {
    position: relative;
    /* 卡片自身已限宽，内层只留与 .nl-wrap 相同的 24px 内边距，保证上下左右对齐 */
    padding: 50px 24px 54px;
    max-width: none;
    margin: 0;
}

.nl-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ce010b;
    margin: 0 0 14px;
}

.nl-hero__eyebrow::before {
    content: '';
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: #ce010b;
}

.nl-hero__title {
    margin: 0;
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #14171c;
}

.nl-hero__title em {
    font-style: normal;
    color: #ce010b;
}

.nl-hero__desc {
    margin: 16px 0 0;
    max-width: 540px;
    font-size: 15.5px;
    line-height: 1.85;
    color: #5d646e;
}

/* 面包屑：首页 > 新闻中心 */
.nl-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #8a9099;
}

.nl-crumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nl-crumb li + li::before {
    content: '/';
    color: rgba(17, 20, 24, .28);
}

.nl-crumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color .2s ease;
}

.nl-crumb a:hover {
    color: #ce010b;
}

.nl-crumb li:last-child {
    color: #fff;
    font-weight: 600;
}

/* ---------- 3. 工具条 ---------- */
.nl-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 26px 0 20px;
}

.nl-bar__title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2328;
}

.nl-bar__title span {
    font-size: 13px;
    font-weight: 400;
    color: #9aa4b2;
}

.nl-bar__title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: #ce010b;
    margin-right: 2px;
    transform: translateY(2px);
}

.nl-bar__count {
    font-size: 13px;
    color: #9aa4b2;
}

/* ---------- 4. 卡片网格 ---------- */
.nl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 8px;
}

/* ---------- 5. 单张卡片 ---------- */
.nl-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease;
}

.nl-card:hover {
    transform: translateY(-6px);
    border-color: rgba(206, 1, 11, .28);
    box-shadow: 0 18px 38px -14px rgba(24, 32, 46, .28);
}

.nl-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef0f3;
}

.nl-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 信息图 4:3，容器同比例，完整显示不裁字 */
    object-position: center;
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.nl-card:hover .nl-card__media img {
    transform: scale(1.05);
}

/* 日期：置于图片下方文字区，避免遮挡信息图底部数据块 */
.nl-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #9aa4b2;
}

.nl-card__date i {
    font-size: 11px;
    opacity: .85;
}

.nl-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
}

.nl-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid #f0f2f5;
}

.nl-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    color: #9aa4b2;
    word-break: break-all;
}

/* 标签前的图标 */
.nl-card__tag i {
    font-size: 11px;
    opacity: .8;
}

.nl-card__title {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 700;
    color: #1f2328;
    /* 固定两行，保证同排卡片高度一致 */
    height: 51px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s ease;
}

.nl-card:hover .nl-card__title {
    color: #ce010b;
}

.nl-card__desc {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: #5b6470;
    /* 固定两行，配合底部分隔线与关键词行对齐 */
    height: 48.6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* 摘要不再首行缩进 */
    text-indent: 0;
}

.nl-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #9aa4b2;
    white-space: nowrap;
    transition: color .2s ease, gap .2s ease;
}

.nl-card__more i {
    font-size: 11px;
}

.nl-card:hover .nl-card__more {
    color: #ce010b;
    gap: 10px;
}

/* ---------- 6. 头条大卡（第一篇） ---------- */
.nl-lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease;
}

.nl-lead:hover {
    transform: translateY(-4px);
    border-color: rgba(206, 1, 11, .28);
    box-shadow: 0 20px 44px -16px rgba(24, 32, 46, .3);
}

.nl-lead__media {
    position: relative;
    /* 与 4:3 信息图原生比例一致，避免裁掉底部数据块 */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef0f3;
}

.nl-lead__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.nl-lead:hover .nl-lead__media img {
    transform: scale(1.04);
}

.nl-lead__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 6px;
    background: #ce010b;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 6px 16px rgba(206, 1, 11, .38);
}

.nl-lead__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px 36px;
}

.nl-lead__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #9aa4b2;
}

.nl-lead__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nl-lead__title {
    margin: 0;
    font-size: clamp(20px, 2.3vw, 27px);
    line-height: 1.42;
    font-weight: 800;
    color: #1f2328;
    transition: color .2s ease;
}

.nl-lead:hover .nl-lead__title {
    color: #ce010b;
}

.nl-lead__desc {
    margin: 14px 0 0;
    font-size: 14.5px;
    line-height: 1.9;
    color: #5b6470;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-indent: 0;
}

.nl-lead__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 22px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #ce010b;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.nl-lead:hover .nl-lead__cta {
    background: #b30009;
    transform: translateX(3px);
    box-shadow: 0 8px 20px rgba(206, 1, 11, .32);
}

/* ---------- 7. 分页 ---------- */
.nl-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 40px 0 8px;
}

.nl-pager a,
.nl-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e3e7ec;
    border-radius: 10px;
    background: #fff;
    color: #5b6470;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}

.nl-pager a:hover {
    border-color: #ce010b;
    color: #ce010b;
    transform: translateY(-2px);
}

.nl-pager .page-num-current,
.nl-pager .nl-pager__cur {
    background: #ce010b;
    border-color: #ce010b;
    color: #fff;
    box-shadow: 0 6px 16px rgba(206, 1, 11, .28);
}

/* PbootCMS 输出的 page-num 是 a 标签，需额外覆盖 */
.nl-pager a.page-num-current {
    background: #ce010b;
    border-color: #ce010b;
    color: #fff;
}

.nl-pager .page-num[aria-disabled='true'],
.nl-pager a.nl-pager__off {
    opacity: .4;
    pointer-events: none;
}

.nl-pager__total {
    margin-left: 6px;
    font-size: 13px;
    color: #9aa4b2;
}

/* ---------- 8. 空状态 ---------- */
.nl-empty {
    padding: 80px 0 96px;
    text-align: center;
    color: #9aa4b2;
    font-size: 15px;
}

.nl-empty i {
    display: block;
    font-size: 40px;
    margin-bottom: 16px;
    opacity: .35;
}

/* ---------- 9. 底部 CTA ---------- */
/* 说明：CTA 已改为通栏样式，统一由 static/css/footer.css 的 .nl-cta 接管，
   此处不再重复定义，避免两处规则冲突。 */


/* ---------- 10. 响应式 ---------- */
@media (max-width: 1100px) {
    .nl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nl-lead {
        grid-template-columns: minmax(0, 1fr);
    }

    .nl-lead__body {
        padding: 26px 24px 30px;
    }
}

@media (max-width: 767px) {
    .nl-page {
        padding-top: 64px;
    }

    .nl-wrap {
        width: calc(100% - 28px);
        padding: 0 16px;
    }

    .nl-hero {
        width: calc(100% - 28px);
        min-height: 0;
        /* .nl-page 64px + 22px = 86px，与窄屏 .banner-sub 一致 */
        margin: 22px auto 16px;
        border-radius: 16px;
    }

    .nl-hero__inner {
        padding: 34px 16px 38px;
    }

    .nl-hero__desc {
        font-size: 14px;
    }

    .nl-hero__bg::after {
        font-size: 68px;
        right: -12px;
        bottom: -18px;
        color: rgba(17, 20, 24, .022);
    }

    .nl-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .nl-card__title {
        font-size: 16px;
    }
}
