/* =================================
   新闻页面样式 - news.css
   完全匹配HTML和JavaScript结构
   ================================= */

/* 页面标题区域 */
.page-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.2;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 新闻筛选区域 */
.news-filter-section {
    background: #f8f9fa;
    padding: 40px 0;
    border-bottom: 1px solid #dee2e6;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.filter-select,
.search-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.filter-select:focus,
.search-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.search-input {
    min-width: 200px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn,
.search-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.filter-btn {
    background: #6c757d;
    color: white;
}

.filter-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* 热门新闻区域 */
.featured-news-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.featured-news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.featured-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    max-height: 480px;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.main-featured {
    /* 移除特殊的grid-row样式，让所有卡片尺寸一致 */
}

.featured-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    max-height: 200px;
}

.main-featured .featured-image {
    aspect-ratio: 16/9;
    max-height: 200px;
}

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

.featured-item:hover .featured-image img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
}

.featured-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.featured-content {
    padding: 20px;
}

.main-featured .featured-content {
    padding: 20px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.news-category {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.news-category.news { background: #e3f2fd; color: #1976d2; }
.news-category.announcement { background: #fff3e0; color: #f57c00; }
.news-category.promotion { background: #f3e5f5; color: #7b1fa2; }
.news-category.update { background: #e8f5e8; color: #388e3c; }
.news-category.industry { background: #fce4ec; color: #c2185b; }

.news-date {
    color: #666;
    font-size: 13px;
}

.news-views {
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-content .news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.main-featured .news-title {
    font-size: 1.3rem;
}

.news-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.main-featured .news-excerpt {
    -webkit-line-clamp: 3;
}

.read-more-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 13px;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* 新闻列表区域 */
.news-list-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

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

.news-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
}

.news-type {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.news-content {
    padding: 25px;
}

.news-content .news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content .news-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn,
.page-number {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.page-btn:hover:not(.disabled),
.page-number:hover:not(.active) {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border-color: #ffd700;
    transform: translateY(-2px);
}

.page-number.active {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border-color: #ffd700;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-dots {
    padding: 10px 8px;
    color: #999;
    font-weight: 600;
}

/* 通讯订阅区域 */
.newsletter-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-description {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 40px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: 15px;
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.newsletter-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* 加载和错误状态 */
.loading-placeholder,
.error-message,
.no-news {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-placeholder i,
.error-message i,
.no-news i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading-placeholder i {
    color: #ffd700;
    animation: spin 1s linear infinite;
}

.error-message i {
    color: #dc3545;
}

.no-news i {
    color: #6c757d;
}

.loading-placeholder h3,
.error-message h3,
.no-news h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.loading-placeholder p,
.error-message p,
.no-news p {
    color: #666;
    margin-bottom: 20px;
}

.error-message .btn {
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.error-message .btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* 通用按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* 动画效果 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item,
.featured-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    /* .search-input {
        min-width: 100%;
    } */
    
    .featured-news-container {
        grid-template-columns: 1fr;
    }
    
    .main-featured {
        grid-row: span 1;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .pagination-container {
        gap: 5px;
    }
    
    .page-btn,
    .page-number {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .newsletter-title {
        font-size: 2rem;
    }
} 