/* ============================================================
 * 移动端响应式适配（≤768px）
 * 覆盖：公共头部/底部、CMS 列表与文章页、首页静态区块
 * 桌面端不加载任何效果（全部规则限定在 media query 内）
 * ============================================================ */

/* 桌面端默认隐藏汉堡按钮与移动导航 */
.mobile-menu-btn { display: none; }
.mobile-nav { display: none; }
.mobile-nav-mask { display: none; }

@media only screen and (max-width: 768px) {

    /* ---------- 全局 ---------- */
    html, body { min-width: 0 !important; overflow-x: hidden; }
    body { -webkit-text-size-adjust: 100%; }
    img { max-width: 100%; height: auto; }

    /* ---------- 头部 ---------- */
    .header-index { min-width: 0 !important; box-shadow: 0 1px 0 0 #ddd; }
    .header-first-box { display: none !important; }
    .header-index-inner { width: auto !important; min-width: 0; display: flex; align-items: center; padding: 10px 12px; height: auto; }
    .header-index-logo { width: 132px !important; height: 37px !important; background-size: 132px 37px; flex: none; }

    /* 汉堡按钮 */
    .mobile-menu-btn {
        display: block; flex: none; margin-left: auto;
        width: 40px; height: 40px; padding: 11px 10px;
        background: none; border: none; cursor: pointer;
    }
    .mobile-menu-btn span {
        display: block; height: 2px; margin-bottom: 5px;
        background: #393939; border-radius: 1px; transition: all .2s;
    }
    .mobile-menu-btn span:last-child { margin-bottom: 0; }

    /* 桌面导航/搜索在移动端隐藏 */
    .header-index-category, .header-index-search, .header-index-text, .header-main-nav { display: none !important; }

    /* 移动抽屉导航 */
    .mobile-nav {
        display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 2002;
        width: 78%; max-width: 320px; overflow-y: auto;
        background: #fff; box-shadow: -2px 0 12px rgba(0,0,0,.15);
        padding: 16px 0 30px;
    }
    .mobile-nav.is-open { display: block; }
    .mobile-nav a {
        display: block; padding: 13px 22px; font-size: 15px; color: #393939;
        border-bottom: 1px solid #f3f3f3;
    }
    .mobile-nav a:active { background: #f7f7f7; color: #fe8922; }
    .mobile-nav .mobile-nav-group { padding: 16px 22px 6px; font-size: 13px; color: #999; }
    .mobile-nav .mobile-nav-tel { display: block; margin: 16px 22px 0; padding: 10px; background: #fff7ef; border: 1px solid #ffd9ae; border-radius: 4px; color: #fe8922; font-size: 14px; text-align: center; }
    .mobile-nav-mask {
        display: none; position: fixed; inset: 0; z-index: 2001;
        background: rgba(0,0,0,.4);
    }
    .mobile-nav-mask.is-open { display: block; }

    /* ---------- 子导航（横向滚动） ---------- */
    .cms-subnav-in { width: auto !important; padding: 0 8px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .cms-subnav-in a { padding: 11px 12px; }

    /* ---------- CMS 主体 ---------- */
    .cms-main { width: auto !important; padding: 12px 12px 30px; }
    .cms-panel { padding: 16px 14px; }
    .cms-panel-title { font-size: 17px; }
    .cms-crumb { padding: 10px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* 列表 */
    .cms-item { padding: 14px 0; }
    .cms-item-title { font-size: 15px; }
    .cms-item-desc { font-size: 12px; }
    .cms-item-meta span { margin-right: 12px; }

    /* 文章页 */
    .cms-article-title { font-size: 20px; margin: 6px 0 10px; }
    .cms-article-meta { line-height: 2; }
    .cms-article-meta span { margin: 0 8px; display: inline-block; }
    .cms-article-body { font-size: 15px; line-height: 1.9; }
    .cms-article-body table { width: 100% !important; display: block; overflow-x: auto; }
    .cms-article-nav { flex-direction: column; }
    .cms-next { text-align: left; margin-top: 8px; }
    .cms-article-nav a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

    /* 分页 */
    .cms-pager .page-item .page-link { min-width: 30px; padding: 6px 8px; font-size: 12px; }

    /* 搜索 */
    .cms-search-form { margin: 14px auto; }
    .cms-search-form button { padding: 10px 16px; }

    /* ---------- 首页静态区块 ---------- */
    .banner-slide { min-width: 0 !important; height: auto !important; }
    .banner-slide-list, .slideBox, .banner_box, .banner_a, .banner_list { min-width: 0 !important; height: auto !important; }
    .slideBox .hd, .prev_btn, .next_btn, .circle_btns { display: none !important; }
    .mod-entry { display: none !important; }
    .container-1200, .container { width: auto !important; min-width: 0; padding-left: 12px; padding-right: 12px; }
    .cat-content { width: auto !important; padding: 0 12px; }
    .custom-course-wrap { width: auto !important; padding: 0 4px; }
    .custom-course-list { width: auto !important; }
    .course-card-item { float: none !important; width: calc(50% - 10px) !important; margin: 0 5px 12px !important; display: inline-block; vertical-align: top; }
    .course-card-item .item-img, .course-card-item .item-img-link { width: 100% !important; height: auto !important; }
    .course-card-item .item-tt { font-size: 13px; }
    .top48, .hover-expand { width: auto !important; }

    /* 资讯/关联区块 */
    .cms-related-inner, .cms-home-news-inner { width: auto !important; margin: 0 12px; padding: 16px 14px; }
    .cms-home-news-title { font-size: 17px; }
    .cms-related-title { font-size: 16px; }
    .cms-home-news-link, .cms-related-link { float: none; display: block; max-width: 100%; font-size: 14px; }
    .cms-related-date { float: none; display: block; margin-top: 4px; }
    .cms-home-news-item .cms-related-date { float: none; margin-top: 4px; }

    /* ---------- 底部 ---------- */
    .go-footer { padding: 18px 12px !important; }
    .go-footer .footer-grid { width: auto !important; }
    .go-footer .footer-grid h2 { font-size: 15px; text-align: center; margin-bottom: 12px; }
    .go-footer .footer-grid ul { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
    .go-footer .footer-grid li { width: 50%; box-sizing: border-box; text-align: center; margin-bottom: 10px; }
    .go-footer .footer-grid li strong { display: block; font-size: 14px; }
    .go-footer .footer-grid li span { display: block; font-size: 11px; color: #999; }
    .go-footer .footer-grid > a { display: block; width: 100%; box-sizing: border-box; text-align: center; }
    .footer { min-width: 0 !important; }
    .footer .container { width: auto !important; padding: 0 12px; }
    .footer .row .item { width: 33.33% !important; text-align: center; font-size: 12px; }
    .footer .line2 { text-align: center; font-size: 11px; line-height: 1.9; }
    .qzone-footer { min-width: 0 !important; }

    /* 客服悬浮窗不遮挡内容 */
    #kefu, .kefu-wrap { transform: scale(.8); transform-origin: bottom right; }
}
