@charset "UTF-8";

/* =========================================================
   news.css — 最新资讯（电脑端）
   对应设计稿：蓝湖「电脑端 最新资讯」1920 坐标系
   排版原则：与 about.css / certificates.css / global.css 保持一致
             · 区块内部一律 flex 排版（外边距定位）
             · 横向位置用 px（设计稿 1920 坐标系），纵向按设计稿 px
             · 切图按设计尺寸还原（width/height 用 px），避免缩放失真
             · 背景图、装饰图全部由 HTML 的 <img> 承载，
               CSS 只负责定位与尺寸，不再使用 background-image
   ========================================================= */

/* ---------- 1. 主题变量 ---------- */
:root {
    --news-gray: #f3f4f6;
    --news-navy: #090762;
    --news-rule: #d7d3d3;
    --news-text: #666666;
    --news-muted: #979797;

    /* 首屏 */
    --news-hero-h: 423px; /* 首屏区块高度 */
    --news-hero-bg-h: 421px; /* 首屏底图高度 */
    --news-hero-pad-x: 199px; /* 首屏内容左边距 */
    --news-hero-text-w: 661.98px; /* 首屏文案栏宽度 */
    --news-hero-photo-w: 537px;
    --news-hero-photo-h: 307px;
    --news-hero-btn-w: 207px;
    --news-hero-btn-h: 62px;

    /* 新闻列表 */
    --news-feed-h: 687px; /* 列表区块高度 */
    --news-feed-pad-x: 196px; /* 列表区块左边距 */
    --news-grid-w: 1274px; /* 卡片网格宽度 */
    --news-card-w: 414px; /* 常规卡片宽 */
    --news-card-h: 255px; /* 常规卡片高 */
    --news-card-1-w: 423px; /* 首张卡片宽 */
    --news-card-1-h: 266px; /* 首张卡片高 */
    --news-thumb-h: 138px; /* 缩略图高 */
    --news-summary-w: 369.396px; /* 摘要宽度 */

    /* 新闻类别侧栏 */
    --news-side-w: 336px;
    --news-side-h: 613px;
    --news-side-list-w: 235.19px;
}

/* ---------- 2. 通用区块 ---------- */
.news-page .section > .canvas {
    display: flex;
    flex-direction: column;
}

/* ---------- 3. 最新资讯 · 首屏 ---------- */
.news-hero {
    position: relative;
}

.news-page .news-hero .canvas {
    display: flex;
    flex-direction: column;
}

/* 首屏底图（HTML 中的装饰 <img>）
   以常规流排布在内容之前，内容用负外边距与之叠合，
   避免额外层叠上下文影响文字栅格化 */
.news-page .news-hero__bg {
    display: block;
    flex: 0 0 auto;
}

/* 首屏内容：左图 + 文案 + 按钮
   上移量 = 内容起始 58px − 底图占位 (1px + 421px) */
.news-hero__inner {
    position: absolute;
    top: 60px;
    margin: auto;
    display: flex;
    align-items: flex-start;
    padding: 0 0 0 var(--news-hero-pad-x);
}

.news-page .news-hero__photo {
    display: block;
    flex: 0 0 auto;
    width: var(--news-hero-photo-w);
}

.news-hero__text {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: var(--news-hero-text-w);
    margin-left: 56px;
}

.news-page .news-hero__title {
    margin: 29px 0 0;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    color: var(--news-navy);
    white-space: nowrap;
}

.news-page .news-hero__date {
    margin: 14px 0 0 2.99px;
    font-size: 24px;
    letter-spacing: -0.08em;
    font-weight: 400;
    line-height: 1;
    color: var(--news-text);
}

.news-page .news-hero__subtitle {
    margin: 81px 0 0 2.99px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    color: var(--news-text);
    white-space: nowrap;
    overflow: hidden;       /* 溢出隐藏 */
    text-overflow: ellipsis;/* 显示省略号 ... */
    width: 660px;
}

.news-page .news-hero__summary {
    margin: 17px 0 0 5.99px;
    font-size: 18.78px;
    font-weight: 400;
    line-height: 31px;
    color: var(--news-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 控制显示几行，这里是2行 */
    -webkit-box-orient: vertical;
}

/* 查看详情按钮（底图为 HTML 中的装饰 <img>） */
.news-hero__more {
    width: var(--news-hero-btn-w);
    height: 62px;
    line-height: 62px;
    text-align: center;
    margin: 19px 260px 0 0;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    background-color: #3b7de9;
    border-radius: 10px;
}

.news-hero__more:hover {
    opacity: 0.86;
}

/* ---------- 4. 新闻列表 ---------- */
.news-box {
    background-color: #EFEFEF;
}

/* 列表区：左卡片网格 + 右侧栏 */
.news-page .news-feed .canvas {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 60px 0 0 var(--news-feed-pad-x);
}

/* 卡片网格：三列两行 */
.news-feed__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
    border-top: 1px solid #CCCCCC;
    padding-top: 10px;
}

.news-item {
    width: calc(33.3% - 20px);
    border: 1px solid #CCCCCC;
    border-radius: 20px;
    padding: 10px;
    box-sizing: border-box;
    background-color: #FFFFFF;
}

/* 卡片底图（HTML 中的装饰 <img>） */

.news-item__link {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    transition: transform 0.3s ease;
}

.news-item__link:hover,
.news-item__link:focus-visible {
    transform: translateY(-6px);
    outline: none;
}

.news-page .news-item__thumb {
    /*width: 180px;*/
    width: 50%;
    height: 120px;
    object-fit: cover;    /* 保持原图比例，等比缩放，超出裁掉，✅不变形 */
    object-position: center;
    display: block;
}

.news-item__text {
    flex: 1;
    margin-left: 10px;
    min-width: 1px;
}

.news-page .news-item__title {
    font-size: 27px;
    font-weight: bold;
    line-height: 36px;
    color: #000000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 控制显示几行，这里是2行 */
    -webkit-box-orient: vertical;
}

.news-page .news-item__date {
    margin: 14px 0 0;
    font-size: 18px;
    letter-spacing: -0.08em;
    line-height: 1;
    color: var(--news-muted);
}

.news-page .news-item__summary {
    width: 100%;
    margin: 18px 0 0;
    font-size: 16px;
    line-height: 1.5em;
    color: var(--news-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 控制显示几行，这里是2行 */
    -webkit-box-orient: vertical;
    min-height: 50px;
}

/* ---------- 5. 新闻类别侧栏 ---------- */
.news-categories {
    flex-shrink: 0;
    position: relative;
    width: 330px;
    background-color: #FFFFFF;
    margin: -56px 80px 0 23px;
}

.news-page .news-categories__title {
    position: relative;
    z-index: 2;
    padding: 30px 0 0 20px;
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
    color: #000000;
}

.news-categories__body {
    padding: 20px 20px 60px 0;
}

.news-page .news-categories__item {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: #000000;
    white-space: nowrap;
    transition: color 0.25s ease;
    padding: 10px;
    margin: 0 10px 10px;
    gap: 10px;
}

.news-page .news-categories__item.is-active,
.news-page .news-categories__item:hover {
    background-image: linear-gradient(90deg, #ffdc9a, rgba(255, 255, 255, 0));
    border-radius: 20px;
}

.news-page .news-categories__item img {
    width: 48px;
}

.news-page .news-categories__item:hover {
    color: var(--news-navy);
}

.news-pager {
    padding: 20px 0;
}