/* 新闻页面特定样式 */

/* 页面标题区 */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f9fafb 0%, #e5f2ff 100%);
    text-align: center;
}

.page-title h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.page-title p {
    font-size: 20px;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}

/* 新闻分类标签 */
.news-categories {
    padding: 40px 0;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--light-gray);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background-color: var(--border-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 新闻列表区 */
.news-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.news-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

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

.featured .news-image {
    height: 100%;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.company-color {
    background-color: #4f46e5;
}

.insight-color {
    background-color: #0891b2;
}

.case-color {
    background-color: #059669;
}

.tech-color {
    background-color: #ea580c;
}

.news-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--danger-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.news-date {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 4px;
}

.news-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-category {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.featured .news-content h3 {
    font-size: 24px;
}

.news-content h3 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
}

.read-time {
    opacity: 0.7;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.read-more::after {
    content: '\2192';
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 8px;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
}

/* 订阅区域 */
.subscribe-section {
    padding: 80px 0;
    background-color: white;
}

.subscribe-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.subscribe-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
}

.subscribe-content p {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 32px;
}

.subscribe-form {
    margin-bottom: 16px;
}

.subscribe-form .form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}

.subscribe-form .btn {
    white-space: nowrap;
}

/* 相关推荐区域 */
.related-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-card {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-image {
    margin-bottom: 20px;
}

.related-image .image-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    font-size: 32px;
}

.related-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.related-card p {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 14px;
}

.related-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}

.related-link:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .news-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title h1 {
        font-size: 36px;
    }
    
    .subscribe-form .form-group {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 过滤动画 */
.news-card {
    transition: all 0.3s ease;
}

.news-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 加载更多动画 */
.load-more-btn.loading {
    position: relative;
    color: transparent;
}

.load-more-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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