/**
 * ================================================
 * 文件：doc.css
 * 作用：新闻资讯展示页面专用样式
 * 说明：仅用于doc.html页面（新闻资讯）
 * ================================================
 */

/* ========== 页面容器 ========== */
.news-show-center {
    background: #f5f7fa;
    padding: 20px 0 60px;
    min-height: 600px;
}

/* ========== 左侧导航高亮样式 ========== */
.sidebar-menu li.active a {
    background: var(--color-accent);
    border-left-color: var(--color-accent);
    color: #fff;
}
.sidebar-menu li.active a i { color: #fff; }
.sidebar-menu li a:hover {
    background: var(--color-accent);
    border-left-color: var(--color-accent);
    color: #fff;
}
.sidebar-menu li a:hover i { color: #fff; }

/* ========== 右侧新闻内容区 ========== */
.news-show-area {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 30px 40px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    min-height: 500px;
}

.news-show-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-bg-light);
}

.news-show-header h2 {
    font-size: 24px;
    color: var(--color-text);
    font-weight: bold;
    margin-bottom: 10px;
}

.news-show-header .subtitle {
    font-size: 14px;
    color: #666;
}

/* ========== 新闻分类标签 ========== */
.news-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.news-tab {
    padding: 8px 20px;
    background: #f5f7fa;
    border: 1px solid #e8edf2;
    border-radius: 20px;
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.news-tab:hover,
.news-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ========== 新闻卡片网格 ========== */
.news-show-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* 新闻卡片 */
.news-show-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8edf2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-show-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(23, 82, 166, 0.15);
    transform: translateY(-5px);
}

/* 新闻图片 */
.news-show-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-show-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-show-card:hover .news-show-img img {
    transform: scale(1.1);
}

/* 分类标签 */
.news-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: #007dcd;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 新闻内容 */
.news-show-content {
    padding: 20px;
}

.news-show-content h3 {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.news-show-card:hover .news-show-content h3 {
    color: var(--color-primary);
}

.news-show-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 新闻元信息 */
.news-show-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.news-show-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-show-meta i {
    font-size: 11px;
}

/* 阅读更多链接 */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s;
}

.read-more:hover {
    color: var(--color-accent);
    gap: 8px;
}

/* ========== 分页组件 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 8px;
    
    border-radius: 4px;
    
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination a:hover {
    background: var(--color-accent);
    color: #fff;
}

.pagination .current {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.pagination .dots {
    border: none;
    color: #999;
    cursor: default;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1024px) {
    .news-show-area {
        padding: 25px 20px;
    }
    .news-show-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-show-center {
        padding: 20px 0 40px;
    }
    .news-show-area {
        padding: 20px 15px;
    }
    .news-show-header h2 {
        font-size: 20px;
    }
    .news-show-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .news-show-img {
        height: 180px;
    }
    .news-show-content h3 {
        font-size: 15px;
    }
    .pagination {
        gap: 5px;
    }
    .pagination a,
    .pagination span {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}