/* ==========================================================================
   mobile.css - 扬州慧融财税 H5移动端自适应样式
   说明：
   1. 全部规则包含在媒体查询内，PC端(>991px)零影响
   2. 主断点 991px（与app.css体系一致），小屏细化 420px
   3. 配套 head.html 中的 .dgg-mob-btn 汉堡按钮 与 .dgg-mob-menu 抽屉导航
   ========================================================================== */

/* ---------- 首页抽屉导航（PC端隐藏） ---------- */
.dgg-mob-btn { display: none; }
.dgg-mob-menu, .dgg-mob-mask { display: none; }

@media (max-width: 991px) {

  /* ================= 基础 ================= */
  html, body { overflow-x: hidden; }
  .wh, .w1180 {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 12px;
    box-sizing: border-box;
  }
  /* banner 内的 .wh 是绝对定位容器，不需要 padding */
  .yl-dgg .dgg-banner .wh { padding: 0; }

  /* ================= 顶部信息栏 ================= */
  .dgg-top { height: auto; line-height: 28px; padding: 3px 0; font-size: 12px; }
  .dgg-top .wh .list > li { margin-right: 10px; }
  .dgg-top .wh .list > li > a, .dgg-top .wh .list > li { font-size: 12px; }
  .dgg-top .fr .list > li:nth-child(2) { display: none; } /* 只留一个电话 */
  .dgg-top .header_kefu .header_kefu_qrcode { display: none !important; }

  /* ================= 导航区 ================= */
  .dgg-nav { padding-top: 10px; }
  .dgg-nav .nav-top { margin-bottom: 0; position: relative; }
  .dgg-nav .nav-top .logo { width: auto; height: 40px; top: 0; }
  .dgg-nav .nav-top .logo .logo-flex img { width: 34px; height: 34px; flex: 0 0 34px; }
  .dgg-nav .nav-top .logo .logo-flex span { font-size: 18px !important; margin-left: 6px; }
  /* 获客表单：移动端竖排展示 */
  .dgg-nav .nav-top .srh-main { display: block !important; margin: 10px 0 4px; }
  .dgg-nav .nav-top .srh-main .lead-form { height: auto; }
  .dgg-nav .nav-top .srh-main .lead-form .lead-area,
  .dgg-nav .nav-top .srh-main .lead-form .lead-industry,
  .dgg-nav .nav-top .srh-main .lead-form .lead-mobile,
  .dgg-nav .nav-top .srh-main .lead-form .lead-btn {
    float: none !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    height: 42px;
    font-size: 14px;
  }
  .dgg-nav .nav-top .srh-main .lead-form .lead-btn { font-size: 15px; letter-spacing: 4px; }
  .dgg-nav .nav-list { display: none; }                  /* 隐藏PC横向导航 */

  /* 汉堡按钮 */
  .dgg-mob-btn {
    display: block;
    position: absolute;
    right: 12px; top: 6px;
    width: 40px; height: 40px;
    z-index: 100002;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .dgg-mob-btn span, .dgg-mob-btn::after, .dgg-mob-btn::before {
    content: '';
    display: block;
    width: 24px; height: 3px;
    background: #292e2e;
    border-radius: 2px;
    position: absolute;
    left: 8px;
    transition: all .3s;
  }
  .dgg-mob-btn::before { top: 11px; }
  .dgg-mob-btn span { top: 19px; }
  .dgg-mob-btn::after { top: 27px; }
  body.mob-open .dgg-mob-btn::before { top: 19px; transform: rotate(45deg); }
  body.mob-open .dgg-mob-btn span { opacity: 0; }
  body.mob-open .dgg-mob-btn::after { top: 19px; transform: rotate(-45deg); }

  /* 遮罩 */
  .dgg-mob-mask {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
  }
  body.mob-open .dgg-mob-mask { opacity: 1; visibility: visible; }
  body.mob-open { overflow: hidden; }

  /* 抽屉菜单 */
  .dgg-mob-menu {
    display: block;
    position: fixed;
    top: 0; right: -82%;
    width: 82%; max-width: 360px;
    height: 100%;
    background: #ffffff;
    z-index: 100001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right .3s ease;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  }
  body.mob-open .dgg-mob-menu { right: 0; }
  .dgg-mob-menu-head {
    background: linear-gradient(90deg, #ff7200, #ff6600);
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    line-height: 52px;
    padding: 0 14px;
    position: relative;
  }
  .dgg-mob-close {
    position: absolute;
    right: 10px; top: 8px;
    width: 36px; height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 26px;
    font-weight: normal;
    cursor: pointer;
  }
  .dgg-mob-telbar { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
  .dgg-mob-telbar a {
    display: block;
    background: #ff6600;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
  }
  .dgg-mob-nav { list-style: none; margin: 0; padding: 6px 0 20px; }
  .dgg-mob-nav li { border-bottom: 1px solid #f5f5f5; }
  .dgg-mob-nav > li > a {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: bold;
    color: #292e2e;
    text-decoration: none;
  }
  .dgg-mob-nav > li > a:active { background: #fafafa; }
  .dgg-mob-sub { list-style: none; margin: 0; padding: 0 0 8px; background: #fafafa; }
  .dgg-mob-sub li { border-bottom: none; }
  .dgg-mob-sub a {
    display: block;
    padding: 8px 14px 8px 26px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
  }

  /* ================= 右侧悬浮咨询条：移动端隐藏(已有footer3电话栏) ================= */
  .yl-dgg .dgg-right-side { display: none !important; }
  .mqkfdjcx { display: none !important; } /* app.css 中的右侧客服悬浮条，移动端隐藏避免遮挡 */

  /* ================= banner ================= */
  .yl-dgg .dgg-banner { height: 240px; }
  .yl-dgg .dgg-banner .banner-bg .swiper-slide { height: 240px !important; }

  /* ================= 热门服务/猜你喜欢 ================= */
  /* 覆盖 main.css 中 .hot-swiper/.like-swiper .swiper-wrapper{width:546px!important} 的硬编码 */
  .hot-swiper .swiper-wrapper,
  .like-swiper .swiper-wrapper { width: 100% !important; }
  .hot-swiper .swiper-slide,
  .like-swiper .swiper-slide { width: 100% !important; }
  .yl-dgg .dgg-hot-like { margin-top: 12px; }
  .yl-dgg .dgg-hot-like .wh .hot,
  .yl-dgg .dgg-hot-like .wh .like {
    width: 100%;
    height: auto;
    float: none;
    padding: 0 12px;
    margin-bottom: 12px;
    box-sizing: border-box;
  }
  .yl-dgg .dgg-hot-like .wh .like { margin-top: 12px; }
  .yl-dgg .dgg-hot-like .wh .hot .top,
  .yl-dgg .dgg-hot-like .wh .like .top { height: 48px; line-height: 48px; }
  .yl-dgg .dgg-hot-like .wh .hot .top h3,
  .yl-dgg .dgg-hot-like .wh .like .top h3 { font-size: 16px; line-height: 48px; }
  .yl-dgg .dgg-hot-like .wh .hot .item,
  .yl-dgg .dgg-hot-like .wh .like .item {
    width: calc(50% - 3px);
    height: auto;
    padding: 10px 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    box-sizing: border-box;
  }
  .yl-dgg .dgg-hot-like .wh .hot .item .tags,
  .yl-dgg .dgg-hot-like .wh .like .item .tags { margin: 6px 0 8px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .tags span,
  .yl-dgg .dgg-hot-like .wh .like .item .tags span { font-size: 10px; padding: 0 3px; height: 16px; line-height: 14px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .name,
  .yl-dgg .dgg-hot-like .wh .like .item .name { font-size: 14px; margin-bottom: 6px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .des,
  .yl-dgg .dgg-hot-like .wh .like .item .des { font-size: 11px; margin-bottom: 10px; white-space: normal; line-height: 15px; max-height: 30px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .now-price,
  .yl-dgg .dgg-hot-like .wh .like .item .now-price { font-size: 0; margin-bottom: 8px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .now-price a,
  .yl-dgg .dgg-hot-like .wh .like .item .now-price a { font-size: 12px; }

  /* 修复：手机端卡片改 flex 布局，两个按钮精确并排各占一半，避免叠压描述文字 */
  .yl-dgg .dgg-hot-like .wh .hot .item,
  .yl-dgg .dgg-hot-like .wh .like .item {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
  }
  .yl-dgg .dgg-hot-like .wh .hot .item .tags,
  .yl-dgg .dgg-hot-like .wh .like .item .tags { flex: 0 0 100%; }
  .yl-dgg .dgg-hot-like .wh .hot .item .name,
  .yl-dgg .dgg-hot-like .wh .like .item .name { flex: 0 0 100%; }
  .yl-dgg .dgg-hot-like .wh .hot .item .des,
  .yl-dgg .dgg-hot-like .wh .like .item .des { flex: 0 0 100%; }
  .yl-dgg .dgg-hot-like .wh .hot .item .now-price,
  .yl-dgg .dgg-hot-like .wh .like .item .now-price {
    flex: 0 0 calc(50% - 4px);
    display: block;
    margin: 0;
    font-size: 0;
  }
  .yl-dgg .dgg-hot-like .wh .hot .item .now-price .btnlook,
  .yl-dgg .dgg-hot-like .wh .like .item .now-price .btnlook {
    position: static;
    display: block;
    width: 100%;
    height: 26px;
    line-height: 24px;
    padding: 0;
    margin: 0;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
  }
  .yl-dgg .dgg-hot-like .wh .hot .item .btn,
  .yl-dgg .dgg-hot-like .wh .like .item .btn {
    position: static;
    flex: 0 0 calc(50% - 4px);
    display: block;
    width: 100%;
    height: 26px;
    line-height: 24px;
    padding: 0;
    margin: 0 0 0 6px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
  }
  .yl-dgg .dgg-hot-like .wh .hot .item .btn .text,
  .yl-dgg .dgg-hot-like .wh .like .item .btn .text { line-height: 24px; }

  /* ================= 企业服务 ================= */
  .dgg-content { width: 100% !important; }
  .dgg-content .dgg-epServices { font-size: 20px; margin-top: 24px; }
  .dgg-content .dgg-epServicesDsc { font-size: 13px; }
  .dgg-content .dgg-epServices > div.left,
  .dgg-content .dgg-epServices > div {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-bottom: 16px !important;
  }
  .dgg-content .dgg-epServices .dgg-epServicesClass { font-size: 16px; margin-bottom: 10px; }
  .dgg-content .dgg-epServices .dgg-epServicesClass span { height: 16px; margin-right: 10px; }
  .dgg-content .dgg-epServices .dgg-epServicesType { margin-top: -32px; margin-bottom: 8px; text-align: right; }
  .dgg-content .dgg-epServices .dgg-epServicesType a { width: auto; padding: 0 8px; margin-left: 6px; margin-bottom: 4px; font-size: 11px; }
  .dgg-content .dgg-epServices .dgg-epServicesList { background: #fff; }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesAd { display: none; } /* 移动端隐藏左侧竖幅广告图 */
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox {
    width: 100%;
    height: auto;
    border-top: 2px solid #FF9000;
  }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox .dgg-epServicesInfo {
    width: 50%;
    height: auto;
    min-height: 150px;
    box-sizing: border-box;
  }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox .dgg-epServicesInfo .dgg-epServicesContent { padding-left: 12px; margin-top: 14px; }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox .dgg-epServicesInfo .dgg-epServicesInfoTitle { font-size: 14px; }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox .dgg-epServicesInfo .dgg-epServicesInfoDes { font-size: 11px; }
  .dgg-content .dgg-epServices .dgg-epServicesList .dgg-epServicesInfoBox .dgg-epServicesInfo .dgg-epServicesToInfo { font-size: 12px; }

  /* ================= 解决方案 ================= */
  .dgg-content .dgg-solution .dgg-solutionList {
    width: 100% !important;
    float: none !important;
    margin: 0 0 12px !important;
    min-height: 100px;
    padding: 18px 16px 18px 18px !important;
    background-position: right 12px bottom 12px !important;
    background-size: 90px auto !important;
    box-sizing: border-box;
  }
  .dgg-content .dgg-solution .dgg-solutionList .dgg-solutionTitle { font-size: 16px; }
  .dgg-content .dgg-solution .dgg-solutionList .dgg-solutionDsc { font-size: 12px; }
  .dgg-content .dgg-solution .dgg-solutionList .dgg-solutionAction { margin-top: 10px; }
  .dgg-content .dgg-solution .dgg-solutionList .dgg-solutionViewBtn,
  .dgg-content .dgg-solution .dgg-solutionList .dgg-solutionChat { font-size: 12px; padding: 0 10px; }

  /* ================= 慧融资讯 ================= */
  .dgg-module-consult { margin-bottom: 20px !important; }
  .dgg-module-consult-head__title { font-size: 20px; }
  .dgg-module-consult-head__describe { font-size: 12px; }
  .dgg-module-consult-body .dgg-module-consult-body__news,
  .dgg-module-consult-body .dgg-module-consult-body__knowledge {
    width: 100%;
    float: none;
    height: auto;
  }
  .dgg-module-consult-body .dgg-module-consult-body__knowledge { margin-top: 14px; }
  .dgg-module-consult-body__news .news-head { height: 48px; padding-right: 12px; }
  .dgg-module-consult-body__news .news-head-tab-item { height: 48px; line-height: 48px; padding: 0 12px; font-size: 14px; }
  .dgg-module-consult-body__news .news-head-more { height: 48px; line-height: 48px; }
  .dgg-module-consult-body__news .news-body-content { padding: 0 12px; }
  .dgg-module-consult-body__news .news-body-list__img .dgg-col-12 { width: 100%; } /* 带图新闻单列 */
  .dgg-module-consult-body__news .news-body-list__img-item { padding: 12px 0 12px 160px; height: auto; min-height: 100px; box-sizing: border-box; }
  .dgg-module-consult-body__news .news-body-list__img-item-cover { top: 12px; width: 144px; height: 85px; }
  .dgg-module-consult-body__news .news-body-list__img-item-content h3 { font-size: 14px; }
  .dgg-module-consult-body__news .news-body-list__img-item-content .time { font-size: 11px; }
  .dgg-module-consult-body__news .news-body-list__no-img-item__content { font-size: 13px; }
  .dgg-module-consult-body__news .news-body-list__no-img-item__time { font-size: 11px; }
  .dgg-module-consult-body__knowledge .knowledge-head-title { font-size: 16px; }
  .dgg-module-consult-body__knowledge .knowledge-body { padding: 0 12px; }
  .dgg-module-consult-body__knowledge .knowledge-body-tag-item { font-size: 11px; padding: 0 8px; margin: 0 6px 6px 0; }

  /* ================= 服务保障标签 ================= */
  .dgg-module-feature { padding: 16px 0; }
  .dgg-module-feature .dgg-module-feature-item {
    width: 50%;
    float: left;
    box-sizing: border-box;
    padding: 8px 10px;
    margin: 0;
  }
  .dgg-module-feature .dgg-module-feature-item__tag { width: 34px; height: 34px; line-height: 34px; font-size: 15px; }
  .dgg-module-feature .dgg-module-feature-item__content-name { font-size: 13px; }
  .dgg-module-feature .dgg-module-feature-item__content-describe {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ================= 页脚 ================= */
  .footer-bg { min-width: 0 !important; padding-bottom: 15px; }
  .footer-bd .footer-page { padding: 14px 0 12px; }
  .footer-page a, .footer-tel p { font-size: 12px; }
  .footer-page a { padding: 0 10px; }
  .footer-tel p { padding-top: 14px; }
  .footer-fl { width: 100% !important; float: none !important; clear: both; margin-top: 12px; }
  .footer-fl p { font-size: 11px; line-height: 20px; }
  .footer-wx { float: none !important; width: 124px !important; margin: 12px auto 0; padding: 8px 0; }
  .footer-wx img { width: 90px !important; height: 90px !important; }
  .footer-wx p { font-size: 11px; }

  /* ================= 内页 ================= */
  .page-banner { height: auto; }
  .page-banner img { width: 100%; height: auto; }
  .page-banner .nybt h3 { font-size: 18px; }
  .page-position { font-size: 12px; line-height: 36px; }
  .page-wrap .wh { padding: 0 12px; }
  .page-wrap-right { width: 100% !important; float: none !important; }
  .xypg-right-content { padding: 12px !important; }
  .xypg-product-list li { width: calc(50% - 5px); margin-right: 10px; }
  .xypg-product-list li:nth-child(2n) { margin-right: 0; }
  .xypg-product-list li h3 { font-size: 13px; }
  .xypg-news-list li .tit h3 { font-size: 14px; }
  .xypg-pagination a, .xypg-pagination span { font-size: 12px; padding: 4px 8px; }
}

/* ---------- 小屏微调(<=420px) ---------- */
@media (max-width: 420px) {
  .yl-dgg .dgg-banner { height: 200px; }
  .yl-dgg .dgg-banner .banner-bg .swiper-slide { height: 200px !important; }
  .dgg-nav .nav-top .logo .logo-flex span { font-size: 16px !important; }
  .dgg-nav .nav-top .logo .logo-flex img { width: 30px; height: 30px; flex: 0 0 30px; }
  .yl-dgg .dgg-hot-like .wh .hot .item .des,
  .yl-dgg .dgg-hot-like .wh .like .item .des { -webkit-line-clamp: 1; }
}

/* ---------- 极小屏(<=360px)：热门服务卡片改单列，避免两列过挤 ---------- */
@media (max-width: 360px) {
  .yl-dgg .dgg-hot-like .wh .hot .item,
  .yl-dgg .dgg-hot-like .wh .like .item {
    width: 100%;
    margin-right: 0;
  }
}

/* ---------- 手机底部固定栏(<=768px) ---------- */
@media (max-width: 768px) {
  body { padding-bottom: 50px; } /* 给 footer3 留空间 */
  .footer3 { padding-bottom: env(safe-area-inset-bottom); }
  .footer3 ul li { line-height: 50px; }
  /* 手机浮动工具按钮(内页)：防止遮挡底部栏 */
  .page-mob-tool { bottom: 60px !important; }
}
