/* 移动端水平滚动修复 - 全局应用 */

/* 基础防溢出 */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* 所有元素盒模型 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 容器限制 */
main,
section,
.container,
.section-container,
.yzd-kp-index-box,
.hero-section,
.news-section,
.price-section,
.about-hero-section,
.article-hero-section,
.news-hero-section {
    overflow-x: hidden;
    max-width: 100%;
}

/* 图片防溢出 */
img {
    max-width: 100%;
    height: auto;
}

/* 表格响应式 */
table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* 代码块响应式 */
pre, code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

/* 移动端特定修复 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        position: relative;
    }

    * {
        max-width: 100vw;
    }

    /* 防止 fixed 定位元素导致溢出 */
    .hero-decoration,
    .floating-card {
        display: none !important;
    }

    /* 隐藏可能导致溢出的伪元素 */
    .hero-section::before,
    .price-hero-section::before,
    .about-hero-section::before,
    .article-hero-section::before,
    .cta-section::before,
    .contact-cta::before {
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        animation: none !important;
    }

    /* 容器padding调整 */
    .container,
    .section-container,
    .price-container,
    .news-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100% !important;
    }

    /* 网格布局响应式 */
    .version-grid,
    .payment-grid,
    .service-grid,
    .tools-grid,
    .modules-grid,
    .member-grid,
    .case-categories,
    .qualification-grid,
    .careers-grid,
    .info-grid,
    .news-grid,
    .price-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .container,
    .section-container,
    .price-container,
    .news-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
