/* 全局样式 */
:root {
    --primary-color: #2B5AED;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.container {
    max-width: 11200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面标题区域 */
.page-header {
    padding: 0;
    text-align: center;
    margin-top: 70px; /* 固定内容区域和导航栏高度，确保不重叠 */
    min-height: 300px;
}

/* 创建一个包含标题和新闻列表的整体容器 */
.news-wrapper {
    background: url('../images/news/pattern.png') top center;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-size: 100% auto;
    padding-bottom: 60px;
    width: 100%;
}


.page-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: inherit;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.2;
    margin: 0;
    padding: 60px 0;
    display: inline-block;
}

.page-header h1 .title-primary {
    color: #0c296e;
    font-size: 1.5em;
}

.page-header h1 .title-secondary {
    color: #3370ff;
    font-size: 1.1em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-wrapper {
        background-size: 100% auto;
    }
    
    .page-header {
        min-height: 240px;
    }
    
    .page-header h1 {
        font-size: 24px;
        padding: 40px 20px;
    }
} 

/* 新闻列表区域 */
.news-section {
    padding: 20px 0;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    width: 100%;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

/* 新闻图片容器 */
.news-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 添加趣玩互联标签样式 */
.brand-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 新闻内容区域 */
.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 新闻元数据（分类和日期） */
.news-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.news-category {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 不同分类的颜色样式 */
.news-card[data-category="product"] .news-category {
    background: #E8F5E9;
    color: #2E7D32;
}

.news-card[data-category="notice"] .news-category {
    background: #FFF3E0;
    color: #E65100;
}

.news-card[data-category="update"] .news-category {
    background: #E3F2FD;
    color: #1565C0;
}

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

/* 新闻标题 */
.news-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 新闻摘要 */
.news-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 阅读更多按钮容器 */
.read-more-container {
    margin-top: 15px;
    text-align: right;
}

/* 阅读更多按钮 */
.read-more {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 0;
    display: inline-block;
}

.read-more:hover {
    color: #0056b3;
    text-decoration: underline;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    background: #fff;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
    background: #f0f7ff;
    color: #2196f3;
}

.tab-btn.active {
    background: #2196f3;
    color: #fff;
}

/* 加载更多按钮样式 */
.load-more {
    text-align: center;
    margin: 30px auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.load-more-btn {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.load-more-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    display: none;
    animation: spin 1s linear infinite;
}

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

/* 响应式布局 */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

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

    .news-excerpt {
        font-size: 13px;
    }

    .filter-tabs {
        flex-wrap: wrap;
        padding: 0 15px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 20px 0;
}
