/* ==========================================================
   顶部导航移动端适配 v4（对照 css2.css 精确修复）
   仅 1099px 及以下生效，PC 完全不受影响
   ========================================================== */

@media screen and (max-width: 1099px) {

    /* ========================================================
       1. #headbg —— 原: min-width:1200px; height:163px; background:repeat-x bottom
       问题：横向溢出、固定高度导致菜单偏下、背景图裁切错位
       修复：宽自适应、高自适应、背景图改居中铺满或纯色
       ======================================================== */
    #headbg {
        width: 100% !important;
        min-width: 0 !important;          /* 关键：取消 1200px 最小宽度 */
        max-width: 100% !important;
        height: auto !important;           /* 关键：取消 163px 固定高度 */
        min-height: 0 !important;
        padding: 0 0 4px !important;      /* 底部留 4px 呼吸 */
        margin: 0 !important;
        box-sizing: border-box;
        position: static !important;
        overflow: visible !important;

        /* 背景图：原 repeat-x bottom，手机宽度下会裁切错位
           改为 cover 居中，或直接去图用纯色（二选一，见下方说明） */
        background-image: url(headbg-3.jpg) !important;
        background-repeat: no-repeat !important;
        background-position: center top !important;
        background-size: cover !important;
    }
    /* 若不想保留背景图（推荐，最稳），注释上面 background-image 那行，
       只保留 background-color */

    #headbg .head {
        display: none !important;          /* 原 height:25px 右上角文字，移动端隐藏 */
    }

    /* ========================================================
       2. #logo —— 原: width:1200px; height:90px; margin:auto
       ======================================================== */
    #logo {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;           /* 取消 90px 固定高 */
        min-height: 0 !important;
        padding: 8px 12px 6px !important;
        margin: 0 !important;
        box-sizing: border-box;
        text-align: center;
        position: static !important;
        float: none !important;
        overflow: visible !important;
        clear: both;
    }

    /* ========================================================
       3. .logo_left / .logo_right —— 原: float:left/right; 固定宽高
       ======================================================== */
    #logo .logo_left,
    #logo .logo_right {
        float: none !important;            /* 取消左右浮动，改为并排居中 */
        display: inline-block !important;
        vertical-align: middle;
        width: auto !important;            /* 取消 549/224 固定宽 */
        height: auto !important;           /* 取消 90px 固定高 */
        max-width: 48%;
        margin: 0 2px !important;
        position: static !important;
        box-sizing: border-box;
    }
    #logo .logo_left img,
    #logo .logo_right img {
        max-width: 100% !important;
        max-height: 44px;                  /* logo 最大高 44px，紧凑 */
        width: auto !important;
        height: auto !important;
        display: inline-block;
        vertical-align: middle;
        margin: 0 !important;
    }

    /* ========================================================
       4. .navs —— 原: width:1200px; position:relative; color:#fff
       问题：固定 1200px 宽 + position:relative
       修复：宽 100%、static、横滑、蓝底白字保留
       ======================================================== */
    .navs {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;           /* 取消固定高 */
        padding: 0 !important;
        margin: 0 !important;              /* 关键：紧贴 logo，不偏下 */
        box-sizing: border-box;
        position: static !important;       /* 关键：取消 relative */
        float: none !important;
        clear: both;
        overflow-x: auto !important;       /* 横滑 */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;

        /* 蓝底白字：继承 css2.css 的 color:#fff，蓝底用纯色 */
        background-color: #0090C5 !important; /* ★ 换成蓝条实际色值 */
    }
    .navs::-webkit-scrollbar { display: none; }

    .navs ul {
        display: inline-block !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 0 6px !important;
        margin: 0 !important;
        white-space: nowrap;
        list-style: none;
    }

    /* ========================================================
       5. .navs li —— 原: float:left; color:#fff
       ======================================================== */
    .navs li {
        float: none !important;            /* 取消左浮动，改内联块 */
        display: inline-block !important;
        vertical-align: middle;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        line-height: normal !important;
    }

    /* ========================================================
       6. .navs li.shuxian —— 原: width:2px; height:30px; margin-top:18px; 背景图
       修复：去掉 margin-top 上边距，竖线改纯色（背景图在手机可能错位）
       ======================================================== */
    .navs li.shuxian {
        width: 1px !important;
        height: 14px !important;
        margin: 0 4px !important;          /* 关键：margin-top 归零 */
        vertical-align: middle;
        display: inline-block !important;
        background: rgba(255,255,255,0.35) !important; /* 半透明白竖线 */
        background-image: none !important;  /* 去掉原 menu2-3.jpg 背景图 */
    }

    /* ========================================================
       7. .navs li.nav1 a —— 原: display:block; width:200px; height:48px; line-height:48px; color:#fff; font-size:14px
       问题：每项固定 200px 宽、block 排列，手机一行放不下
       修复：inline-block 自适应宽、紧凑行高、白字保留
       ======================================================== */
    .navs li.nav1 a {
        display: inline-block !important;  /* 取消 block，改内联块 */
        width: auto !important;            /* 取消 200px 固定宽 */
        height: auto !important;           /* 取消 48px 固定高 */
        line-height: 38px !important;      /* 紧凑行高 */
        padding: 0 10px !important;
        font-size: 15px !important;
        color: #fff !important;            /* 保留白字 */
        text-align: center;
        white-space: nowrap;
        text-decoration: none;
        vertical-align: middle;
        background: none !important;       /* 去掉 hover 背景图干扰 */
    }
    /* 若 HTML 里 a 内有 <span>，也同步 */
    .navs li.nav1 a > span {
        display: inline !important;
        color: inherit !important;
        line-height: inherit !important;
        height: auto !important;
        position: static !important;
        transform: none !important;
        background: none !important;
    }
    .navs li.nav1 a > span::after {
        display: none !important;
    }
    /* hover 态：原 menu1-3.jpg 背景图，手机改为半透明白 */
    .navs li.nav1 a:hover {
        background: rgba(255,255,255,0.15) !important;
        background-image: none !important;
        color: #fff !important;
        width: auto !important;
        height: auto !important;
    }

    /* 下拉子菜单移动端隐藏 */
    .navs .sub, .navs ul ul { display: none !important; }
    .nav-toggle { display: none !important; }
}

/* 480px 以下进一步紧凑 */
@media screen and (max-width: 480px) {
    #logo .logo_left img,
    #logo .logo_right img { max-height: 36px; }
    #logo { padding: 6px 10px 4px !important; }
    .navs li.nav1 a {
        font-size: 14px !important;
        padding: 0 8px !important;
        line-height: 36px !important;
    }
    .navs li.shuxian { height: 12px !important; margin: 0 3px !important; }
}