﻿/* 新闻资讯页面特有样式 */
.news-banner {
    height: 350px;
    width: 100%;
    background: linear-gradient(rgba(22, 41, 136, 0.8), rgba(22, 41, 136, 0.9)), url('../Images/news.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.banner-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 0 20px;
}

    .banner-content h1 {
        font-size: 48px;
        margin-bottom: 20px;
        text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
        animation: fadeInDown 1s ease;
    }

    .banner-content p {
        font-size: 20px;
        opacity: 0.9;
        animation: fadeInUp 1s ease 0.3s both;
    }

/* 子导航区域 */
.news-subnav {
    background-color: var(--light-gray);
    padding: 20px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    z-index: 99;
}

.subnav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.subnav-item {
    position: relative;
}

.subnav-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

    .subnav-link:hover {
        color: var(--primary-red);
    }

    .subnav-link.active {
        color: var(--primary-red);
        font-weight: 600;
    }

        .subnav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--primary-red);
        }

/* 内容区域 */
.news-content-section {
    padding: 80px 0;
}

/* 新闻列表区域 */
.news-list-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* 修改后的section-title样式 */
.section-title {
    font-size: 32px;
    color: var(--dark-blue);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    font-weight: 600;
}

    .section-title::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 65px;
        height: 4px;
        background-color: var(--primary-red);
        border-radius: 2px;
    }

    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 95px;
        width: 65px;
        height: 4px;
        background-color: var(--primary-blue);
        border-radius: 2px;
    }

/* 新闻列表 */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    border-left: 4px solid var(--primary-blue);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .news-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
        border-left-color: var(--primary-red);
    }

.news-item-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-image {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-image .category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 20px;
    color: var(--dark-blue);
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--primary-red);
}

.news-excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    color: var(--dark-gray);
    font-size: 14px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.news-date {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

    .news-date i {
        margin-right: 5px;
        color: var(--primary-blue);
    }

.news-views {
    display: flex;
    align-items: center;
}

    .news-views i {
        margin-right: 5px;
        color: var(--primary-blue);
    }

/* 无图新闻样式 */
.news-item.no-image .news-content {
    padding: 30px;
}

/* 分页区域 */
.pagination-section {
    margin-top: 60px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 8px;
}

.pagination-item {
    margin: 0 5px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: all 0.3s ease;
}

    .pagination-link:hover {
        background-color: rgba(22, 41, 136, 0.05);
        color: var(--primary-blue);
    }

    .pagination-link.active {
        background-color: var(--primary-blue);
        color: white;
    }

    .pagination-link.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.pagination-ellipsis {
    padding: 0 10px;
    color: var(--dark-gray);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-banner {
        height: 250px;
    }

    .banner-content h1 {
        font-size: 36px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .news-content-section {
        padding: 60px 0;
    }

    .subnav-container {
        gap: 15px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .subnav-item {
        flex-shrink: 0;
    }

    .section-title {
        font-size: 28px;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .news-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .news-banner {
        height: 200px;
    }

    .banner-content h1 {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .news-content {
        padding: 20px;
    }

    .pagination-link {
        width: 35px;
        height: 35px;
    }
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 隐藏其他分类新闻的样式 */
.news-category {
    display: none;
}

    .news-category.active {
        display: block;
    }
