/* 资讯页面特有样式 */
.news-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('../images/office.jpg') center/cover no-repeat;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.news-banner .banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.news-banner .banner-content p {
    font-size: 1.2rem;
}

/* 筛选区样式 */
.news-filter {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.news-filter.sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-tabs-container {
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 1rem;
}

.filter-tabs {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0 1rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-tab.active {
    background: #0066cc;
    color: white;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 主内容区布局 */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.news-content-wrapper {
    display: flex;
    gap: 2rem;
}

.news-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 资讯卡片样式 */
.news-card {
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.news-image {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 比例 */
    overflow: hidden;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 102, 204, 0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.news-info {
    padding: 1rem;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: #0066cc;
}

.news-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.news-meta i {
    margin-right: 0.3rem;
}

/* 侧边栏样式 */
.news-sidebar {
    width: 280px;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.popular-news {
    list-style: none;
}

.popular-news li {
    margin-bottom: 0.8rem;
}

.popular-news a {
    display: flex;
    align-items: center;
    color: #333;
    transition: color 0.3s ease;
}

.popular-news a:hover {
    color: #0066cc;
}

.popular-rank {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #0066cc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.popular-title {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-views {
    font-size: 0.8rem;
    color: #999;
    margin-left: 0.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #0066cc;
    color: white;
}

/* 分页器样式 */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

.pagination-prev,
.pagination-next {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-prev:hover:not(:disabled),
.pagination-next:hover:not(:disabled) {
    background: #f5f5f5;
}

.pagination-prev:disabled,
.pagination-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.3rem;
}

.pagination-pages a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination-pages a:hover,
.pagination-pages a.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .news-content-wrapper {
        flex-direction: column;
    }

    .news-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .news-list {
        grid-template-columns: 1fr;
    }

    .news-banner {
        height: 200px;
    }

    .news-banner .banner-content h1 {
        font-size: 2rem;
    }
}