/* 专为手机端 / 平板屏幕适配的 CSS */

@media screen and (max-width: 1199px) {

    /* 基础重置，防止横向滚动条 */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* 强制所有可能的容器宽度自适应 */
    .inside,
    .container,
    .main,
    .wrapper,
    .content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 图片防止撑破屏幕 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 缩小移动端 Logo，防止过大撑破头部栏 */
    .header_logo {
        display: inline-block !important;
        max-width: 65% !important;
    }

    .header_logo img {
        max-height: 40px !important;
        width: auto !important;
    }

    .header {
        padding: 5px 15px !important;
    }

    /* ====== 头部导航适配 ====== */
    /* 隐藏 PC 端长导航，准备作下拉式 */
    .header .nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100% !important;
        background: #ffffff !important;
        flex-direction: column !important;
        padding-bottom: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important;
        z-index: 9999999 !important;
        /* 确保在最上层 */
        border-top: 1px solid #f0f0f0 !important;
    }

    /* common.js 中点击 nav-icon 会给 header 添加 mactive */
    .header.mactive .nav,
    .header.on .nav {
        display: block !important;
        padding: 0 !important;
    }

    /* 移动端汉堡按钮（nav-icon）显示 */
    .nav-icon {
        display: block !important;
        cursor: pointer;
        padding: 5px;
    }

    /* 优化导航项目样式 */
    .header .nav-item {
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        border-bottom: 1px solid #f9f9f9 !important;
        background: #ffffff !important;
        box-sizing: border-box !important;
        display: block !important;
        position: relative !important;
    }

    .header .nav .nav-item>a {
        display: block !important;
        padding: 15px 20px !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 暴力隐藏原来拥挤在文字内的旧箭头 */
    .header .nav .nav-item .has_subnav::before,
    .header .nav .nav-item .has_subnav::after {
        display: none !important;
        content: '' !important;
    }

    /* 新增加的独立展开箭头 */
    .m-sub-arrow {
        display: flex !important;
        position: absolute;
        right: 0;
        top: 0;
        width: 60px;
        height: 52px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        border-left: 1px solid #f2f2f2;
    }

    .m-sub-arrow::after {
        content: '';
        width: 10px;
        height: 10px;
        border-right: 2px solid #7d8c7e;
        border-bottom: 2px solid #7d8c7e;
        transform: rotate(45deg);
        transition: transform 0.3s;
        margin-top: -6px;
    }

    .nav-item.open .m-sub-arrow::after {
        transform: rotate(225deg);
        margin-top: 4px;
    }



    /* ====== 列表与结构模块适配 ====== */
    /* 清除浮动或横向排列，改为上下堆叠显示 */
    .pull-left,
    .pull-right,
    .fl,
    .fr {
        float: none !important;
        width: 100% !important;
    }

    /* 将原有定宽居中的项目自适应 */
    ul li,
    .item,
    .list-item,
    .layui-col-xs6,
    .layui-col-md3 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }

    /* ====== 字体适配 ====== */
    /* 缩小首页巨大标题，防止撑满整屏 */
    .hp-h1,
    .hp-about-title,
    .hp-sec-title,
    .hp-center-hd h2 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }

    .hp-desc,
    .hp-about-lead {
        font-size: 15px !important;
    }

    /* 图片外层容器适当留白 */
    .hp-about-img-wrap {
        width: 280px !important;
        flex: 0 0 280px !important;
        margin: 0 auto !important;
    }

    .hp-about-row {
        gap: 40px !important;
    }

    /* Hero 首屏纵向堆叠防止重叠 */
    .hp-hero {
        padding: 80px 0 40px 0 !important;
        min-height: auto !important;
    }

    .hp-hero-row {
        flex-direction: column !important;
        gap: 60px !important;
    }

    .hp-hero-left {
        width: 100% !important;
        text-align: center !important;
    }

    .hp-hero-right {
        width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hp-btns {
        justify-content: center !important;
    }

    .hp-img-box {
        position: relative !important;
        width: 240px !important;
        height: 240px !important;
        margin: 0 auto !important;
    }

    .hp-badge {
        position: relative !important;
        margin-top: -30px !important;
        bottom: auto !important;
        left: auto !important;
        z-index: 20 !important;
    }

    /* ====== 底部适配 ====== */
    .footer {
        padding: 40px 0 20px 0 !important;
    }

    .footer-section {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 20px !important;
    }

    .footer-list {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        line-height: 2 !important;
    }

    .footer-list a {
        margin: 0 10px !important;
    }

    .footer-right p {
        justify-content: center !important;
    }

    .m-fcode-box,
    .copyright {
        text-align: center !important;
    }
}