
/* ========== 文章增强样式（修复版） ========== */

/* 目录导航 */
.article-toc {
    background: rgba(255,255,255,0.06);
    border-left: 4px solid #d4af37;
    border-radius: 0 8px 8px 0;
    padding: 20px 25px;
    margin: 30px 0;
}

.article-toc-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-toc-title::before {
    content: "📋";
    font-size: 18px;
}

.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.article-toc-list li:last-child {
    border-bottom: none;
}

.article-toc-list a {
    color: #DDD8C8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    padding-left: 5px;
}

.article-toc-list a:hover {
    color: #d4af37;
    padding-left: 10px;
}

.article-toc-list .toc-h3 {
    padding-left: 20px;
    font-size: 13px;
    color: #BFB9A8;
}

/* 核心数据卡片 - 修复：深色背景白字，浅色背景深字 */
.data-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.data-card {
    background: linear-gradient(135deg, #1a365d 0%, #2d5a87 100%);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4af37;
}

.data-card-number {
    font-size: 28px;
    font-weight: bold;
    color: #d4af37;
    line-height: 1.2;
    margin-bottom: 8px;
}

.data-card-label {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0.95;
}

/* 对比表格 */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comparison-table thead {
    background: linear-gradient(135deg, #1a365d, #2d5a87);
    color: #ffffff;
}

.comparison-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 14px;
    color: #F0EDE4;
    line-height: 1.6;
}

.comparison-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.06);
}

.comparison-table tbody tr:hover {
    background: rgba(255,255,255,0.06);
}

.comparison-table .highlight {
    color: #d4af37;
    font-weight: 600;
}

/* 案例/证言模块 - 修复：确保深色文字在浅色背景上 */
.case-testimonial {
    background: rgba(255,255,255,0.06);
    border-left: 4px solid #d4af37;
    border-radius: 0 8px 8px 0;
    padding: 24px 28px;
    margin: 30px 0;
    position: relative;
}

.case-testimonial::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 60px;
    color: rgba(212, 175, 55, 0.25);
    font-family: Georgia, serif;
    line-height: 1;
}

.case-testimonial-text {
    font-size: 15px;
    color: #E0C98F;
    line-height: 1.8;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.case-testimonial-author {
    font-size: 13px;
    color: #E0C98F;
    font-weight: 600;
    text-align: right;
}

.case-testimonial-author span {
    font-weight: normal;
    color: #E0C98F;
}

/* 亮点清单 */
.highlight-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 25px 0;
}

.highlight-box-title {
    font-weight: 600;
    color: #6FD8A0;
    margin-bottom: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-box ul {
    margin: 0;
    padding-left: 20px;
}

.highlight-box li {
    padding: 4px 0;
    color: #6FD8A0;
    font-size: 14px;
    line-height: 1.6;
}

/* 注意/提示框 */
.notice-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 25px 0;
}

.notice-box-title {
    font-weight: 600;
    color: #E0C98F;
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-box p {
    color: #E0C98F;
    font-size: 14px;
    margin: 0;
    line-height: 1.7;
}

/* 相关阅读 */
.related-articles {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.related-articles-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles-title::before {
    content: "📚";
    font-size: 22px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.related-card-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #1a365d, #2d5a87);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 32px;
}

.related-card-body {
    padding: 15px;
}

.related-card-category {
    font-size: 12px;
    color: #d4af37;
    margin-bottom: 6px;
    font-weight: 500;
}

.related-card-title {
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.5;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 阅读进度条 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f6d365);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========== 移动端适配（重点优化） ========== */
@media (max-width: 768px) {
    /* 数据卡片：手机上改成2列，字号缩小，确保不折行 */
    .data-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .data-card {
        padding: 16px 10px;
        border-radius: 8px;
    }
    
    .data-card-number {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .data-card-label {
        font-size: 12px;
        line-height: 1.3;
        word-break: keep-all;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 对比表格：手机端横向滚动，字号缩小 */
    .comparison-table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* 证言模块：手机端padding缩小 */
    .case-testimonial {
        padding: 18px 18px;
        margin: 20px 0;
    }
    
    .case-testimonial-text {
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* 目录导航 */
    .article-toc {
        padding: 15px;
        margin: 20px 0;
    }
    
    /* 相关阅读：手机端单列 */
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-card-img {
        height: 120px;
    }
    
    /* 亮点/提示框 */
    .highlight-box,
    .notice-box {
        padding: 15px 18px;
        margin: 20px 0;
    }
}



/* ========== 深主题下浅色容器文字颜色兜底（完整版） ========== */
/* 防止深背景白字的文章里，浅色容器内文字也是白色看不见 */

/* 通用：所有浅背景的容器内文字强制深色 */
.article-content [style*="background: #f"],
.article-content [style*="background: #e"],
.article-content [style*="background-color: #f"],
.article-content [style*="background-color: #e"],
.article-content [style*="background: white"],
.article-content [style*="background: rgb(255"],
.article-content [style*="background-color: white"],
.article-content [style*="background-color: rgb(255"],
.article-content [style*="background: #F"],
.article-content [style*="background-color: #F"] {
    color: #F0EDE4 !important;
}

/* 内部子元素也继承深色 */
.article-content [style*="background: #f"] > *,
.article-content [style*="background: #e"] > *,
.article-content [style*="background-color: #f"] > *,
.article-content [style*="background-color: #e"] > *,
.article-content [style*="background: white"] > *,
.article-content [style*="background-color: white"] > * {
    color: #F0EDE4 !important;
}

.article-content [style*="background: #f"] p,
.article-content [style*="background: #e"] p,
.article-content [style*="background-color: #f"] p,
.article-content [style*="background-color: #e"] p,
.article-content [style*="background: white"] p,
.article-content [style*="background-color: white"] p,
.article-content p[style*="background: #f"],
.article-content p[style*="background: #e"],
.article-content p[style*="background-color: #f"],
.article-content p[style*="background-color: #e"] {
    color: #F0EDE4 !important;
}

.article-content [style*="background: #f"] td,
.article-content [style*="background: #e"] td,
.article-content [style*="background-color: #f"] td,
.article-content [style*="background-color: #e"] td,
.article-content [style*="background: white"] td,
.article-content [style*="background-color: white"] td {
    color: #F0EDE4 !important;
}

.article-content [style*="background: #f"] li,
.article-content [style*="background: #e"] li,
.article-content [style*="background-color: #f"] li,
.article-content [style*="background-color: #e"] li {
    color: #F0EDE4 !important;
}

.article-content [style*="background: #f"] strong,
.article-content [style*="background: #e"] strong,
.article-content [style*="background-color: #f"] strong,
.article-content [style*="background-color: #e"] strong {
    color: #1f2937 !important;
}

.article-content [style*="background: #f"] h1,
.article-content [style*="background: #f"] h2,
.article-content [style*="background: #f"] h3,
.article-content [style*="background: #f"] h4,
.article-content [style*="background: #e"] h1,
.article-content [style*="background: #e"] h2,
.article-content [style*="background: #e"] h3,
.article-content [style*="background: #e"] h4 {
    color: #1f2937 !important;
}
