:root {
    --primary: #0052CC;
    --primary-light: rgba(0, 82, 204, 0.08);
    --primary-dark: #0042a5;
    --text-dark: #1a202c;
    --text-normal: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-gray: #f6f8fc;
    --radius: 10px;
}

/* 通用区块基础 */
.news-wrap,
.news-detail-section {
    background: #ffffff;
    padding: 60px 0;
}

/* 侧边栏 */
.news-sidebar .sidebar-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.news-sidebar .sidebar-title {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem 1.2rem;
    margin: 0;
    background: var(--primary);
    color: #fff;
}
.cate-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cate-list li a {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    color: var(--text-normal);
    text-decoration: none;
    border-bottom: 1px solid #f1f4f9;
    transition: 0.22s ease;
}
.cate-list li:last-child a {
    border-bottom: none;
}
.cate-list li.active a,
.cate-list li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.cate-list .count {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* 新闻列表项 */
.news-item {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    transition: all 0.26s ease;
}
.news-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 82, 204, 0.18);
}
.news-item-inner {
    display: flex;
    gap: 1.2rem;
}
.news-item-thumb {
    width: 220px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-gray);
}
.news-item-thumb img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.news-item:hover .news-item-thumb img {
    transform: scale(1.04);
}
.news-item-body {
    flex: 1;
}
.news-item-body.no-thumb {
    padding-top: 0.2rem;
}
.news-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
    line-height: 1.45;
}
.news-item-title a {
    color: var(--text-dark);
    text-decoration: none;
}
.news-item-title a:hover {
    color: var(--primary);
}
.tag-hot {
    display: inline-block;
    background: #e53e3e;
    color: #fff;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}
.news-item-summary {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1rem;
    font-size: 0.82rem;
    color: var(--text-light);
}
.news-item-meta i {
    margin-right: 4px;
}
.read-more {
    margin-left: auto;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.read-more:hover {
    color: var(--primary-dark);
}

/* 空状态 */
.empty-tips {
    text-align: center;
    padding: 5rem 2rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.empty-icon {
    font-size: 3.6rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}
.btn-blue {
    display: inline-block;
    padding: 0.55rem 1.4rem;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    border: none;
    text-decoration: none;
    transition: background 0.22s;
    cursor: pointer;
}
.btn-blue:hover {
    background: var(--primary-dark);
    color: #fff;
}
.btn-blue-outline {
    display: inline-block;
    padding: 0.55rem 1.4rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.22s;
    cursor: pointer;
}
.btn-blue-outline:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* 分页 */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* ====================== 新闻详情样式（统一体系修复） ====================== */
.news-detail-section {
    padding: 70px 0;
}
.detail-card {
    margin-bottom: 48px;
}

/* 头部标题区域 */
.detail-header {
    margin-bottom: 36px;
}
.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0 0 16px;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-light);
    font-size: 0.95rem;
}
.meta-item i {
    margin-right: 6px;
}

/* 正文 */
.detail-content {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-normal);
}
.detail-content p {
    margin-bottom: 1.2rem;
}
.detail-content img {
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
    margin: 16px auto;
    display: block;
}
.detail-content h2,
.detail-content h3,
.detail-content h4 {
    margin: 2rem 0 1rem;
    color: var(--text-dark);
    font-weight: 600;
}
.detail-content ul,
.detail-content ol {
    padding-left: 1.8rem;
    margin-bottom:1.2rem;
}

/* 工具栏 */
.detail-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}
.toolbar-group {
    display: flex;
    gap: 12px;
}

/* 上下篇导航 */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 60px 0;
}
.nav-link {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: 0.24s ease;
    text-decoration: none;
}
.nav-link:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.nav-label {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 6px;
}
.nav-text {
    color: var(--text-dark);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.empty-link {
    cursor: default;
}
.empty-link:hover {
    background: transparent !important;
}

/* 相关资讯区块 */
.related-block {
    margin-top: 60px;
}
.block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.block-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}
.block-desc {
    color: var(--text-light);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}
.related-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.26s ease;
    opacity: 0;
    transform: translateY(14px);
}
.related-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-color: rgba(0, 82, 204, 0.16);
}
.related-link {
    text-decoration: none;
    display: block;
}
.related-pic {
    width: 100%;
    height: 140px;
    background: var(--bg-gray);
    overflow: hidden;
}
.related-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.related-card:hover .related-pic img {
    transform: scale(1.04);
}
.related-pic.no-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}
.related-card-title {
    padding: 14px;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 图片预览弹窗 兼容Bootstrap */
.preview-modal .modal-header,
.preview-modal .modal-footer {
    background: #111;
}
.preview-modal .modal-title {
    color: #fff;
}
.preview-body {
    background: #000;
    text-align: center;
    padding:1rem;
}
.preview-image {
    max-width: 100%;
    max-height: 80vh;
}

/* 打印样式 */
@media print {
    header, footer, .detail-toolbar, .article-nav, .related-block, #imagePreviewModal, .banner-wrap {
        display: none !important;
    }
    .news-wrap,
    .news-detail-section {
        padding: 0 !important;
    }
    .detail-content {
        font-size:16px;
    }
}

/* ========== 响应式全局修复 ========== */
@media (max-width: 991.98px) {
    .news-wrap,
    .news-detail-section {
        padding: 40px 0;
    }
    .news-item-inner {
        flex-direction: column;
    }
    .news-item-thumb {
        width: 100%;
    }
    .news-item-thumb img {
        height: 180px;
    }
    .read-more {
        margin-left: 0;
        margin-top: 6px;
    }
    .detail-title {
        font-size: 1.6rem;
    }
    .article-nav {
        grid-template-columns: 1fr;
    }
    .next-link {
        text-align: left !important;
    }
}

@media (max-width: 575.98px) {
    .news-wrap,
    .news-detail-section {
        padding: 30px 0;
    }
    .news-item {
        padding: 1rem;
    }
    .news-item-title {
        font-size: 1rem;
    }
    .news-item-thumb img {
        height: 140px;
    }
    .news-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .detail-title {
        font-size: 1.4rem;
    }
    .detail-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .related-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 16px;
    }
}