/* 新闻详情页面统一样式表 */
/* 基于index.html的配色方案 */


/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}
audio, canvas, embed, iframe,  object, svg, video {
    display: inline-block;
    vertical-align: middle;
}
/* 新闻详情容器 */
.news-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

/* 新闻详情卡片 */
.news-detail-card {
    background: var(--bg-white);
   
    overflow: hidden;
}

/* 新闻头部信息 */
.news-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.news-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}
.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.news-category {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-orange) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-date,
.news-author,
.news-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-date i,
.news-author i,
.news-views i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* 新闻特色图片 */
.news-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* 新闻内容区域 */
.news-content {
    /* padding: 2rem; */
}

/* 新闻摘要 */
.news-summary {
    background: linear-gradient(135deg, var(--primary-light) 0%, #FFF8E1 100%);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    font-weight: 500;
}

/* 正文内容样式 */
.news-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.news-body h1,
.news-body h2,
.news-body h3,
.news-body h4,
.news-body h5,
.news-body h6 {
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
    line-height: 1.4;
}

.news-body h1 { font-size: 1.75rem; }
.news-body h2 { font-size: 1.5rem; }
.news-body h3 { font-size: 1.25rem; }
.news-body h4 { font-size: 1.125rem; }
.news-body h5 { font-size: 1rem; }
.news-body h6 { font-size: 0.875rem; }

.news-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.news-body strong,
.news-body b {
    font-weight: 600;
   
}

.news-body em,
.news-body i {
    font-style: italic;
    color: var(--text-secondary);
}

.news-body u {
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
}

.news-body a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.news-body a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

/* 列表样式 */
.news-body ul,
.news-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.news-body ul li,
.news-body ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.news-body ul {
    list-style-type: disc;
}

.news-body ol {
    list-style-type: decimal;
}

.news-body ul ul,
.news-body ol ol {
    margin: 0.75rem 0;
}

/* 引用块样式 */
.news-body blockquote {
    background: linear-gradient(135deg, var(--primary-light) 0%, #FFF8E1 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-primary);
    position: relative;
}

.news-body blockquote::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
}

.news-body blockquote p {
    margin: 0;
    padding-left: 2rem;
}

/* 代码块样式 */
.news-body pre {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.news-body code {
    background: #F3F4F6;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.news-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 表格样式 */
.news-body table {
    /* width: 100%; */
    border-collapse: collapse;
    margin: 1rem auto;
    background: var(--bg-white);
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.news-body table th,
.news-body table td {
    padding: .5rem 1rem;
    /* text-align: left; */
    border-bottom: 1px solid var(--border-light);
}

.news-body table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-orange) 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.news-body table tr:hover {
    background: var(--bg-light);
}

/* 图片样式 */
.news-body img {
    max-width: 100%;
    height: auto;
    
    display: block;
}

.news-body figure {
    margin: 2rem 0;
    text-align: center;
}

.news-body figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* 分割线样式 */
.news-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    margin: 2rem 0;
}

/* 新闻标签 */
.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.news-tag {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

.news-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 相关新闻 */
.related-news {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    padding: 2rem;
    margin-top: 2rem;
}

.related-news h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.related-news h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-orange) 100%);
    border-radius: 2px;
}

.related-news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-news-item:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.related-news-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-news-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-content .date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 分享按钮 */
.news-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.news-share span {
    font-weight: 600;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.share-btn.wechat {
    background: #07C160;
}

.share-btn.weibo {
    background: #E6162D;
}

.share-btn.qq {
    background: #12B7F5;
}

.share-btn.copy {
    background: var(--primary-color);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-detail-container {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1.75rem;
    }
    
    .news-meta {
        /* flex-direction: column;
        align-items: flex-start; */
        gap: 0.75rem;
    }
    
    .news-featured-image {
        height: 250px;
    }
    
    .news-header,
    .news-content {
        padding: 1.5rem;
    }
    
    .related-news-list {
        grid-template-columns: 1fr;
    }
    
    .news-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .news-title {
        font-size: 1.5rem;
    }
    
    .news-header,
    .news-content {
        padding: 1rem;
    }
    
    .news-body h1 { font-size: 1.5rem; }
    .news-body h2 { font-size: 1.25rem; }
    .news-body h3 { font-size: 1.125rem; }
}

/* 打印样式 */
@media print {
    .news-detail-container {
        max-width: none;
        padding: 0;
    }
    
    .news-detail-card,
    .related-news {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .news-share,
    .related-news {
        display: none;
    }
    
    .news-body {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .news-title {
        font-size: 18pt;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* 高亮文本 */
.highlight {
    background: linear-gradient(120deg, var(--primary-light) 0%, transparent 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* 重要提示框 */
.important-note {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #F59E0B;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.important-note::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.25rem;
}

.important-note p {
    margin: 0;
    padding-left: 2rem;
    color: #92400E;
    font-weight: 500;
}

/* 成功提示框 */
.success-note {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #10B981;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.success-note::before {
    content: '✅';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.25rem;
}

.success-note p {
    margin: 0;
    padding-left: 2rem;
    color: #065F46;
    font-weight: 500;
}
/* 上一篇/下一篇导航样式 */
.news-navigation {
    /* margin-top: 3rem; */
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .nav-item.disabled {
        opacity: 0.4;
        pointer-events: none;
    }

.nav-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.nav-link {
    color: #1f2937;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .nav-link:hover {
        color: #D7000F;
    }

/*.nav-item.prev .nav-link:before {
    content: '← ';
    margin-right: 0.5rem;
}
*/
.nav-item.next {
    text-align: right;
}

/*    .nav-item.next .nav-link:after {
        content: ' →';
        margin-left: 0.5rem;
    }*/

@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }
.news-body table td {
    padding: .5rem;
    /* text-align: left; */
    border-bottom: 1px solid var(--border-light);
}
    .nav-item.next {
        text-align: left;
    }
}