.news-section {
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(80px, 10vh, 140px) 0;
    scroll-margin-top: var(--nav-h-scroll, 100px);
    width: 100%;
    /* 确保背景色撑满全屏 */
}

.news-container {
    width: 90%;
    max-width: clamp(1000px, 88vw, 2400px);
    margin: 0 auto;
}

/* --- [1. 3456 x 2234 超高分辨率修复] --- */
@media (min-width: 2401px) {
    .news-container {
        max-width: 92vw;
        /* 在超大屏幕下取消硬性宽度限制，消除盒子效应 */
    }
}

/* --- [2. 头部布局与 View All News 动效] --- */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    width: 100%;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--p-green);
    text-decoration: none;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.6rem);
    transition: all 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.view-more-link .arrow {
    font-size: clamp(1.1rem, 1.5vw, 2rem);
    line-height: 1;
    transition: transform 0.3s ease;
}

.view-more-link:hover {
    color: var(--p-blue);
    border-bottom-color: var(--p-green);
}

.view-more-link:hover .arrow {
    transform: translateX(8px);
    /* 箭头右移 */
}

/* --- [3. 网格与卡片基础样式] --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(20px, 3vw, 50px);
    align-items: stretch;
}

.news-card {
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    top: 0;
    min-height: 100px;
}

/* 强制让图片在渲染时保持平滑，不产生重绘跳动 */
.news-card img,
.work-card img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.1);
    border-color: rgba(21, 135, 145, 0.2);
}

.news-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.news-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-card:hover .news-img-box img {
    transform: scale(1.08);
}

/* 标签样式 */
.news-tags {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

.tag-capsule {
    background-color: var(--p-blue);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    /* text-transform: uppercase; */
    letter-spacing: 0.05em;
    margin: 0 0.5em 0 0;
}

/* 内容区域 */
.news-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content [style] {
    /* 保证内联样式生效 */
}

.news-date {
    font-size: 0.85rem;
    color: #66b966;
    font-weight: 700;
    margin-bottom: 15px;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #063f44;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 新增：定义上浮淡入动画 --- */
@keyframes fadeInUpTitle {
    0% {
        opacity: 0;
        transform: translateY(35px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: clamp(1.6em, 3.2vw, 3.2em);
    line-height: 1.1;
    font-weight: 300;
    color: #063f44;
}

.section-tag {
    opacity: 0;
    letter-spacing: 0.35em;
    display: block;
    color: rgb(102, 185, 102);
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1em;
    transform: translateY(20px);
}

.section-title,
.section-tag {
    opacity: 0;
    transform: translateY(35px);
}

/* 3. 新增：当 JS 加上 .active 类时，才开始播放动画 */
.section-tag.active {
    animation: fadeInUpTitle 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-title.active {
    animation: fadeInUpTitle 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* ==========================================================================
   4. 分辨率适配 - 标准分辨率档位（新增）
   ========================================================================== */

/* --- A. 720P (宽度 1280px 左右) --- */
@media screen and (min-width: 1201px) and (max-width: 1599px) {
    .news-container {
        max-width: clamp(1100px, 92vw, 1400px) !important;
        width: 90%;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .news-title {
        font-size: 1.05rem !important;
    }

    .news-desc {
        font-size: 0.85rem !important;
    }

    .section-title {
        font-size: clamp(1.6em, 2.8vw, 2.4em) !important;
    }

    .tag-capsule {
        font-size: 0.6rem !important;
    }
}

/* --- B. 1080P (宽度 1920px 左右) --- */
@media screen and (min-width: 1600px) and (max-width: 2239px) {
    .news-container {
        max-width: clamp(1200px, 82vw, 1600px) !important;
        width: 90%;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: clamp(25px, 3vw, 40px);
    }

    .news-title {
        font-size: clamp(1.1rem, 1.2vw, 1.25rem) !important;
    }

    .news-desc {
        font-size: clamp(0.85rem, 0.9vw, 0.95rem) !important;
    }

    .section-title {
        font-size: clamp(1.8em, 3vw, 3em) !important;
    }

    .tag-capsule {
        font-size: 0.7rem !important;
    }
}

/* --- C. 1440P (宽度 2560px 左右) --- */
@media screen and (min-width: 2240px) and (max-width: 3199px) {
    .news-container {
        max-width: clamp(1800px, 88vw, 2400px) !important;
        width: 90%;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: clamp(35px, 4vw, 55px);
    }

    .news-title {
        font-size: clamp(1.2rem, 1.3vw, 1.4rem) !important;
    }

    .news-desc {
        font-size: clamp(0.9rem, 0.95vw, 1.05rem) !important;
        -webkit-line-clamp: 3 !important;
    }

    .section-title {
        font-size: clamp(2.2em, 3.5vw, 4em) !important;
    }

    .tag-capsule {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.8rem !important;
    }

    .news-content {
        padding: 35px 30px !important;
    }

    .news-date {
        font-size: 0.95rem !important;
    }

    .view-more-link {
        margin-right: 0.2rem !important;
    }
}

/* --- D. 2160P (宽度 3840px 左右) --- */
@media screen and (min-width: 3200px) {
    .news-container {
        max-width: clamp(2400px, 85vw, 3000px) !important;
        width: 90%;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: clamp(40px, 5vw, 70px);
    }

    .news-title {
        font-size: clamp(1.3rem, 1.4vw, 1.6rem) !important;
    }

    .news-desc {
        font-size: clamp(0.95rem, 1vw, 1.15rem) !important;
        -webkit-line-clamp: 3 !important;
    }

    .section-title {
        font-size: clamp(2.6em, 4vw, 5em) !important;
    }

    .tag-capsule {
        font-size: 0.85rem !important;
        padding: 0.6rem 1rem !important;
        max-width: 220px !important;
    }

    .news-content {
        padding: 40px 35px !important;
    }

    .news-date {
        font-size: 1rem !important;
    }
    .view-more-link {
        margin-right: 2rem !important;
    }
}

/* --- [4. 手机端精准补丁：解决右侧看不全 & 排版优化] --- */
@media screen and (max-width: 480px) {
    .news-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px;
    }

    .news-grid {
        /* 强制 1fr 消除 minmax(320px) 对窄屏手机的破坏 */
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .news-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .news-img-box img {
        max-width: 100% !important;
    }

    .news-content {
        padding: 20px 15px !important;
    }

    .view-more-link {
        font-size: 0.9rem !important;
    }

    .tag-capsule {
        font-size: 0.5rem;
    }
}

@media screen and (max-width: 1024px) {

    .tag-capsule {
        font-size: 0.5rem;
    }

    .news-section {
        background-color: #ffffff;
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding: 0 !important;
        scroll-margin-top: var(--nav-h-scroll, 100px);
        width: 100%;
        /* 确保背景色撑满全屏 */
    }
}

@media screen and (max-width: 1367px) {

    .tag-capsule {
        font-size: 0.5rem;
    }
}

@media screen and (max-width: 1170px) {
    .news-grid {
        /* 覆盖之前的 auto-fit，强制只有 1 列 */
        grid-template-columns: 1fr !important;
        /* 适当减小间距，提升移动端体验 */
        gap: 30px;
    }

    .news-container {
        /* 确保容器宽度在平板端不会过窄 */
        width: 92%;
    }

    .news-card {
        /* 确保卡片不会超出容器 */
        width: 100%;
    }

    #news_main_title {
        margin: 15px 0 0 0 !important;
    }
}
