/* 新闻页面样式 */

/* 页面头部样式 */
.page-header {
    background: linear-gradient(45deg, #d8781f, #ffd07a);
    color: rgba(0, 0, 0, 0.918);
    padding: 60px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
}

/* 搜索区域样式 */
.search-section {
    background-color: rgba(248, 249, 250, 0);
}

.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}


#news-search {
    flex: 1;
    font-size: 1rem;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

#news-search:focus {
    border-color: var(--c-primary);
}

.search-btn {
    background-color: rgb(255, 174, 0);
    color: rgb(0, 0, 0);
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: rgb(255, 217, 134);
}

/* 新闻列表区域样式 */
.news-section {
    padding: 40px 0;
}

.news-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-count {
    font-size: 0.9rem;
    color: var(--c-text-secondary);
}

/* 新闻网格布局 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* 新闻条目样式 */
.news-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-item-link {
    display: block;
    padding: 24px;
    text-decoration: none;
    color: inherit;
}

.news-item-date {
    display: inline-block;
    background-color: rgb(255, 174, 0);
    color: rgb(0, 0, 0);
    padding: 4px 12px;
    border-radius: 0px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.news-item-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--c-text-primary);
}

.news-item-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--c-text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-primary);
    transition: color 0.3s ease;
}

.news-read-more:hover {
    color: var(--c-primary-dark);
}

.news-read-more::after {
    content: '→';
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.news-item:hover .news-read-more::after {
    transform: translateX(3px);
}

/* 加载状态样式 */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid var(--c-border);
    border-top: 4px solid var(--c-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--c-text-secondary);
    font-size: 1rem;
}

/* 错误消息样式 */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--c-error);
    font-size: 1.1rem;
}

/* 无结果样式 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-text-secondary);
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 12px;
    }
    
    #news-search,
    .search-btn {
        border-radius: 8px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-item-link {
        padding: 20px;
    }
    
    .news-item-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .news-item-link {
        padding: 16px;
    }
    
    .news-item-title {
        font-size: 1.15rem;
    }
}