/* ========== 新闻资讯页面样式 ========== */

/* ========== 页面基础 ========== */
.news-page {
    min-height: 100vh;
    background: #f5f7fb;
}

.news-page .container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========== 新闻筛选区域 ========== */
.news-filter {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    /*position: sticky;*/
    /*top: 60px;*/
    /*z-index: 100;*/
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    padding: 10px 24px;
    font-size: 14px;
    color: #666;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: #FE720A;
    color: #FE720A;
}

/* 选中状态 - 统一橙色 */
.filter-tab.active {
    background: #FE720A;
    border-color: #FE720A;
    color: #fff;
}

/* ========== 新闻列表 ========== */
.news-section {
    padding: 40px 0;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(254,114,10,0.15);
}

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 12px;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, #FE720A 0%, #ff9a4d 100%);
    box-shadow: 0 2px 10px rgba(254, 114, 10, 0.3);
}

.news-card-content {
    padding: 20px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 分页 ========== */
/* Bootstrap.php 输出: <div class="pagination-wrap"><button/a class="pagination-btn [active|disabled]"> */

.pagination,
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    color: #666;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    vertical-align: middle;
    box-sizing: border-box;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #FE720A;
    color: #FE720A;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #FE720A 0%, #ff9a4d 100%);
    color: #fff;
    border-color: #FE720A;
    pointer-events: none;
}

.pagination-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 0 6px;
    color: #bbb;
    font-size: 14px;
    line-height: 40px;
}

@media screen and (max-width: 768px) {
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    .pagination,.pagination-wrap { gap: 6px; margin-top: 28px; }
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border: 3px solid #f0f0f0;
    border-top-color: #FE720A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-data {
    text-align: center;
    padding: 80px 0;
    color: #999;
    grid-column: 1 / -1;
}

.no-data-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-data-icon svg {
    color: #FE720A;
}

/* ========== 响应式适配 ========== */
@media screen and (max-width: 1200px) {
    .news-list {
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .news-page {
    }

    .news-page .container {
        width: 100%;
        padding: 0 15px;
    }

    .news-filter {
        top: 56px;
        padding: 12px 0;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .news-section {
        padding: 24px 0;
    }

    .news-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .news-card-image {
        height: 160px;
    }

    .news-card-content {
        padding: 16px;
    }

    .news-card-title {
        font-size: 16px;
    }

    .news-card-desc {
        font-size: 13px;
    }

    .pagination {
        gap: 6px;
        margin-top: 30px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

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

    .news-card-image {
        height: 160px;
    }

    .news-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
