/* ==========================================================
   新闻资讯归档页专属样式
   依赖：main.css（全局基础、.container、.page-banner）
   ========================================================== */

/* ── Banner ─────────────────────────────────────────────── */
/* position:relative / overflow:hidden 已由 main.css .page-banner 提供 */
.page-banner--news {
    height: 645px;
}

.news-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* banner 文字层（.banner-label / .banner-label__title）由 main.css 统一提供 */

/* ── Tab 横向菜单栏（与成功案例结构和样式完全一致）────── */
.news-tab-bar {
    background-color: #fff;
}

.news-tabs {
    display: flex;
    align-items: flex-end;
    gap: 60px;
    padding: 40px 0 0;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

.news-tab-item {
    font-size: 28px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    padding-bottom: 18px; /* 15px（文字到线）+ 3px（线高）= 18px */
    position: relative;
    flex-shrink: 0;
    transition: color 0.2s;
}

.news-tab-item:hover {
    color: #0091e2;
}

/*
 * 激活下划线：宽度与文字同宽，文字下方 15px，高 3px，颜色 #0091e2
 */
.news-tab-item.is-active {
    color: #000;
}

.news-tab-item.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #0091e2;
}

/* ── 主内容区 ─────────────────────────────────────────────── */
.news-archive {
    /* 无需与 tab 栏重叠，tab 底边即为分界 */
    margin-top:-130px;
}

/* ── 列表区域 ─────────────────────────────────────────────── */
.news-list-section {
    padding-top: 120px; /* 设计稿：tab 菜单行与列表行垂直高度 120px */
    padding-bottom: 100px;
}

/* 列表重置 */
.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 行间距 100px */
.news-item + .news-item {
    margin-top: 100px;
}

/* 行链接：左图右文，间距 50px */
.news-item-link {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    text-decoration: none;
    color: inherit;
}

/* ── 左侧封面图 ── */
.news-item-thumb {
    flex: 0 0 447px;
    width: 447px;
    height: 206px;
    overflow: hidden;
}

.news-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* 等比例放大/缩小，超出裁切 */
    object-position: center;  /* 使用中心区域 */
    display: block;
    transition: transform 0.3s ease;
}

.news-item-link:hover .news-item-img {
    transform: scale(1.03);
}

.news-item-img--placeholder {
    background-color: #e8e8e8;
}

/* ── 右侧文字区 ── */
.news-item-body {
    flex: 1;
    min-width: 0; /* 防止 flex 子项溢出 */
    padding-top: 15px;
}

/* 第一行：标题，28px light #000 */
.news-item-title {
    font-size: 28px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.news-item-link:hover .news-item-title {
    color: #0091e2;
}

/* 第二行：发布日期 YYYY-MM-DD，28px light #000，距标题 20px */
.news-item-date {
    font-size: 28px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 20px 0 0;
    line-height: 1.3;
}

/* 第三行：简介，16px light #000，距日期 20px，固定 2 行高度 */
.news-item-excerpt {
    font-size: 16px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    margin: 20px 0 0;
    line-height: 1.7;
    /* 固定 2 行高度：不足 2 行仍占位，超过 2 行截断 */
    height: calc(16px * 1.7 * 2); /* ≈ 54.4px */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 第四行：向右箭头，右对齐，距简介 35px */
.news-item-arrow {
    margin-top: 35px;
    display: flex;
    justify-content: flex-end;
    color: #000;
    transition: color 0.2s, transform 0.2s;
}

.news-item-link:hover .news-item-arrow {
    color: #0091e2;
    transform: translateX(4px);
}

/* ── 无内容提示 ────────────────────────────────────────────── */
.news-empty {
    font-size: 18px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #999;
    text-align: center;
    padding: 80px 0;
}

/* ── 分页（与成功案例分页样式一致）─────────────────────────── */
.news-pagination,
.news-pagination.navigation.pagination {
    margin-top: 70px;
}

.news-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    font-size: 16px;
    font-family: 'HarmonyOS_Sans_SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    color: #000;
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.news-pagination .page-numbers:hover {
    color: #0091e2;
    border-color: #0091e2;
}

.news-pagination .page-numbers.current {
    color: #0091e2;
    border-color: #0091e2;
    font-weight: 500;
}

.news-pagination .page-numbers.dots {
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.news-pagination .prev.page-numbers,
.news-pagination .next.page-numbers {
    color: #000;
    border-color: #ccc;
}

.news-pagination .prev.page-numbers:hover,
.news-pagination .next.page-numbers:hover {
    color: #0091e2;
    border-color: #0091e2;
}

/* ==========================================================
   响应式
   ========================================================== */
@media screen and (max-width: 1200px) {
    .page-banner--news {
        height: 460px;
    }
}

@media screen and (max-width: 960px) {
    .news-archive{
        margin-top:0;
    }
    .page-banner--news {
        height: 320px;
    }

    .news-tabs {
        gap: 36px;
        padding-top: 28px;
    }

    .news-tab-item {
        font-size: 20px;
        padding-bottom: 14px;
    }

    .news-list-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .news-item + .news-item {
        margin-top: 60px;
    }

    .news-item-link {
        gap: 28px;
    }

    .news-item-thumb {
        flex: 0 0 280px;
        width: 280px;
        height: 130px;
    }

    .news-item-title {
        font-size: 20px;
    }

    .news-item-date {
        font-size: 16px;
        margin-top: 12px;
    }

    .news-item-excerpt {
        font-size: 14px;
        margin-top: 12px;
    }

    .news-item-arrow {
        margin-top: 20px;
    }
}

@media screen and (max-width: 600px) {
    .page-banner--news {
        height: 200px;
    }

    .news-tabs {
        gap: 24px;
        padding-top: 20px;
    }

    .news-tab-item {
        font-size: 16px;
    }

    .news-list-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* 竖排：图片在上，文字在下 */
    .news-item-link {
        flex-direction: column;
        gap: 16px;
    }

    .news-item-thumb {
        flex: none;
        width: 100%;
        height: 180px;
    }

    .news-item-body {
        padding-top: 0;
    }

    .news-item-title {
        font-size: 18px;
        white-space: normal;
    }

    .news-item-date {
        font-size: 14px;
        margin-top: 10px;
    }

    .news-item-excerpt {
        font-size: 14px;
        margin-top: 10px;
    }

    .news-item-arrow {
        margin-top: 16px;
    }

    .news-item + .news-item {
        margin-top: 40px;
    }

    .news-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
