/* ==========================================================================
   资讯中心页（news.html）
   --------------------------------------------------------------------------
   板块顺序：Hero（标题）-> Featured articles（左大卡 + 右三条）
             -> 新闻列表（左缩略图 + 右正文）-> 分页 -> 推荐产品
   本文件自成一套，不依赖其他页面的样式表，避免跨页耦合。
   配色沿用站内约定：紫色渐变走 var(--zs-btn-grad)，卡片圆角 16~18px，
   投影 rgba(76, 29, 149, .x)。
   ========================================================================== */

/* ==========================================================================
   Hero
   --------------------------------------------------------------------------
   Hero 里只有一个标题，上下内边距取 52/58，与 tools.html 的 .th-hero 同节奏。
   ========================================================================== */
.nw-hero{
    display: block;
    position: relative;
    padding: 14px 0 58px 0;
    background-color: #f6f6f6;
    /* 渐变起点用 #dcc7fb，比 #ece3fd 深一档；浅了整块看着发灰、像蒙了层雾 */
    background-image: linear-gradient(180deg,
        #dcc7fb 0%,
        #e3d3fb 26%,
        #ebe1fb 50%,
        #f2edfa 74%,
        #f6f6f6 100%);
    overflow: hidden;
}
/* 两团柔光。用 radial-gradient 自带淡出，不用实色块 + blur（那会溢出，
   裁切处会切出笔直硬边） */
.nw-hero::before{
    content: "";
    position: absolute;
    left: -6%;
    top: -40%;
    width: 46%;
    height: 150%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(43, 127, 255, .2) 0%, rgba(43, 127, 255, 0) 70%);
    pointer-events: none;
}
.nw-hero::after{
    content: "";
    position: absolute;
    right: -6%;
    top: -46%;
    width: 46%;
    height: 150%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(195, 31, 209, .19) 0%, rgba(195, 31, 209, 0) 70%);
    pointer-events: none;
}
.nw-hero .zs-wp{
    position: relative;
    z-index: 2;
    text-align: center;
}
/* 面包屑挪进 hero，让 banner 渐变一路盖到页眉下沿，中间不再留白条。
   处理方式与 tools-hub.css 的 .th-hero .path 一致：扳回左对齐、
   把标题间距交给 .path 的下内边距、分隔符压深一档。 */
.nw-hero .path{
    padding: 8px 0 30px 0;
}
.nw-hero .path .zs-wp{
    text-align: left;
}
.nw-hero .path span{
    color: #6b6280;
}
.nw-hero .nw-title{
    display: block;
    margin: 0;
    font-size: 44px;
    line-height: 1.18;
    letter-spacing: -.02em;
    font-weight: 800;
    color: #170b33;
}
/* 后半截走站内按钮渐变的裁字效果 */
.nw-hero .nw-title em{
    font-style: normal;
    background: var(--zs-btn-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: #2B7FFF;
}
@supports (-webkit-text-fill-color: transparent){
    .nw-hero .nw-title em{
        -webkit-text-fill-color: transparent;
    }
}
/* 只给读屏用的标签 */
.nw-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   日期
   ========================================================================== */
.nwf-date{
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: #7c7690;
}

/* ==========================================================================
   Featured articles
   --------------------------------------------------------------------------
   左侧一张带图大卡，右侧三条只有文字的紧凑列，用横线分隔。
   ========================================================================== */
.nw-feat{
    display: block;
    padding: 56px 0 0 0;
}
.nw-feat .nwf-head{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}
.nw-feat .nwf-ico{
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #FFFFFF;
    background: var(--zs-btn-grad);
}
.nw-feat .nwf-ico svg{
    display: block;
    width: 18px;
    height: 18px;
}
.nw-feat .nwf-title{
    display: block;
    flex: none;
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #170b33;
}
/* 标题右侧补一条渐隐横线，和参考版式一致 */
.nw-feat .nwf-head::after{
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(124, 58, 237, .28) 0%, rgba(124, 58, 237, 0) 100%);
}
.nw-feat .nwf-grid{
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}
/* --- 左侧大卡 --- */
.nw-feat .nwf-main{
    display: block;
    border: 1px solid #ddd0f4;
    border-radius: 10px;
    background: #FFFFFF;
    overflow: hidden;
    box-shadow: 0 12px 30px -22px rgba(46, 16, 101, .34);
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.nw-feat .nwf-main:hover{
    border-color: #b28cf0;
    transform: translateY(-4px);
    box-shadow: 0 26px 50px -26px rgba(76, 29, 149, .42);
}
/* 图自己也要带上圆角：卡片圆角 10px、边框 1px，内圈半径是 9px。
   只靠卡片的 overflow:hidden 裁，四角会和边框错开一点，露出白色缺口。 */
.nw-feat .nwfm-pic{
    display: block;
    background: #f1ecfb;
    border-radius: 9px 9px 0 0;
    overflow: hidden;
}
.nw-feat .nwfm-pic img{
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 416 / 300;
    object-fit: cover;
    transition: transform .6s ease;
}
.nw-feat .nwf-main:hover .nwfm-pic img{
    transform: scale(1.05);
}
.nw-feat .nwfm-body{
    display: block;
    padding: 22px 24px 24px 24px;
}
.nw-feat .nwfm-name{
    display: block;
    margin: 14px 0 0 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
    color: #170b33;
}
.nw-feat .nwfm-name a{
    color: inherit;
    transition: color .3s ease;
}
.nw-feat .nwfm-name a:hover{
    color: #6d28d9;
}
.nw-feat .nwfm-body .nwf-date{
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e6ddf7;
}
/* --- 右侧三条 --- */
.nw-feat .nwf-side{
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nw-feat .nwf-side li{
    display: block;
    padding: 0 0 22px 0;
    margin-bottom: 22px;
    border-bottom: 1px solid #e6ddf7;
}
.nw-feat .nwf-side li:last-child{
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}
.nw-feat .nwfs-name{
    display: block;
    margin: 12px 0 14px 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    color: #170b33;
}
.nw-feat .nwfs-name a{
    color: inherit;
    transition: color .3s ease;
}
.nw-feat .nwfs-name a:hover{
    color: #6d28d9;
}

/* ==========================================================================
   新闻列表
   --------------------------------------------------------------------------
   左缩略图 + 右侧标题 / 描述 / Read more / 日期。
   缩略图的长宽比按原列表（416 x 300 = 1.387）放大 10% -> 1.526，
   所以同样宽度下会矮一点、更接近横幅比例。
   ========================================================================== */
.nw-list{
    display: block;
    padding: 52px 0 0 0;
}
.nw-list ul{
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nw-list li{
    display: block;
}
.nw-list li + li{
    margin-top: 22px;
}
.nw-list .nwl-row{
    display: flex;
    align-items: stretch;
    gap: 26px;
    padding: 20px;
    border: 1px solid #ddd0f4;
    border-radius: 10px;
    background-color: #FFFFFF;
    background-image: none;
    box-shadow: 0 10px 26px -22px rgba(46, 16, 101, .3);
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.nw-list .nwl-row:hover{
    border-color: #b28cf0;
    transform: translateY(-4px);
    box-shadow: 0 26px 50px -26px rgba(76, 29, 149, .42);
}
.nw-list .nwl-pic{
    display: block;
    flex: 0 0 340px;
    width: 340px;
    border-radius: 8px;
    background: #f1ecfb;
    overflow: hidden;
}
/* 图片继承容器的圆角，避免和容器的裁切边缘错开 */
.nw-list .nwl-pic img,
.nw-feat .nwfm-pic img{
    border-radius: inherit;
}
.nw-list .nwl-pic img{
    display: block;
    width: 100%;
    height: 100%;
    /* 1.387 x 1.1 = 1.526 */
    aspect-ratio: 1.526;
    object-fit: cover;
    transition: transform .6s ease;
}
.nw-list .nwl-row:hover .nwl-pic img{
    transform: scale(1.05);
}
/* 内容整体在卡片里垂直居中：卡片高度由左边的图撑着，
   原来用 margin-top:auto 把 Read More 顶到底，中间会空出一大块 */
.nw-list .nwl-body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 6px 4px 0;
}
.nw-list .nwl-name{
    display: block;
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.45;
    color: #170b33;
}
.nw-list .nwl-name a{
    color: inherit;
    transition: color .3s ease;
}
.nw-list .nwl-name a:hover{
    color: #6d28d9;
}
.nw-list .nwl-desc{
    display: -webkit-box;
    margin: 10px 0 0 0;
    font-size: 15px;
    line-height: 1.75;
    color: #575167;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* Read more 与日期贴到卡片底部，多行标题也不会把它顶乱 */
.nw-list .nwl-foot{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 16px;
}
.nw-list .nwl-btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    font-size: 14.5px;
    font-weight: 600;
    color: #6d28d9;
    border: 1px solid #c3a5f3;
    border-radius: 9px;
    background: rgba(139, 92, 246, .1);
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}
.nw-list .nwl-btn:hover{
    color: #FFFFFF;
    border-color: transparent;
    background: var(--zs-btn-grad);
}
.nw-list .nwl-btn svg{
    display: block;
    flex: none;
    width: 16px;
    height: 16px;
    transition: transform .3s ease;
}
.nw-list .nwl-btn:hover svg{
    transform: translateX(3px);
}
.nw-list .nwl-date{
    display: block;
    margin-left: auto;
    font-size: 13.5px;
    color: #8b8698;
}

/* ==========================================================================
   分页
   ========================================================================== */
.nw-pager{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 44px 0 10px 0;
}
.nw-pager a,
.nw-pager span{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: #4b4361;
    border: 1px solid #d8cff0;
    border-radius: 9px;
    background: #FFFFFF;
    transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.nw-pager a:hover{
    color: #6d28d9;
    border-color: rgba(139, 92, 246, .45);
}
.nw-pager .cur{
    color: #FFFFFF;
    font-weight: 600;
    border-color: transparent;
    background: var(--zs-btn-grad);
}
.nw-pager .gap{
    border-color: transparent;
    background: transparent;
    color: #a5a1b0;
}
.nw-pager .nw-pnav svg{
    display: block;
    width: 16px;
    height: 16px;
}
.nw-pager .disabled{
    opacity: .42;
    cursor: default;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media only screen and (max-width:1440px){
    .nw-hero{
        padding: 14px 0 56px 0;
    }
    .nw-hero .nw-title{
        font-size: 38px;
    }
    .nw-feat .nwf-grid{
        grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
        gap: 28px;
    }
    .nw-list .nwl-pic{
        flex: 0 0 300px;
        width: 300px;
    }
}

@media only screen and (max-width:1280px){
    .nw-hero .nw-title{
        font-size: 34px;
    }
    .nw-feat .nwf-title{
        font-size: 23px;
    }
    .nw-feat .nwfm-name,
    .nw-feat .nwfs-name{
        font-size: 17.5px;
    }
    .nw-list .nwl-name{
        font-size: 19px;
    }
    .nw-list .nwl-pic{
        flex: 0 0 264px;
        width: 264px;
    }
}

/* 平板：精选改上下堆叠，推荐卡降两列 */
@media only screen and (max-width:1023px){
    .nw-hero{
        padding: 12px 0 52px 0;
    }
    .nw-hero .path{
        padding: 6px 0 24px 0;
    }
    .nw-hero .nw-title{
        font-size: 28px;
    }
    .nw-feat{
        padding-top: 42px;
    }
    .nw-feat .nwf-grid{
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }
    .nw-feat .nwfm-pic img{
        aspect-ratio: 16 / 7;
    }
    .nw-list{
        padding-top: 40px;
    }
    .nw-list .nwl-pic{
        flex: 0 0 240px;
        width: 240px;
    }
    .nw-list .nwl-name{
        font-size: 18px;
    }
    .nw-list .nwl-desc{
        font-size: 14.5px;
    }
    .nw-pager{
        padding-top: 34px;
    }
}

/*Mobile v1*/
@media only screen and (max-width:767px){
.nw-hero{
    padding: 10px 0 46px 0;
}
.nw-hero .path{
    padding: 4px 0 20px 0;
}
.nw-hero .nw-title{
    font-size: 23px;
}
.nw-feat{
    padding-top: 32px;
}
.nw-feat .nwf-head{
    gap: 10px;
    margin-bottom: 20px;
}
.nw-feat .nwf-title{
    font-size: 20px;
}
.nw-feat .nwfm-body{
    padding: 18px 18px 20px 18px;
}
.nw-feat .nwfm-name,
.nw-feat .nwfs-name{
    font-size: 16.5px;
}
.nw-feat .nwf-side li{
    padding-bottom: 18px;
    margin-bottom: 18px;
}
/* 手机上列表改上下堆叠，图片回到接近 16:9 */
.nw-list{
    padding-top: 30px;
}
.nw-list li + li{
    margin-top: 16px;
}
.nw-list .nwl-row{
    flex-direction: column;
    gap: 16px;
    padding: 14px;
    border-radius: 10px;
}
.nw-list .nwl-pic{
    flex: none;
    width: 100%;
    border-radius: 8px;
}
.nw-list .nwl-pic img{
    aspect-ratio: 16 / 9;
}
.nw-list .nwl-body{
    padding: 0 2px 2px 2px;
}
.nw-list .nwl-name{
    margin-top: 10px;
    font-size: 17px;
}
.nw-list .nwl-desc{
    font-size: 14px;
    line-height: 1.7;
}
.nw-list .nwl-foot{
    padding-top: 14px;
    gap: 10px 14px;
}
.nw-list .nwl-btn{
    height: 38px;
    padding: 0 16px;
    font-size: 14px;
}
.nw-pager{
    padding-top: 26px;
    gap: 6px;
}
.nw-pager a,
.nw-pager span{
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 14px;
}
}

/* ==========================================================================
   分页：后台 {$page|raw} 输出 <ul class="pagination"><li>…</li></ul>，
   这里把 ul/li 拍平，让里面的 a/span 直接沿用上面 .nw-pager a / span 的样式
   ========================================================================== */
.nw-pager .pagination{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: inherit;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nw-pager .pagination li{
    list-style: none;
}
.nw-pager .pagination .active span{
    color: #FFFFFF;
    font-weight: 600;
    border-color: transparent;
    background: var(--zs-btn-grad);
}
.nw-pager .pagination .gap span{
    border-color: transparent;
    background: transparent;
    color: #a5a1b0;
}
.nw-pager .pagination svg{
    display: block;
    width: 16px;
    height: 16px;
}
