/**
 * 新闻列表页样式
 * Editorial/Magazine 风格设计
 */

/* ==================== Hero 区域 ==================== */
.news-hero {
    position: relative;
    height: 45vh;
    min-height: 380px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1929 100%);
}

.news-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    mix-blend-mode: luminosity;
}

.news-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 对角线装饰 */
.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.news-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--base-color) 0%, transparent 80%);
}

.news-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding: 0 var(--cbasta);
    max-width: 1400px;
    margin: 0 auto;
}

.news-hero-title {
    font-family: "Noto Sans SC", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.news-hero-title span {
    display: inline-block;
    position: relative;
}

.news-hero-title span::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--base-color);
}

.news-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

/* 分类导航标签 */
.news-hero-tabs {
    display: flex;
    gap: 0.75rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.news-hero-tab {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.4s, color 0.4s, border-color 0.4s, transform 0.4s;
    position: relative;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.news-hero-tab:hover,
.news-hero-tab.news-tab-active {
    background: var(--base-color);
    color: #fff;
    border-color: var(--base-color);
    transform: translateY(-2px);
}

.news-hero-tab span {
    position: relative;
    z-index: 1;
}

/* ==================== 新闻列表区域 ==================== */
.news-section {
    padding: var(--section-padding-y) var(--cbasta);
    max-width: 1400px;
    margin: 0 auto;
}

/* 网格列表 */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

/* 单个新闻卡片 */
.news-card {
    position: relative;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 卡片图片 */
.news-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-light);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

/* 图片底部装饰线 */
.news-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-card-image::after {
    transform: scaleX(1);
}

/* 卡片内容区 */
.news-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    position: relative;
}

/* 日期 */
.news-card-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
    position: relative;
}

.news-card-date::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 标题 */
.news-card-title {
    font-family: "Noto Sans SC", sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.news-card:hover .news-card-title {
    color: var(--primary-color);
}

/* 摘要 */
.news-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 查看更多链接 */
.news-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.2rem;
    transition: color 0.3s;
}

.news-card-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-primary);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s;
}

.news-card:hover .news-card-more {
    color: var(--primary-color);
}

.news-card:hover .news-card-more::after {
    transform: scaleX(1);
    background: var(--primary-color);
}

.news-card-more svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}

.news-card:hover .news-card-more svg {
    transform: translateX(4px);
}

/* ==================== 分页 ==================== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-pagination .ui-pagination-container {
    display: flex !important;
    gap: 0.375rem;
    align-items: center;
    flex-direction: row !important;
}

.news-pagination .ui-pagination-container .ui-pagination-page-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    line-height: 1;
    box-sizing: border-box;
}

.news-pagination .ui-pagination-container .ui-pagination-page-item:hover {
    color: var(--base-color);
    border-color: var(--base-color);
    background: rgba(44, 48, 129, 0.04);
}

.news-pagination .ui-pagination-container .ui-pagination-page-item.active {
    color: #fff;
    background: var(--base-color);
    border-color: var(--base-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(44, 48, 129, 0.25);
    cursor: default;
}

/* 禁用状态 */
.news-pagination .ui-pagination-container .ui-pagination-page-item.disabled {
    color: var(--border-dark);
    border-color: var(--border-light);
    background: var(--bg-light);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 1100px) {
    .news-card-body {
        padding: 1rem 1.25rem 1.25rem;
    }

    .news-card-title {
        font-size: 1.0625rem;
    }
}

@media screen and (max-width: 960px) {
    .news-hero {
        height: 35vh;
        min-height: 280px;
    }

    .news-hero-tabs {
        margin-top: 1.5rem;
    }

    .news-hero-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .news-section {
        padding: 2.5rem var(--cbasta) 3rem;
    }

    .news-list {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

@media screen and (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .news-card-image {
        aspect-ratio: 16 / 9;
    }

    .news-card-body {
        padding: 0.875rem 1rem 1.25rem;
    }

    .news-pagination {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .news-pagination .ui-pagination-container .ui-pagination-page-item {
        min-width: 34px;
        height: 34px;
        font-size: 0.8125rem;
    }
}

@media screen and (max-width: 640px) {
    .news-hero {
        height: 30vh;
        min-height: 220px;
    }

    .news-hero-title {
        font-size: 1.75rem;
    }

    .news-hero-title span::after {
        width: 40px;
        height: 3px;
        bottom: -6px;
    }

    .news-hero-subtitle {
        font-size: 0.9375rem;
    }

    .news-hero-tabs {
        gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .news-hero-tab {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
    }

    .news-section {
        padding: 2rem var(--cbasta) 2.5rem;
    }

    .news-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-card-title {
        font-size: 1.0625rem;
    }

    .news-card-desc {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }

    .news-card-date {
        font-size: 0.6875rem;
    }

    .news-pagination {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .news-pagination .ui-pagination-container .ui-pagination-page-item {
        min-width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}
