/* ============================================================
   aegmas.chiyekeji.top 首页移动端兼容补丁
   用法：在 </head> 前引入，或把内容粘到平台"自定义CSS"里
   原则：只在窄屏生效，PC 端样式完全不受影响
   ============================================================ */

/* ---------- 1. 通用防护：图片不超屏、容器不写死 ---------- */
@media screen and (max-width: 767px) {

    img { max-width: 100%; height: auto; }

    /* 建站系统遗留的固定宽度容器，全部放开 */
    .page,
    .page1,
    .page2 {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 15px !important;
        box-sizing: border-box;
    }
    .page { margin-top: 80px !important; } /* 顶部固定导航更矮，减小预留 */

    /* ---------- 2. 顶部导航 ---------- */
    .header-inner { padding: 12px 16px; }
    .logo-box img { height: 40px !important; }
    /* 手机端彻底隐藏 PC 悬浮导航（滚动脚本改的透明度也压不住 display:none） */
    .nav-pc-wrap { display: none !important; }

    /* ---------- 3. 首屏轮播 ---------- */
    .banner-swiper { min-height: 480px; }
    .banner-title { font-size: 26px !important; padding: 0 16px; }
    .banner-bottom-info { padding: 0 16px; }
    .scroll-down { display: none; } /* 手机上"Scroll down"提示意义不大，可按需删掉这行 */

    /* ---------- 4. 产品中心横向滚动区（原 1600px 写死） ---------- */
    .pro-swiper-wrap {
        width: 100% !important;
        padding: 10px 15px !important;
        box-sizing: border-box;
    }

    /* ---------- 5. 服务流程区（原 1400px + 6 张 218px 浮动图） ---------- */
    /* 模板自带 max-width:768px 时 .g_lc{display:none}，会把卡片区整个藏掉造成大片空白，恢复显示 */
    .g_lc { display: block !important; height: auto !important; }
    .g_lc1 img { width: 100%; height: auto; display: none; } /* fwlc.jpg 大图适配 */
    .m_lc { height: auto !important; margin-top: 20px !important; }
    .g_lc dl {
        width: calc(50% - 7px) !important;
        margin-right: 14px;
        margin-bottom: 20px;
        float: left;
    }
    .g_lc dl:nth-of-type(2n) { margin-right: 0; }
    .g_lc dt,
    .g_lc dt img { width: 100% !important; height: auto !important; }
    /* 文案块从"叠在图片上"改为正常排在图片下方 */
    .g_lc dd {
        position: static !important;
        width: 100% !important;
        margin-top: 8px;
    }
    .wz_bt span { font-size: 22px !important; } /* 原 40px 标题 */
    .wz_bt p { font-size: 14px !important; }

    /* ---------- 6. Our Advantages 区（原 1500px 容器 + 100vh 固定高） ---------- */
    .advantage-wrap1 { height: auto !important; padding: 40px 15px !important; }
    .advantage-wrap3 { width: 100% !important; }
    .advantage-title { font-size: 26px !important; margin-top: 30px !important; margin-bottom: 20px !important; }
    .advantage-title1 { line-height: 1.8 !important; margin-bottom: 24px !important; }
    .advantage-container { grid-template-columns: 1fr !important; gap: 20px; }
    .advantage-right { order: -1; margin-bottom: 10px; }
    .adv-item { padding: 14px; }
    .adv-cert-btn { padding: 12px 24px; font-size: 14px; }

    /* ---------- 7. 资质证书区（手机上停用跑马灯，改两列网格） ---------- */
    .certificate-wrap { margin-top: 40px !important; padding: 40px 15px !important; }
    .certificate-title { font-size: 26px !important; }
    .certificate-sub { font-size: 14px !important; margin-bottom: 24px !important; }
    .marquee-inner {
        animation: none !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .cert-item { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .cert-card { padding: 10px !important; }
    .cert-card img { object-fit: contain !important; background: #f7f7f7 !important; }
    .cert-name { font-size: 14px !important; }
    /* 跑马灯复制的第二组证书在网格里是重复内容，隐藏 */
    .marquee-inner .cert-item:nth-of-type(n+7) { display: none; }

    /* ---------- 8. 页脚"出口全球"地图区
          （原页内媒体查询选择器写错为 .container，这里修正为 .container1） ---------- */
    .global-footer-block { padding: 40px 16px !important; }
    .container1 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 24px !important;
    }
    .text-part { flex: 0 0 auto !important; width: 100% !important; }
    .map-part  { flex: 0 0 auto !important; width: 100% !important; }
    .text-part h2 { font-size: 26px !important; margin-bottom: 14px !important; }
    .text-part p  { font-size: 15px !important; margin-bottom: 20px !important; }
    .more-btn { padding: 12px 28px; font-size: 15px; }

    /* ---------- 9. 服务中心 / 新闻区 ---------- */
    .sy-fwbox {
        background-attachment: scroll !important; /* 手机上 fixed 背景会卡顿且不渲染 */
        padding: 3rem 0 !important;
    }
    .syfwtit { font-size: 2rem !important; }
    .synews { padding-bottom: 6rem !important; }
    .synewswztit { font-size: 2rem !important; }
    .syfwboxbotlistbox { margin-bottom: 12px; }

    /* ---------- 10. 左侧悬浮联系栏缩小，避免遮挡 ---------- */
    .side-contact-box { transform: translateY(-50%) scale(0.85); transform-origin: left center; }
}

/* 平板竖屏（768~991px）顺手放开两个最宽的容器 */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .pro-swiper-wrap { width: 100% !important; padding: 10px 20px; box-sizing: border-box; }
    .advantage-wrap3 { width: 100% !important; padding: 0 20px; box-sizing: border-box; }
    .advantage-wrap1 { height: auto !important; }
    /* 模板在 max-width:768px 隐藏了服务流程卡片区，平板竖屏恢复并做三列 */
    .g_lc { display: block !important; height: auto !important; }
    .m_lc { height: auto !important; margin-top: 20px !important; }
    .g_lc dl {
        width: calc((100% - 28px) / 3) !important;
        margin-right: 14px;
        margin-bottom: 20px;
        float: left;
    }
    .g_lc dl:nth-of-type(3n) { margin-right: 0; }
    .g_lc dt, .g_lc dt img { width: 100% !important; height: auto !important; }
    .g_lc dd { position: static !important; width: 100% !important; margin-top: 8px; }
    /* 资质证书：平板上同样停用跑马灯，三列网格 */
    .marquee-inner {
        animation: none !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px;
    }
    .cert-item { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .marquee-inner .cert-item:nth-of-type(n+7) { display: none; }
}
