/*
 * 公司官网手机版样式。
 * 原站模板只按 1920 宽的电脑屏设计（rem 写死宽度、绝对定位），窄屏下菜单挤成一列、内容溢出屏幕。
 * 这里只在 900px 以下覆盖布局，电脑上完全不生效。原模板选择器带 data-v 属性、优先级高，所以需要 !important。
 * 由 add_mobile.py 复制到网站的 /static/css/mobile.css 并挂到每个页面。
 */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .root, .container, .wrap { width: 100% !important; overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }

  /* ---------------- 顶部：logo 一行，菜单一行（可换行，全部可见，不依赖脚本） ---------------- */
  .bermuda-navbar { background-size: cover !important; background-position: center !important; }
  .bermuda-navbar .bermuda-header-nav { display: block !important; height: auto !important; padding: 10px 12px 0; border-bottom-width: 1px !important; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left { display: block !important; width: 100% !important; height: auto !important; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-logo { width: auto !important; height: auto !important; text-align: center !important; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-logo img { width: auto !important; max-width: 70% !important; height: 48px !important; margin: 0 !important; object-fit: contain; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links {
    display: flex !important; flex-wrap: wrap; justify-content: center; align-items: center;
    width: 100% !important; height: auto !important; text-align: center !important; padding: 2px 0 4px;
  }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links a {
    font-size: 15px !important; height: 40px !important; line-height: 40px !important;
    margin: 0 !important; padding: 0 7px !important; white-space: nowrap;
  }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links .active:before { height: 3px !important; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links a.lag { display: inline-flex !important; align-items: center; }
  .lag img { position: static !important; top: 0 !important; width: 24px !important; height: auto !important; }

  /* ---------------- 首屏大图上的文字 ---------------- */
  .bermuda-navbar .bermuda-header-bg { height: auto !important; min-height: 280px; }
  .bermuda-navbar .bermuda-header-bg .header-home-text { position: static !important; width: auto !important; padding: 48px 20px 56px; }
  .bermuda-navbar .bermuda-header-bg .header-home-text .text-1 { font-size: 15px !important; }
  .bermuda-navbar .bermuda-header-bg .header-home-text .text-2 { font-size: 26px !important; line-height: 1.35 !important; margin-top: 0 !important; }
  .bermuda-navbar .bermuda-header-bg .header-home-text .text-3 { font-size: 15px !important; line-height: 1.75 !important; margin-top: 14px !important; }
  .bermuda-navbar .bermuda-header-bg .header-about-text .text-2 { margin-top: 0 !important; }

  /* ---------------- 通用：标题、说明文字、固定宽度的容器 ---------------- */
  img { max-width: 100%; }
  .module-box,
  .bermuda-home .module .module-box,
  .bermuda-product .module-box,
  .bermuda-service .module .module-box { width: auto !important; height: auto !important; margin: 0 12px 20px !important; }
  .module-box i, .bermuda-product .module-box .iconfont { display: none !important; }

  /* 主营品牌（品牌 logo 墙） */
  .bermuda-brand, .bermuda-brand-des { height: auto !important; overflow: visible !important; padding-bottom: 8px; }
  .bermuda-brand h4 { width: auto !important; padding: 0 16px !important; margin: 36px 0 18px !important; font-size: 24px !important; line-height: 1.3 !important; }
  .bermuda-brand p { width: auto !important; padding: 0 20px; margin: 0 0 20px !important; font-size: 14px !important; line-height: 1.8 !important; text-align: left !important; }
  #marquee1 ul { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  #marquee1 ul li { float: none !important; width: auto !important; height: auto !important; aspect-ratio: 3 / 2; margin: 0 !important; border-radius: 4px; }
  #marquee1 ul li img { width: 72% !important; height: auto; }

  /* 部分产品展示（产品卡片） */
  .bermuda-home .module, .module.bermuda-product, .bermuda-product .module { padding-left: 0 !important; padding-right: 0 !important; height: auto !important; }
  .bermuda-product .tabs, #tabss { width: auto !important; margin: 0 !important; }
  .bermuda-product .tabs .horizontal { flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px !important; }
  .bermuda-product .tabs .horizontal h4,
  #tabss h4 { width: 100% !important; padding: 0 16px !important; margin: 28px 0 12px !important; text-align: center; }
  .bermuda-product .tabs .horizontal h4 .title,
  #tabss h4 .title { font-size: 22px !important; line-height: 1.4 !important; }
  .bermuda-product .tabs .horizontal li { width: auto !important; padding: 0 16px !important; margin: 0 !important; font-size: 13px !important; height: 34px !important; line-height: 34px !important; }
  .cc { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 12px 8px !important; width: auto !important; }
  .cc .card { width: auto !important; height: auto !important; margin: 0 !important; }
  .cc .card .card-img { height: auto !important; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .cc .card .card-img img { width: 100% !important; height: 100% !important; object-fit: contain; }
  .cc .card h5 { font-size: 14px !important; line-height: 1.5 !important; padding: 8px 4px !important; word-break: break-all; }

  /* 应用领域 */
  .bermuda-home .bermuda-advantage { height: auto !important; padding-bottom: 28px; }
  .bermuda-home .bermuda-advantage .title { font-size: 24px !important; line-height: 1.3 !important; margin-top: 36px !important; }
  .bermuda-advantage .desc { font-size: 14px !important; line-height: 1.7; padding: 12px 20px 20px !important; }
  .bermuda-advantage .yingyong, .dvantage-brand .yingyong { width: auto !important; padding: 0 12px; }
  .bermuda-advantage .yingyong ul, .dvantage-brand .yingyong ul { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px !important; }
  .bermuda-advantage .yingyong ul li, .dvantage-brand .yingyong ul li { width: auto !important; }
  .bermuda-advantage .yingyong ul li:last-child:nth-child(odd),
  .dvantage-brand .yingyong ul li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: 50% !important; }

  /* 产品页：应用领域 */
  .dvantage-brand { display: block !important; height: auto !important; padding: 0 0 24px !important; }
  .dvantage-brand .left { width: auto !important; padding: 0 20px; }
  .dvantage-brand .left div { font-size: 22px !important; margin-top: 28px !important; }
  .dvantage-brand .left p { font-size: 14px !important; line-height: 1.8 !important; margin: 10px 0 16px !important; }
  .dvantage-brand img, .gg { width: auto !important; height: auto !important; margin-top: 0 !important; }

  /* 关于我们 */
  .company-introduce .module-box-company { padding: 0 20px 24px !important; margin: 0 !important; }
  .company-introduce .module-box-company .content { display: block !important; }
  .company-introduce .module-box-company .content .text { width: auto !important; }
  .company-introduce .module-box-company .content .text .text-1 { font-size: 22px !important; margin-top: 28px !important; }
  .company-introduce .module-box-company .content .text span { white-space: normal !important; text-wrap-mode: wrap !important; font-size: 15px !important; line-height: 1.8; }
  .company-introduce .module-box-company .content img { width: 100% !important; height: auto !important; margin-top: 16px; }
  .company-introduce .module-box-company .card { display: block !important; height: auto !important; }
  .company-introduce .module-box-company .card .card-box { width: auto !important; height: auto !important; margin: 0 0 12px !important; padding: 16px !important; }

  /* 服务 */
  .service-buy { height: auto !important; padding: 0 20px 24px !important; }
  .service-buy .buy-des, .service-buy .buy-des .buy-des-text { width: auto !important; }
  .service-buy .buy-des .des { font-size: 22px !important; margin-top: 28px !important; }
  .service-buy .buy-des .buy-des-text { margin-top: 14px !important; line-height: 1.8 !important; }
  .service-buy .buy-des .buy-des-text span { font-size: 15px !important; }
  .service-buy img { position: static !important; width: 100% !important; height: auto !important; margin-top: 12px; }
  .bermuda-service .module h4 { padding: 0 16px !important; font-size: 22px !important; line-height: 1.4 !important; }
  .service-transport .company-list { font-size: 22px !important; margin-top: 28px !important; }
  .service-transport .company ul { width: auto !important; display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 12px 20px !important; }
  .service-transport .company ul li { width: auto !important; height: auto !important; margin: 0 !important; padding-bottom: 8px; }
  .service-transport .company ul li p { font-size: 14px !important; padding: 0 !important; }
  .service-transport .transport .module-box-service .card { display: block !important; }
  .service-transport .transport .module-box-service .card img,
  .service-transport .transport .module-box-service .card .des { width: auto !important; height: auto !important; }

  /* 联系我们 */
  .bermuda-contact .base-box { display: block !important; height: auto !important; padding: 0 16px 24px !important; }
  .bermuda-contact .base-box .contact-left,
  .bermuda-contact .base-box .contact-right,
  .left-form { width: auto !important; margin-top: 24px !important; }
  .left-form .form-des { width: auto !important; font-size: 24px !important; }
  .left-form p { font-size: 14px !important; margin-top: 10px !important; }
  .left-form .site-form-note { padding: 8px 0 !important; font-size: 15px !important; color: #333 !important; }
  .bermuda-contact .base-box .contact-right .phone-card { margin-top: 0 !important; padding: 16px !important; }
  .bermuda-contact .base-box .contact-right .phone-card .title { font-size: 18px !important; }
  .bermuda-contact .base-box .contact-right .phone-card p { line-height: 1.8 !important; word-break: break-all; }
  .bermuda-contact .base-box .contact-right .phone-card p[style*="line-height"] { line-height: 2 !important; }
  .bermuda-echarts-map { display: block !important; height: auto !important; padding: 0 16px 24px !important; }
  .bermuda-echarts-map h3 { position: static !important; font-size: 22px !important; line-height: 1.4 !important; padding-top: 24px; }
  .bermuda-echarts-map .chart-map { margin-top: 12px !important; height: 300px !important; }
  #container { width: 100% !important; height: 300px !important; }

  /* ---------------- 页脚 ---------------- */
  .bermuda-footer .box { height: auto !important; padding: 24px 20px 0; }
  .bermuda-footer .box .concat-us { position: static !important; width: auto !important; }
  .bermuda-footer .box .concat-us .concat-us-title { font-size: 18px !important; }
  .bermuda-footer .box .concat-us .concat-us-box { display: block !important; height: auto !important; padding: 8px 0 20px !important; }
  .bermuda-footer .box .concat-us .concat-us-box .concat-us-content { width: auto !important; font-size: 14px !important; line-height: 1.8 !important; }
  .bermuda-footer .box .filing { position: static !important; width: auto !important; margin: 0 -20px; padding: 12px 16px; font-size: 13px !important; line-height: 1.8 !important; }
  .bermuda-footer .box .filing a { display: inline-block; margin-left: 8px !important; }
}

/* 平板横屏、小屏笔记本（901–1199px）：保留电脑版布局，只收紧菜单、去掉写死的 1120px 宽度 */
@media (min-width: 901px) and (max-width: 1199px) {
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-logo { width: 30rem !important; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links { width: calc(100% - 30rem) !important; white-space: nowrap; }
  .bermuda-navbar .bermuda-header-nav .bermuda-navbar-left .bermuda-nav-links a { margin-left: .4rem !important; padding: 0 1.2rem !important; font-size: 2.2rem !important; }
  .module-box,
  .bermuda-home .module .module-box,
  .bermuda-product .module-box,
  .bermuda-service .module .module-box,
  .bermuda-advantage .yingyong,
  .service-transport .company ul { width: auto !important; margin-left: 3rem !important; margin-right: 3rem !important; }
  .bermuda-home .module, .module.bermuda-product { padding-left: 3rem !important; padding-right: 3rem !important; }
}

/* 「关于我们」：原模板文字 800px + 配图 544px + 两侧留白，1600px 以下的屏幕配图会被截掉，这里改成按比例分配 */
@media (min-width: 901px) and (max-width: 1599px) {
  .company-introduce .module-box-company { padding: 0 6rem !important; }
  .company-introduce .module-box-company .content { gap: 4rem; align-items: center; }
  .company-introduce .module-box-company .content .text { width: auto !important; flex: 1 1 auto; min-width: 0; }
  .company-introduce .module-box-company .content .text span { white-space: normal !important; text-wrap-mode: wrap !important; }
  .company-introduce .module-box-company .content img { width: 40% !important; max-width: 68rem; height: auto !important; flex: 0 0 auto; }
}
