/* 统一移动端文字排版优化 */
/* 适用于所有页面，保持与index页面一致的文字显示效果 */

/* PC端保护样式 - 确保大屏幕不受影响 */
@media screen and (min-width: 769px) {
    /* 确保PC端保持原有样式，不被移动端CSS影响 */
    * {
        word-wrap: inherit !important;
        word-break: inherit !important;
        hyphens: inherit !important;
        -webkit-hyphens: inherit !important;
        -ms-hyphens: inherit !important;
        overflow-wrap: inherit !important;
    }
    
    h1, h2, h3, h4, h5, h6, p {
        font-size: inherit !important;
        line-height: inherit !important;
        margin-bottom: inherit !important;
        text-align: inherit !important;
        white-space: inherit !important;
        max-width: inherit !important;
        padding: inherit !important;
    }
    
    .container {
        width: inherit !important;
        max-width: inherit !important;
        padding: inherit !important;
        margin: inherit !important;
    }
    
    .feature-card,
    .power-solution-item {
        padding: inherit !important;
        margin-bottom: inherit !important;
    }
    
    .feature-card > div:first-child {
        flex-direction: inherit !important;
        align-items: inherit !important;
        margin-bottom: inherit !important;
    }
    
    .feature-card > div:first-child > div {
        margin-right: inherit !important;
        margin-bottom: inherit !important;
    }
    
    nav a,
    .btn {
        font-size: inherit !important;
        line-height: inherit !important;
        padding: inherit !important;
        white-space: inherit !important;
    }
    
    .logo h1 {
        font-size: inherit !important;
        line-height: inherit !important;
        white-space: inherit !important;
        max-width: inherit !important;
        overflow: inherit !important;
        text-overflow: inherit !important;
    }
}

/* 基础文字排版统一 */
@media screen and (max-width: 768px) {
    /* 全局文字基础设置 */
    * {
        word-wrap: break-word !important;
        word-break: normal !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
        -ms-hyphens: auto !important;
        overflow-wrap: break-word !important;
    }
    
    /* 标题层级统一 */
    h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
        text-align: center !important;
        white-space: normal !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        white-space: normal !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
        white-space: normal !important;
        max-width: 100% !important;
        padding: 0 10px !important;
    }
    
    h4, h5, h6 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
        white-space: normal !important;
        max-width: 100% !important;
        padding: 0 10px !important;
    }
    
    /* 段落文字统一 */
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
        white-space: normal !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        text-align: left !important;
    }
    
    /* 居中段落特殊处理 */
    p[style*="text-align: center"],
    .text-center p,
    .intro-text,
    .presentation-content p,
    .passive-content p,
    .contact-intro {
        text-align: center !important;
        padding: 0 20px !important;
    }
    
    /* 容器统一设置 */
    .container {
        width: 95% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
    }
    
    /* Products页面特殊优化 */
    .products-intro h2 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin-bottom: 25px !important;
        padding: 0 20px !important;
        white-space: normal !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
    }
    
    .intro-text {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        padding: 0 25px !important;
        margin-bottom: 0 !important;
        text-align: center !important;
        white-space: normal !important;
    }
    
    .products-features h2,
    .product-presentation h2,
    .passive-components h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 25px !important;
        padding: 0 20px !important;
        white-space: normal !important;
    }
    
    /* Feature卡片文字优化 */
    .feature-card h3 {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        white-space: normal !important;
        padding: 0 10px !important;
        text-align: left !important;
    }
    
    .feature-card p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        padding: 0 10px !important;
        text-align: left !important;
        white-space: normal !important;
    }
    
    /* Feature卡片布局优化 */
    .feature-card {
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
    }
    
    .feature-card > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 15px !important;
    }
    
    .feature-card > div:first-child > div {
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .feature-card p {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Solution标题优化 */
    .solution-title h3 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        text-align: center !important;
        white-space: normal !important;
    }
    
    /* Power solution items优化 */
    .power-solution-item {
        padding: 25px 20px !important;
        margin-bottom: 25px !important;
    }
    
    /* About页面特殊优化 */
    .story-text p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-align: left !important;
        padding: 0 15px !important;
        margin-bottom: 15px !important;
        white-space: normal !important;
    }
    
    /* Contact页面优化 */
    .contact-info h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        padding: 0 15px !important;
    }
    
    .info-item h3 {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        white-space: normal !important;
        padding: 0 !important;
    }
    
    .info-item p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 8px !important;
        white-space: normal !important;
        padding: 0 !important;
        text-align: left !important;
    }
    
    .contact-intro {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        padding: 0 15px !important;
    }
    
    /* 地址详情优化 */
    .address-details p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 5px !important;
        text-align: left !important;
        padding: 0 !important;
        white-space: normal !important;
    }
    
    /* 表单标签优化 */
    .form-group label {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
        white-space: normal !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        padding: 10px 12px !important;
    }
    
    /* 办公时间优化 */
    .office-hours h3 {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }
    
    .office-hours p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 5px !important;
        text-align: left !important;
        padding: 0 !important;
    }
}

/* 中等屏幕优化 */
@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
        padding: 0 12px !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
        padding: 0 12px !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        padding: 0 8px !important;
    }
    
    p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0 12px !important;
    }
    
    .container {
        width: 95% !important;
        padding: 0 12px !important;
    }
    
    /* Products页面480px优化 */
    .products-intro h2 {
        font-size: 1.4rem !important;
        padding: 0 15px !important;
    }
    
    .intro-text {
        font-size: 1rem !important;
        padding: 0 20px !important;
    }
    
    .products-features h2,
    .product-presentation h2,
    .passive-components h2 {
        font-size: 1.3rem !important;
        padding: 0 15px !important;
    }
    
    .feature-card h3 {
        font-size: 1.1rem !important;
        padding: 0 8px !important;
    }
    
    .feature-card p {
        font-size: 0.95rem !important;
        padding: 0 8px !important;
    }
    
    .solution-title h3 {
        font-size: 1.8rem !important;
    }
    
    .feature-card {
        padding: 18px 12px !important;
    }
    
    .power-solution-item {
        padding: 20px 15px !important;
    }
    
    /* Contact页面480px优化 */
    .contact-info h2 {
        font-size: 1.3rem !important;
        padding: 0 12px !important;
    }
    
    .info-item h3 {
        font-size: 1.1rem !important;
    }
    
    .info-item p {
        font-size: 0.9rem !important;
    }
    
    .contact-intro {
        font-size: 0.95rem !important;
        padding: 0 12px !important;
    }
    
    .address-details p {
        font-size: 0.85rem !important;
    }
}

/* 小屏幕优化 */
@media screen and (max-width: 360px) {
    h1 {
        font-size: 1.4rem !important;
        line-height: 1.1 !important;
        padding: 0 10px !important;
    }
    
    h2 {
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
        padding: 0 10px !important;
    }
    
    h3 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        padding: 0 8px !important;
    }
    
    p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        padding: 0 10px !important;
    }
    
    .container {
        width: 95% !important;
        padding: 0 10px !important;
    }
    
    /* Products页面360px优化 */
    .products-intro h2 {
        font-size: 1.2rem !important;
        padding: 0 12px !important;
    }
    
    .intro-text {
        font-size: 0.95rem !important;
        padding: 0 15px !important;
    }
    
    .products-features h2,
    .product-presentation h2,
    .passive-components h2 {
        font-size: 1.1rem !important;
        padding: 0 12px !important;
    }
    
    .feature-card h3 {
        font-size: 1rem !important;
        padding: 0 6px !important;
    }
    
    .feature-card p {
        font-size: 0.9rem !important;
        padding: 0 6px !important;
    }
    
    .solution-title h3 {
        font-size: 1.6rem !important;
    }
    
    .feature-card {
        padding: 15px 10px !important;
    }
    
    .power-solution-item {
        padding: 18px 12px !important;
    }
    
    /* Contact页面360px优化 */
    .contact-info h2 {
        font-size: 1.2rem !important;
        padding: 0 10px !important;
    }
    
    .info-item h3 {
        font-size: 1rem !important;
    }
    
    .info-item p {
        font-size: 0.85rem !important;
    }
    
    .contact-intro {
        font-size: 0.9rem !important;
        padding: 0 10px !important;
    }
    
    .address-details p {
        font-size: 0.8rem !important;
    }
}

/* 长文字内容特殊处理 */
@media screen and (max-width: 768px) {
    /* 长段落文字优化 */
    .intro-card p,
    .presentation-content p,
    .passive-content p {
        white-space: normal !important;
        word-break: normal !important;
        hyphens: auto !important;
        text-align: center !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    
    /* 确保所有内联样式的文字也能正常换行 */
    [style*="font-size"] {
        white-space: normal !important;
        word-break: normal !important;
        hyphens: auto !important;
        overflow-wrap: break-word !important;
    }
    
    /* 特殊元素文字处理 */
    .specialization-banner p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        padding: 0 20px !important;
        white-space: normal !important;
        text-align: center !important;
    }
    
    .specialization-banner strong {
        font-size: 1.1rem !important;
        white-space: normal !important;
    }
    
    /* 统计数字区域 */
    .who-we-are-stats .stat-number {
        font-size: 2rem !important;
        line-height: 1.1 !important;
    }
    
    .who-we-are-stats .stat-label {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }
    
    /* 大标题区域 */
    .featured-products h2,
    .video-section h2,
    .cta h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
        white-space: normal !important;
    }
    
    .cta p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        padding: 0 20px !important;
        text-align: center !important;
        white-space: normal !important;
    }
    
    /* 特殊横幅优化 */
    .specialization-banner {
        padding: 20px 15px !important;
        margin: 0 15px 30px 15px !important;
    }
}

/* 移动端导航和按钮文字 */
@media screen and (max-width: 768px) {
    nav a {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        padding: 14px 20px !important;
        white-space: normal !important;
    }
    
    .btn {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        padding: 12px 18px !important;
        white-space: nowrap !important;
    }
    
    .logo h1 {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        max-width: 200px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* 横屏模式优化 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }
    
    p {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }
    
    .feature-card {
        padding: 15px 12px !important;
    }
    
    .power-solution-item {
        padding: 20px 15px !important;
    }
}

/* 高分辨率屏幕优化 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    h1, h2, h3, h4, h5, h6, p {
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
}

/* 性能优化 */
@media screen and (max-width: 768px) {
    h1, h2, h3, h4, h5, h6, p {
        will-change: auto !important;
        contain: layout style !important;
    }
}

/* 确保所有页面标题居中 */
@media screen and (max-width: 768px) {
    .page-header h1,
    section > .container > h1,
    section > .container > h2 {
        text-align: center !important;
        padding: 0 15px !important;
        white-space: normal !important;
        word-break: normal !important;
    }
} 