@charset "utf-8";
/* ============================================================
   绿一佳农业网 www.lyjny.com —— 移动端适配补丁
   作用：在不改模板结构的前提下，解除 PC 版固定宽度，
         让手机浏览器正常单列显示。
   用法：放到站点 file/style/mobile-fix.css，
         并在头部模板 </head> 前引入：
         <link rel="stylesheet" type="text/css" href="{DT_PATH}file/style/mobile-fix.css">
   说明：全部规则只在 max-width:768px 时生效，PC 端不受影响。
   版本：v2 / 2026-11-17（新增：白底保护 + 轮播黑底修正）
   ============================================================ */

/* ---------- 0. 基础：解除手机端文字被强缩 ---------- */
@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  /* 原样式 body{font-size:12px} 在手机上过小 */
  body {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  p, li, .content, .introduce { font-size: 15px !important; }

  /* ---------- 0.5 底色与轮播：避免手机端出现黑底 ---------- */
  /* 页面底色统一为白，防止撑开后露出主题里的深色底 */
  html, body, .m0 { background: #ffffff !important; }
  /* 原样式 .carousel{background:#000}，手机上网速慢/图片没加载时就是一块纯黑 */
  .carousel { background: #f2f4f3 !important; border-radius: 8px !important; }
  /* 只保留当前这一张（有图就能撑出高度，没图也是浅灰而不是黑） */
  .carousel .slide:not(.active) { display: none !important; }
  .carousel .slide.active {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .carousel .slide img { height: auto !important; aspect-ratio: 16 / 9; }
  .carousel .cap-title { font-size: 15px !important; }
  .carousel .cap-desc { display: none !important; }
  .car-btn { display: none !important; }   /* 手机上滑动切换即可，箭头很挤 */

  /* ---------- 1. 解除固定宽度容器（核心） ---------- */
  /* 原：.m0{min-width:1220px} .m{width:1220px} .head_m{width:1220px} */
  .m0 { width: 100% !important; min-width: 0 !important; }
  .m, .head_m {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }
  .container {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }

  /* ---------- 2. 多栏改单列 ---------- */
  /* 原：.m_l 884 / .m_r 300 / .m_l_1 1004 / .m_r_1 180 / .im-l 220 / .im-r 1000 */
  .m_l, .m_r, .m_l_1, .m_r_1, .im-l, .im-r, .im-l, .head_l, .head_r {
    width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }
  .im-l { height: auto !important; }

  /* ---------- 3. 导航、搜索、公告条 ---------- */
  .menu, .nav, .submenu {
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  .menu a, .nav a {
    display: inline-block !important;
    padding: 9px 10px !important;
  }
  .search-inp, .search-adv, .search-hot { width: 100% !important; box-sizing: border-box !important; }
  .search-mod { width: auto !important; max-width: 100% !important; }
  .notice-inner, .notice-viewport { width: 100% !important; }

  /* ---------- 4. 图片与表格 ---------- */
  img { max-width: 100% !important; height: auto !important; }
  /* 技术文章里的多列表格允许横向滑动，不撑破页面 */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---------- 5. 触控友好 ---------- */
  a, button, .btn, input[type="submit"] { min-height: 32px; }
  .footer, .copyright, .friend-links { font-size: 13px !important; }

  /* ---------- 6. 次要装饰块收起（不需要可整段删除） ---------- */
  .qr-mini, .gotop { display: none !important; }
}
