﻿section.news {
    margin: 60px 0;
}
/* 分类tab */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.tab {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--dark-blue);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

    .tab:hover, .tab.active {
        background-color: var(--secondary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        border-color: var(--primary-color);
        font-weight: bold;
    }

/* 新闻列表 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    justify-items: center;
}

    .news-grid .empty {
        width: 60%;
    }

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

    .news-card.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .news-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

.news-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    position: relative;
    overflow: hidden;
}

    .news-image::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.6s ease;
    }

.news-card:hover .news-image::before {
    left: 100%;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    min-width: 370px;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 24px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    color: #999;
}

.news-category {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: bold;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #333;
    transition: color 0.3s ease;
    min-height: 50px;
    text-align: justify;
}

.news-card:hover .news-title {
    color: var(--primary-color);
}

.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

    .news-excerpt p {
        text-align: justify;
    }

.newhot {
    position: absolute;
    top: 0px;
    right: 0px;
    background: url(/image/new.png) no-repeat center center / cover;
    width: 64px;
    height: 64px;
    z-index: 100;
}

/* Search*/
.search {
    padding: 60px 0;
}

    .search .list {
        padding-bottom: 20px;
        text-align: center;
    }

        .search .list li {
            list-style: none;
            transition: all .3s ease;
        }

            .search .list li:hover {
                transform: translateY(-5px);
                box-shadow: rgba(0,0,0,.4) 5px 5px 10px;
            }

                .search .list li:hover .nr_item_srchTitle {
                    color: var(--primary-color);
                }
                .search .list li:hover .nr_item_date {
                    color: var(--primary-color);
                }

.nr_list_item {
    position: relative;
    background-color: #F3F3F3;
    padding: 20px 50px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-radius: 7px;
}

.nr_item_srchType {
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: #FFF;
    border-radius: 5px;
}

.nr_item_srchTitle {
    padding-left: 40px;
    text-align: left;
    flex: 1;
    text-overflow: ellipsis;
    font-size: 1.4em;
    white-space: nowrap;
    overflow: hidden;
}

.nr_item_date {
    width: 90px;
}

@media (max-width: 576px) {
    .nr_list_item {
        padding: 20px;
    }

    .nr_item_srchType {
        width: 52px;
        word-break: break-word;
        line-height: 1.3rem;
    }

    .nr_item_srchTitle {
        padding: 0 20px;
        font-size: 1.2rem;
    }

    .nr_item_date {
        width: 40px;
        word-break: break-word;
        line-height: 1.3rem;
    }
}

/* 分页 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px;
}

.pagination {
    display: flex;
    list-style: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background: white;
}

    .pagination li {
        border-right: 1px solid #eee;
    }

        .pagination li:last-child {
            border-right: none;
        }

    .pagination a {
        display: block;
        background: white;
        color: #555;
        transition: all 0.3s;
    }

    .pagination li {
        padding: 10px 16px;
        transition: all 0.3s;
    }

        .pagination li:hover, .pagination li:hover a,
        .pagination li.active {
            background: var(--primary-color);
            color: white;
        }

    .pagination a i {
        font-size: 0.9rem;
    }
/* Loading */
.loading {
    display: flex;
    padding: 40px;
    opacity: 0.7;
}

    .loading::after {
        content: '';
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid var(--secondary-color);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
        margin-left: 10px;
    }

/* 动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动适配 */
@media (max-width: 768px) {
    .tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}