/* 桌面端完全隐藏移动导航组件（媒体查询内再启用） */
.m-header, .m-mask, .m-drawer, .m-search { display: none; }


/* ============================================================
   方案B：移动端抽屉导航（2026-10-22）
   仅作用于 <=767px；桌面端完全不受影响。
   若 JS 未成功初始化（无 body.m-nav-ready），旧菜单保持原样。
   ============================================================ */
@media (max-width: 767px) {
  body.m-nav-ready .headerdu,
  body.m-nav-ready #header { display: none !important; }

  body.m-nav-ready { padding-top: 60px; }

  .m-header { display: none; }

  body.m-nav-ready .m-header {
    display: flex; align-items: center; gap: 8px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
    height: 60px; padding: 0 8px; background: #ffffff; box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
  }
  body.m-nav-ready .m-header .m-menu-btn,
  body.m-nav-ready .m-header .m-search-btn {
    width: 44px; height: 44px; border: 0; padding: 0; background: transparent;
    display: flex; align-items: center; justify-content: center;
    color: #0f6b3f; font-size: 22px; line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.m-nav-ready .m-header .m-menu-btn:before { content: "\2630"; font-size: 24px; }
  body.m-nav-ready .m-header .m-search-btn { position: relative; }
  body.m-nav-ready .m-header .m-search-btn:before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 14px; height: 14px; margin: -9px 0 0 -9px;
    border: 2px solid #0f6b3f; border-radius: 50%;
  }
  body.m-nav-ready .m-header .m-search-btn:after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 8px; height: 2px; margin: 4px 0 0 2px; background: #0f6b3f;
    transform: rotate(45deg);
  }
  body.m-nav-ready .m-header .m-logo {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: #0f6b3f; font-size: 18px; font-weight: 700; letter-spacing: 1px;
  }
  body.m-nav-ready .m-header .m-logo img { height: 40px; width: auto; max-width: 220px; display: block; }

  body.m-nav-ready .m-mask {
    display: block;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45); z-index: 1300;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  body.m-nav-ready.m-menu-open .m-mask { opacity: 1; pointer-events: auto; }

  body.m-nav-ready .m-drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 86%; max-width: 360px; z-index: 1400;
    background: #ffffff; box-shadow: 2px 0 14px rgba(0,0,0,.18);
    transform: translateX(-102%); transition: transform .28s ease;
    display: flex; flex-direction: column; overflow: hidden;
  }
  body.m-nav-ready.m-menu-open .m-drawer { transform: translateX(0); }
  body.m-nav-ready.m-menu-open { overflow: hidden; }

  .m-drawer-head {
    flex: 0 0 auto; height: 60px; padding: 0 6px 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    background: #0f6b3f; color: #ffffff;
  }
  .m-drawer-head .m-title { font-size: 17px; font-weight: 600; letter-spacing: 2px; }
  .m-drawer-close {
    width: 44px; height: 44px; border: 0; background: transparent; color: #ffffff;
    font-size: 24px; line-height: 1; cursor: pointer;
  }
  .m-drawer-close:before { content: "\2715"; }

  .m-nav { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .m-nav > li { border-bottom: 1px solid #eceff1; }
  .m-nav > li > .m-row { display: flex; align-items: center; min-height: 50px; padding: 0 6px 0 16px; }
  .m-nav > li > .m-row > a {
    flex: 1 1 auto; display: flex; align-items: center; min-height: 50px;
    color: #1f2d27; font-size: 16px; text-decoration: none;
  }
  .m-nav > li > .m-row > a.m-active { color: #0f6b3f; font-weight: 600; }
  .m-nav .m-toggle { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; flex: 0 0 auto; }
  .m-nav .m-toggle:before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 8px; height: 8px; margin: -6px 0 0 -4px;
    border-right: 2px solid #9aa5a0; border-bottom: 2px solid #9aa5a0;
    transform: rotate(45deg); transition: transform .2s ease;
  }
  .m-nav > li.open > .m-row > .m-toggle:before { transform: rotate(-135deg); margin-top: -2px; }

  .m-sub {
    list-style: none; margin: 0; padding: 0; display: none;
    background: #f6f8f7; border-top: 1px solid #e6ece9;
  }
  .m-nav > li.open > .m-sub { display: block; }
  .m-sub li { border-bottom: 1px solid #eef2f0; }
  .m-sub li:last-child { border-bottom: 0; }
  .m-sub li a {
    display: flex; align-items: center; min-height: 46px;
    padding: 8px 16px 8px 30px; color: #33443c; font-size: 15px; line-height: 1.4;
    text-decoration: none; white-space: normal; word-break: break-word;
  }
  .m-sub li a:active { background: #eaf3ee; color: #0f6b3f; }

  .m-drawer-foot { flex: 0 0 auto; border-top: 1px solid #eceff1; padding: 6px 0; background: #ffffff; }
  .m-drawer-foot a {
    display: flex; align-items: center; min-height: 44px; padding: 0 16px;
    color: #33443c; font-size: 15px; text-decoration: none;
  }
  .m-drawer-foot a .m-ico { width: 22px; display: inline-block; color: #0f6b3f; }

  body.m-nav-ready .m-search {
    display: none; position: fixed; top: 60px; left: 0; right: 0; z-index: 1250;
    background: #ffffff; padding: 8px 12px; box-shadow: 0 4px 10px rgba(0,0,0,.08);
  }
  body.m-nav-ready.m-search-open .m-search { display: block; }
  body.m-nav-ready .m-search form { display: flex; gap: 8px; margin: 0; }
  body.m-nav-ready .m-search input[type="text"] {
    flex: 1 1 auto; height: 40px; padding: 0 12px; font-size: 15px;
    border: 1px solid #d9e2dc; border-radius: 6px; outline: none;
  }
  body.m-nav-ready .m-search button {
    flex: 0 0 auto; width: 64px; height: 40px; border: 0; border-radius: 6px;
    background: #0f6b3f; color: #ffffff; font-size: 15px;
  }
}


/* ============================================================
   2026-10-22 调整二：Logo 放大、抽屉列表纵向复位、正文溢出修复
   ============================================================ */
@media (max-width: 767px) {

  /* 抽屉内一律纵向排列（覆盖老站全局 float 规则） */
  body.m-nav-ready .m-drawer .m-nav,
  body.m-nav-ready .m-drawer .m-nav > li,
  body.m-nav-ready .m-drawer .m-nav .m-row,
  body.m-nav-ready .m-drawer .m-sub {
    float: none !important;
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  body.m-nav-ready .m-drawer .m-nav > li.open > .m-sub { display: block !important; }
  body.m-nav-ready .m-drawer .m-sub > li {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  body.m-nav-ready .m-drawer .m-nav .m-row { display: flex !important; width: 100% !important; }
  body.m-nav-ready .m-drawer .m-nav > li > .m-row > a {
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    float: none !important;
    min-height: 50px;
  }
  body.m-nav-ready .m-drawer .m-sub li a {
    display: flex !important;
    float: none !important;
    width: auto !important;
    min-height: 46px;
  }

  /* 正文容器及内联固定宽度复位（含 "width: 700px" 这种带空格的写法） */
  .contenttext, .contenttext2, .contenttextb, .contenttextt, .textcontentt {
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .contenttext div, .contenttext2 div, .contenttextb div, .contenttextt div {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .contenttext div[style*="width"], .contenttext2 div[style*="width"], .contenttextb div[style*="width"],
  .contenttext div[style*="float"], .contenttext2 div[style*="float"] {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
  }
  .contenttext img, .contenttext2 img, .contenttextb img, .contenttextt img {
    max-width: 100% !important;
    height: auto !important;
  }
  .contenttext table, .contenttext2 table {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* 兼容老式内联 min-width 导致的横向溢出 */
  .contenttext [style*="min-width"], .contenttext2 [style*="min-width"] {
    min-width: 0 !important;
  }
  .maincontent, .maintext, .rightpage, .leftpage, .rightpage2 {
    max-width: 100% !important;
    box-sizing: border-box;
  }
}
