/* ============================================================
   整站移动端自适应  —  鸿鑫电脑 (hongxin)
   断点：1199 平板以下容器流式  /  992 平板  /  768 手机  /  480 小屏
   该文件在所有 PC 模板 </head> 前最后加载，覆盖前述固定宽度。
   ============================================================ */

/* ---------- 1. 全局容器流式化（≤1199px） ---------- */
@media screen and (max-width: 1199px) {
    body { min-width: 0 !important; }
    .header, .content, .footer,
    .footer-container, .blk-main, .blk-xs, .blk-sm,
    .part_c, .part_cc, .case_c, .honr_c, .honr_cl ul, .link p,
    .service-grid, .pro_list, .about_l, .about_r, .ban_t {
        width: 100% !important;
        max-width: 100% !important;
    }
    .header, .content, .footer,
    .footer-container, .blk-main {
        box-sizing: border-box;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .ban_t {
        left: 0 !important;
        margin-left: 0 !important;
    }
    /* 顶部欢迎语在窄屏隐藏 */
    .welcome-text { display: none; }
}

/* ---------- 2. 平板（≤992px） ---------- */
@media screen and (max-width: 992px) {
    /* 关于我们区块改为上下堆叠 */
    .about_c { flex-direction: column; gap: 32px; }
    .about_l, .about_r { width: 100% !important; }
    /* 服务流程步骤竖排 */
    .serv-flow-row { flex-direction: column; }
    .serv-flow-row .serv-flow-card::after { display: none; }
}

/* ---------- 3. 手机（≤768px） ---------- */
@media screen and (max-width: 768px) {

    /* === 顶部整体 === */
    .h_top { height: auto !important; overflow: visible; }
    .header { overflow: visible; }

    /* 顶部条：按钮换行，隐藏欢迎语 */
    .t_top { height: auto; line-height: 1.6; padding: 8px 12px; overflow: visible; }
    .t_top > span { position: static; transform: none; display: block; }
    .top-quick-pills { flex-wrap: wrap; gap: 6px; justify-content: center; }
    .top-quick-pills .top-pill { padding: 6px 14px; font-size: 13px; }

    /* Logo / 标语 / 热线 居中堆叠 */
    .t_con { height: auto !important; padding: 14px 0 16px; text-align: center; overflow: visible; }
    .t_logo, .t_logo img { float: none; width: 132px; margin: 0 auto; }
    .t_text { display: none; }
    .t_pho {
        float: none;
        padding: 6px 0 0 0;
        background: none;
        text-align: center;
        font-size: 13px;
    }
    .t_pho span { font-size: 22px; letter-spacing: 1px; }

    /* === 汉堡导航 === */
    .menu {
        position: relative;
        width: 100% !important;
        height: auto;
        overflow: visible;
        background: #10243f;
        display: flex;
        align-items: center;
    }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        margin-left: auto;
        cursor: pointer;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
        flex-shrink: 0;
    }
    .menu-toggle span {
        display: block;
        width: 22px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: transform .3s ease, opacity .3s ease;
    }
    .menu.open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu.open .menu-toggle span:nth-child(2) { opacity: 0; }
    .menu.open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .menu ul {
        display: none;
        position: absolute;
        left: 0; right: 0; top: 100%;
        width: 100% !important;
        flex-direction: column;
        background: #10243f;
        z-index: 999;
        box-shadow: 0 10px 26px rgba(0,0,0,0.35);
        white-space: normal;
    }
    .menu.open ul { display: flex; }
    .menu li { float: none !important; width: 100%; }
    .menu li a {
        display: block !important;
        width: 100%;
        padding: 14px 18px !important;
        margin-left: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        text-align: left;
    }
    .menu li.cur, .menu li:hover { background: transparent !important; }
    .menu li.cur a, .menu li:hover a { background: transparent !important; color: #F57A1C; }

    /* === 首页 Banner === */
    .banner, .ban_p, .ban_p li, .ban_p li a { height: 230px; }
    .ban_p li a { background-size: cover !important; background-position: center !important; }
    .ban-prev, .ban-next { width: 40px; height: 60px; line-height: 60px; font-size: 16px; }
    .ban-prev { left: 6px; }
    .ban-next { right: 6px; }

    /* === 区块标题 === */
    .til01 {
        height: auto !important;
        white-space: normal !important;
        padding: 28px 0;
        background-size: auto 100% !important;
    }
    .til01 span { font-size: 26px; line-height: 1.3; }

    /* === 搜索框 === */
    .seabox { height: auto; padding: 12px 0; }
    .sea_inp { width: 100% !important; }
    .sea_inp .serach { width: calc(100% - 43px) !important; font-size: 14px; }
    .k_word { width: 100% !important; margin-top: 8px; }

    /* === 合作客户轮播（两列） === */
    .part_c li, .part_c li p, .part_c li p img,
    .part_cc li, .part_cc li p, .part_cc li p img,
    .honr_cl li, .honr_cl li p, .honr_cl li p img {
        width: 48% !important;
        height: auto !important;
        box-sizing: border-box;
    }
    .part_c li, .part_cc li, .honr_cl li { padding: 0 4% 14px 0 !important; }

    /* === 服务领域 / 工程案例 / 技术教程 网格 === */
    .case-grid { grid-template-columns: 1fr !important; }
    .tech-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .edge-grid { grid-template-columns: 1fr !important; }
    .edge-card-img { height: 180px !important; }
    .service-grid { grid-template-columns: 1fr !important; }

    /* === 关于我们 === */
    .about-img-main { height: 220px; }
    .about-float-card {
        position: static !important;
        margin: 16px 0 0;
        display: inline-block;
    }
    .about_r h3 { font-size: 26px; }
    .about-action { flex-wrap: wrap; gap: 14px; }

    /* === 友情链接 === */
    .link { height: auto !important; padding: 10px 0; }
    .link p { float: none; white-space: normal; }
    .link a { padding: 0 14px 0 0; }

    /* === 内容页：侧边栏 + 正文 堆叠 === */
    .blk-main { padding: 0 12px !important; }
    .blk-xs { width: 100% !important; float: none !important; margin-bottom: 22px; }
    .blk-sm { width: 100% !important; float: none !important; }

    /* 图片通用约束 */
    img { max-width: 100%; height: auto; }
    .about-img-sub img { height: 90px; }
}

/* ---------- 4. 小屏手机（≤480px） ---------- */
@media screen and (max-width: 480px) {
    .top-quick-pills .top-pill { font-size: 12px; padding: 5px 11px; gap: 5px; }
    .top-quick-pills .top-pill::before { font-size: 12px; }
    .t_logo, .t_logo img { width: 112px; }
    .til01 span { font-size: 22px; }
    .tech-grid { grid-template-columns: 1fr !important; }
    .about_r h3 { font-size: 22px; }
    .fd-back-top { width: 40px; height: 40px; right: 12px; bottom: 16px; }
}

/* 横屏手机微调 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .banner, .ban_p, .ban_p li, .ban_p li a { height: 200px; }
}
