/* 
 * 首页文字优化 - 仅优化文字相关问题
 * 保持所有原有布局和视觉效果，只改进文字排版
 */

/* ==================== 1. 字体优化 ==================== */

/* 使用Arial字体 */
body {
    font-family: Arial, sans-serif !important;
}

a {
    text-decoration: none;
}
/* ==================== 2. 字体层级优化 ==================== */

/* 大标题统一 - Hero区域 */
.hero h1 {
    font-size: clamp(28px, 4vw, 40px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* 中标题统一 - 各区块标题（加强优先级） */
.section-title h2,
.product-series .section-title h2,
.projects .section-title h2,
.about .section-title h2,
.news .section-title h2,
.full-chain .full-chain-title,
.full-chain-title {
    font-size: clamp(24px, 3vw, 32px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
}

/* 小标题统一 - 产品卡片、联系表单等（加强优先级） */
.product-card h3,
.full-chain .product-card h3,
.contact-form h3,
.footer-success-content h3 {
    /*font-size: clamp(18px, 2.5vw, 24px) !important;*/
    font-weight: 600 !important;
    line-height: 1.3 !important;
    /*color: #333 !important;*/
}

/* 产品名称统一 - h4标签（加强优先级） */
.product-item h4,
.product-grid .product-item h4 {
    font-size: clamp(16px, 2vw, 20px) !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    /*color: #333 !important;*/
    padding: 20px !important;
    text-align: center !important;
    margin: 0 !important;
}

/* 新闻标题统一 - 与小标题同级 */
.wp-block-media-text__content h2,
.content-title h2,
.news .wp-block-media-text__content h2 {
    font-size: clamp(18px, 2.5vw, 24px) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    /*color: #333 !important;*/
}

/* 统计数据数字统一 */
.stat-number,
.patent-number {
    font-size: clamp(32px, 5vw, 48px) !important;
    font-weight: 700 !important;
    /*color: #09a2e6 !important;*/
    line-height: 1 !important;
}

/* 正文统一 */
p, 
.full-chain-desc,
.about-description p,
.wp-block-media-text__content p {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* 辅助文字统一 */

/* ==================== 3. 手机端字体适配 ==================== */

@media (max-width: 768px) {
    /* 确保手机端文字不小于14px */
    p, 
    .full-chain-desc,
    .about-description p,
    .wp-block-media-text__content p {
        font-size: 14px !important;
    }
    
    /* 手机端标题适配 */
    .hero h1 {
        font-size: clamp(24px, 6vw, 32px) !important;
    }
    
    .section-title h2,
    .full-chain-title {
        font-size: clamp(20px, 5vw, 28px) !important;
    }
}

/* ==================== 4. 文字对齐优化 ==================== */

/* 确保所有文字左对齐 */
.section-title,
.full-chain-header,
.about-description,
.wp-block-media-text__content {
    text-align: left !important;
}

/* ==================== 5. 英文标点符号优化 ==================== */

/* 优化英文字体渲染 */
* {
    font-feature-settings: "kern" 1;
    text-rendering: optimizeLegibility;
}

/* 确保英文标点符号正确显示 */
body {
    font-variant-numeric: oldstyle-nums;
}

/* ==================== 6. 行间距优化 ==================== */

/* 标题行间距紧凑 */
.hero h1,
.section-title h2,
.full-chain-title,
.product-card h3 {
    line-height: 1.2 !important;
}

/* 正文行间距适中 */
p,
.full-chain-desc,
.about-description p {
    line-height: 1.6 !important;
}

/* ==================== 7. 段落间距优化 ==================== */

/* 段落之间间隔 */
p + p {
    margin-top: 1em;
}

/* 标题与正文间距 */
.section-title h2 + p,
.full-chain-title + .full-chain-desc {
    /*margin-top: 16px;*/
}

/* ==================== 8. 文字可读性优化 ==================== */

/* 防止文字溢出 */
.section-title h2,
.full-chain-title,
.product-card h3,
.news h2,
p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 限制行长度提高可读性 */
.full-chain-desc,
.about-description p {
    /*max-width: 65ch;*/
}

/* ==================== 9. 颜色对比度优化 ==================== */

/* 确保文字颜色对比度足够 */
.hero h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 确保正文颜色清晰 */
p,
.full-chain-desc {
    /*color: #333 !important;*/
}

/* 辅助文字颜色 */
.news-date,
.patent-text {
    /*color: #666 !important;*/
}
