/* ===== 新闻板块优化样式 ===== */

/* 首页新闻区 - 卡片增强 */
.news-section .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.news-card .news-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-card .news-image .news-cat-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.news-card .news-content {
    padding: 20px;
}

.news-card .news-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.news-card .news-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .news-title a {
    color: #333;
    text-decoration: none;
}

.news-card .news-title a:hover {
    color: var(--primary-color, #1a5fb4);
}

.news-card .news-excerpt {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #aaa;
}

.news-card .news-footer span i {
    margin-right: 4px;
}

/* ===== 新闻列表页 - 布局增强 ===== */
.news-list-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* 主内容区 */
.news-main {
    min-height: 400px;
}

/* 侧边栏 */
.news-sidebar {
    position: sticky;
    top: 20px;
}

.news-sidebar .sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.news-sidebar .sidebar-widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color, #1a5fb4);
    color: #333;
}

.news-sidebar .sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-sidebar .sidebar-widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.news-sidebar .sidebar-widget ul li:last-child {
    border-bottom: none;
}

.news-sidebar .sidebar-widget ul li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-sidebar .sidebar-widget ul li a:hover {
    color: var(--primary-color, #1a5fb4);
}

.news-sidebar .sidebar-widget ul li a .view-count {
    font-size: 12px;
    color: #bbb;
}

/* 热门文章 */
.hot-news-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.hot-news-item:last-child {
    border-bottom: none;
}

.hot-news-item .hot-index {
    width: 24px;
    height: 24px;
    background: #e8e8e8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    flex-shrink: 0;
}

.hot-news-item .hot-index.top3 {
    background: var(--primary-color, #1a5fb4);
    color: #fff;
}

.hot-news-item .hot-title {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-news-item .hot-title a {
    color: inherit;
    text-decoration: none;
}

.hot-news-item .hot-title a:hover {
    color: var(--primary-color, #1a5fb4);
}

/* 分类导航 */
.category-list li a .cat-count {
    background: #f0f0f0;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #999;
}

.category-list li a:hover .cat-count {
    background: var(--primary-color, #1a5fb4);
    color: #fff;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f4f8;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-cloud .tag-item:hover {
    background: var(--primary-color, #1a5fb4);
    color: #fff;
}

/* 分页 */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.news-pagination .page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.news-pagination .page-btn:hover {
    border-color: var(--primary-color, #1a5fb4);
    color: var(--primary-color, #1a5fb4);
}

.news-pagination .page-btn.active {
    background: var(--primary-color, #1a5fb4);
    color: #fff;
    border-color: var(--primary-color, #1a5fb4);
}

.news-pagination .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 加载状态 */
.news-loading {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

.news-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-color, #1a5fb4);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.news-empty {
    text-align: center;
    padding: 60px 0;
    color: #ccc;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 992px) {
    .news-list-layout {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .news-section .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card .news-image {
        height: 160px;
    }
}
