/* Page Banner */
.news-banner {
    background: linear-gradient(135deg, rgba(196, 22, 28, 0.9) 0%, rgba(249, 168, 37, 0.9) 100%);
}

/* Hero Section */
.hero.news-hero {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    overflow: hidden;
    margin-bottom: 0;
    padding-top: 80px;
    box-sizing: border-box;
}

.news-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.news-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(196, 22, 28, 0.8) 0%, rgba(249, 168, 37, 0.8) 100%);
    z-index: 1;
}

.news-hero .hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
}

.news-hero .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-hero .hero-text-wrapper {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #fff;
}

.news-hero .hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.news-hero .hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Section */
.categories-section {
    background: var(--bg-light);
    padding: 40px 0;
}

.categories-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-btn {
    padding: 10px 28px;
    border: 2px solid var(--border-color);
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Featured Section */
.featured-section {
    background: #fff;
}

.featured-news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
}

.featured-image {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.featured-image img.error {
    display: none;
}

.featured-image .placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: 0;
}

.featured-image .placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.featured-image .placeholder-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 0 20px;
}

.featured-image img.loading {
    opacity: 0;
}

.featured-image img.loaded {
    opacity: 1;
}

.placeholder-image-large {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 500;
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.featured-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
    line-height: 1.4;
}

.news-excerpt {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 24px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-date {
    font-size: 14px;
    color: var(--text-light);
}

.read-more {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 500;
}

.read-more:hover {
    color: #a81118;
    text-decoration: underline;
}

/* News List Section */
.news-list-section {
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-item-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.news-item-image img.error {
    display: none;
}

.news-item-image .placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: 0;
}

.news-item-image .placeholder-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.news-item-image .placeholder-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 0 16px;
}

.news-item-image img.loading {
    opacity: 0;
}

.news-item-image img.loaded {
    opacity: 1;
}

.news-item-content {
    padding: 24px;
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 12px;
}

.news-item-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item .news-date {
    font-size: 13px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .news-hero .hero-title {
        font-size: 52px;
    }
    
    .news-hero .hero-subtitle {
        font-size: 20px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-hero .hero-title {
        font-size: 38px;
    }
    
    .news-hero .hero-subtitle {
        font-size: 18px;
    }
    
    .featured-news {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 250px;
    }

    .featured-content {
        padding: 32px;
    }

    .featured-content h2 {
        font-size: 22px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 手机端新闻卡片水平布局 */
    .news-item {
        display: flex;
        flex-direction: row;
    }

    .news-item-image {
        width: 160px;
        min-width: 160px;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .news-item-content {
        flex: 1;
        padding: 8px 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }

    .news-item-content h3 {
        font-size: 15px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }

    .news-tag {
        display: none;
    }

    .news-summary {
        font-size: 13px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }

    .news-item .news-date {
        font-size: 12px;
    }

    /* 手机端分页按钮优化 */
    .prev-page,
    .next-page {
        min-width: 44px;
        height: 44px;
        padding: 0;
    }

    .prev-page svg,
    .next-page svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .news-hero .hero-title {
        font-size: 32px;
    }
    
    .news-hero .hero-subtitle {
        font-size: 16px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    padding: 0 20px;
}

.page-btn {
    min-width: 48px;
    height: 48px;
    padding: 0 18px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--text-gray);
    font-size: 15px;
}

/* 暗色模式适配 */
[data-theme="dark"] .categories-section {
    background: #1a1a1a;
}

[data-theme="dark"] .category-btn {
    background: #1e1e1e;
    border-color: var(--border-color);
}

[data-theme="dark"] .featured-section {
    background: #121212;
}

[data-theme="dark"] .featured-news {
    background: #1e1e1e;
}

[data-theme="dark"] .news-list-section {
    background: #1a1a1a;
}

[data-theme="dark"] .news-item {
    background: #1e1e1e;
}

[data-theme="dark"] .news-item:hover {
    background: #252525;
}

[data-theme="dark"] .news-tag {
    background: var(--primary-color);
    color: #fff;
}

[data-theme="dark"] .page-btn {
    background: #1e1e1e;
    border-color: var(--border-color);
    color: var(--text-light);
}

[data-theme="dark"] .page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
