/* ========================================
   移动端适配样式
   断点: 768px
   配合 rem.js 双基准方案使用
   ======================================== */

/* ======================
   桌面端默认隐藏移动端元素
   （必须放在媒体查询之前，
    否则 !important 会覆盖媒体查询内的显示规则）
   ====================== */
.nav-toggle,
.mobile-nav,
.mobile-nav-mask {
  display: none !important;
}

@media screen and (max-width: 768px) {

  /* 全局禁止横向滚动，防止元素溢出视口 */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* ======================
     1. 导航栏 & 头部
     ====================== */

  /* 隐藏桌面端横向导航 */
  .nav {
    display: none !important;
  }

  /* 头部区域自适应高度 */
  .header {
    height: auto;
    position: relative;
  }

  /* Logo 居中显示，缩小尺寸 */
  .logo {
    height: auto;
    padding: 0.1rem 1rem 0.1rem 0.1rem;
  }
  .logo img {
    width: 4.5rem;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto;
    display: block;
  }

  /* ---- 汉堡菜单按钮 ---- */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 0.5rem;
    height: 0.5rem;
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1001;
    gap: 0.06rem;
    padding: 0.1rem;
    box-sizing: border-box;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  /* 汉堡按钮激活态（X 形） */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(0.09rem) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-0.09rem) rotate(-45deg);
  }

  /* ---- 移动端侧边导航面板 ---- */
  .mobile-nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: -3rem;
    left: auto;
    width: 2.8rem;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  }
  .mobile-nav.open {
    right: 0;
  }
  .mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.15rem 0.2rem;
    border-bottom: 1px solid #eee;
  }
  .mobile-nav-close {
    font-size: 0.3rem;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.05rem;
  }
  .mobile-nav-close:hover {
    color: #D90000;
  }
  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .mobile-nav-list > li {
    border-bottom: 1px solid #f0f0f0;
  }
  .mobile-nav-list > li > a {
    display: block;
    padding: 0.14rem 0.2rem;
    color: #333;
    font-size: 0.16rem;
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .mobile-nav-list > li > a:hover,
  .mobile-nav-list > li > a:active {
    background-color: #f5f5f5;
    color: #D90000;
  }

  /* 二级菜单 */
  .mobile-nav-list .has-sub > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .mobile-nav-list .has-sub .arrow {
    font-size: 0.1rem;
    transition: transform 0.3s;
    color: #999;
  }
  .mobile-nav-list .has-sub.expanded .arrow {
    transform: rotate(90deg);
  }
  .mobile-nav-list .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fafafa;
  }
  .mobile-nav-list .has-sub.expanded .sub-menu {
    max-height: 4rem;
  }
  .mobile-nav-list .sub-menu li a {
    display: block;
    padding: 0.12rem 0.2rem 0.12rem 0.4rem;
    color: #666;
    font-size: 0.14rem;
    text-decoration: none;
    transition: background-color 0.2s;
  }
  .mobile-nav-list .sub-menu li a:hover,
  .mobile-nav-list .sub-menu li a:active {
    background-color: #f0f0f0;
    color: #D90000;
  }

  /* ---- 遮罩层 ---- */
  .mobile-nav-mask {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
  }
  .mobile-nav-mask.active {
    display: block !important;
  }

  /* ======================
     2. 页面横幅 Banner
     ====================== */
  .header_banner {
    height: 1.2rem;
  }
  .header_banner .text_wrap {
    width: 90%;
  }
  .header_banner .text_wrap .bottom {
    font-size: 0.14rem !important;
  }

  /* ======================
     3. 通用版心容器
     ====================== */
  .wrapper,
  .wrap_footer,
  .business_content_wrap {
    width: 100% !important;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
  }

  /* ======================
     4. 首页 (index_b)
     ====================== */

  /* 内容区横排改纵排 */
  .content_one .wrap,
  .content_two .wrap {
    flex-direction: column;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    width: 100%;
    box-sizing: border-box;
  }
  .content_one .wrap .text_one,
  .image_1,
  .content_two .wrap .text_two,
  .image_2 {
    width: 100% !important;
  }
  .image_1 {
    margin-left: 0 !important;
  }
  .image_1 img {
    margin-top: 0.15rem;
  }
  /* 隐藏第二内容区大厦图片 */
  .image_2 {
    display: none;
  }

  /* 第二内容区背景图偏移修正 */
  .content_two .wrap .text_two {
    background-position: center 0.5rem !important;
    padding-left: 0.2rem;
  }

  /* 新闻列表卡片自适应 */
  .content_footer .wrap_footer {
    width: 100% !important;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
  }
  #blog_list {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 0.15rem;
  }
  /* 移动端点击/聚焦时显示红框（替代桌面端 hover） */
  #blog_list:active,
  #blog_list:focus {
    border: 2px solid #D90000;
    box-sizing: border-box;
    outline: none;
  }
  #blog_list:active .blog_Rtime_fl,
  #blog_list:focus .blog_Rtime_fl {
    background: #D90000;
  }
  #blog_list:active .blog_Rtime_fr b,
  #blog_list:focus .blog_Rtime_fr b {
    color: #D90000;
  }
  .blog_list .blog_Rtime_fl {
    width: 0.8rem;
    height: 0.8rem;
  }
  .blog_list .blog_Rtime_fl b {
    font-size: 0.24rem;
    line-height: 0.5rem;
  }
  .blog_list .blog_Rtime_fr {
    width: calc(100% - 1.1rem) !important;
    height: auto !important;
  }
  .blog_list .blog_Rtime_fr b {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-all;
  }
  /* 新闻列表项内容垂直居中 */
  #blog_list > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.15rem 0.2rem !important;
  }

  /* ======================
     5. 子页面左右布局改上下
     ====================== */
  .main_wrap {
    flex-direction: column;
  }
  .left,
  .right {
    width: 100% !important;
  }

  /* 左侧导航在移动端全宽显示 */
  .left {
    margin-bottom: 0.2rem;
  }

  /* ======================
     6. 证书页 & 社长致辞页 (certificate / speech)
     ====================== */
  .right .photo_wrap {
    width: 100%;
    height: auto;
    margin-left: 0;
  }
  .right .img_wrap {
    width: 100%;
    height: auto;
    position: relative;
  }
  .right .img_wrap img {
    width: 100%;
    height: auto !important;
  }
  .right .text {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    padding: 0.15rem;
    box-sizing: border-box;
    overflow: hidden;
  }
  .right .text p {
    word-break: break-word;
  }

  /* ======================
     6b. 企业介绍/文化页文本列表 (intro / culture / jan)
     ====================== */
  .right .text_wrap ul li {
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-top: 0.05rem !important;
  }
  .right .text_wrap ul li p:nth-child(1) {
    width: 100% !important;
    background-color: transparent !important;
    height: auto !important;
    line-height: normal !important;
    font-size: 0.16rem !important;
  }
  .right .text_wrap ul li p:nth-child(2) {
    width: 100% !important;
    margin-top: 0.05rem;
  }

  /* ======================
     7. 社长致辞页补充 (speech)
     ====================== */
  /* speech 页 photo_wrap 空 div 隐藏 */
  .right .photo_wrap {
    display: none;
  }

  /* ======================
     8. 业务内容页 (business_content)
     ====================== */
  .business_content_one .main_wrap {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .business_content_one .main_wrap span:first-child,
  .business_content_one .main_wrap span:nth-child(2) {
    display: none;
  }
  .business_content_one .main_wrap div:nth-child(3),
  .business_content_one .main_wrap div:nth-child(4),
  .business_content_one .main_wrap div:nth-child(5) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    min-height: auto;
    margin-bottom: 0.15rem;
    padding: 0.15rem;
    box-sizing: border-box;
  }
  .business_content_one .img_wrap {
    display: none;
  }
  .business_content_wrap .top {
    flex-direction: column;
  }
  .business_content_wrap .top > div {
    width: 100% !important;
    height: auto !important;
  }
  .business_content_wrap .top > div img {
    width: 100% !important;
    height: auto !important;
  }
  .business_content_wrap .top .top_2 {
    width: 100%;
    padding-left: 0;
  }
  .business_content_wrap .bottom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .business_content_wrap .bottom table {
    min-width: 5rem;
  }

  /* ======================
     9. 开发业绩页 (performance)
     ====================== */
  .performance_content ul {
    flex-direction: column;
  }
  .performance_content ul li {
    width: 100% !important;
  }
  .performance_content ul li img {
    width: 100% !important;
  }
  .performance_content ul li p:nth-child(1) {
    width: 100% !important;
  }
  /* 隐藏悬浮文字标注（移动端无 hover） */
  .box-font {
    display: none !important;
  }

  /* ======================
     10. 联系我们页 (contact)
     ====================== */
  .main_content ul {
    flex-direction: column;
    padding: 0.2rem 0;
  }
  .main_content ul li {
    margin-bottom: 0.2rem;
    margin-left: 0 !important;
  }
  /* 地图 iframe 高度降低 */
  #container {
    height: 2.5rem !important;
  }
  #container iframe {
    height: 2.5rem !important;
  }

  /* ======================
     11. 新闻页 (news)
     ====================== */
  .main_content .news_content {
    width: 100% !important;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
  }
  .news_content h4,
  .news_content h1 {
    font-size: 0.18rem !important;
    line-height: 1.4 !important;
  }
  .news_content p {
    font-size: 0.14rem !important;
    line-height: 1.6 !important;
  }
  .news_content .photo_box {
    margin-top: 0.1rem;
  }

  /* 新闻图片弹窗 */
  .pop {
    width: 92% !important;
    min-height: auto !important;
    padding: 0.15rem;
    overflow: visible !important;
    box-sizing: border-box;
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
  .pop img {
    max-width: 100% !important;
    height: auto !important;
  }
  /* 弹窗内轮播图自适应 - 固定容器高度，图片按比例缩放不裁切 */
  .pop .carousel-inner {
    height: 5rem !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .pop .carousel-inner > .item {
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .pop .carousel-inner > .item > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
  }
  .pop .carousel-inner .item img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }
  /* 圆点指示器下移 */
  .pop .carousel-indicators {
    bottom: 0 !important;
    margin-bottom: 0.15rem;
  }
  /* 弹窗内恢复左右翻页按钮（覆盖全局隐藏规则） */
  .pop .carousel-control {
    display: block !important;
    width: 10% !important;
    opacity: 0.7 !important;
  }
  .pop .carousel-control .left,
  .pop .carousel-control .right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  /* 弹窗背景遮罩，防止拦截点击 */
  .bgPop {
    z-index: 999999 !important;
  }
  /* 弹窗内关闭按钮 */
  .pop-top {
    text-align: right;
    margin-bottom: 0.1rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
  }
  .pop-close {
    display: inline-block !important;
    font-size: 0.24rem !important;
    color: #fff !important;
    cursor: pointer;
    padding: 0.05rem 0.1rem;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  /* 弹窗内轮播容器 */
  .pop .pop-foot {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
  }

  /* 分页 */
  .pagination > li > a,
  .pagination > li > span {
    padding: 4px 8px;
    font-size: 0.12rem;
  }

  /* ======================
     12. 面包屑导航
     ====================== */
  .bread_wrap {
    height: auto;
    flex-wrap: wrap;
    font-size: 0.11rem;
    padding: 0.1rem 0;
  }

  /* ======================
     13. 悬浮窗
     ====================== */
  /* 回到顶部按钮移动端隐藏 */
  .Suspension_window {
    display: none !important;
  }
  /* 语言切换按钮移动端显示 */
  .Suspension_window2 {
    display: block !important;
  }
  .Suspension_window2 .hides {
    display: none !important;
  }
  .Suspension_window2 .show {
    position: fixed !important;
    top: auto !important;
    bottom: 0.5rem !important;
    right: 0.1rem !important;
    width: 0.5rem !important;
    height: auto !important;
    z-index: 999;
  }

  /* ======================
     14. 底部 Footer
     ====================== */
  .footer {
    height: auto;
    padding: 0.2rem 0;
    line-height: normal;
  }
  .footer p {
    font-size: 0.12rem;
    padding: 0 0.2rem;
    word-break: break-all;
  }

  /* ======================
     15. 通用图片自适应
     ====================== */
  .right_banner img {
    max-width: 100%;
    height: auto;
  }

  /* ======================
     16. 招聘页补充 (recruit)
     ====================== */
  /* 招聘页 h4 字号调整 */
  .right .text_wrap h4 {
    font-size: 0.18rem;
  }

  /* ======================
     17. 轮播图 (carousel)
     ====================== */
  /* 首页轮播图固定高度（含独立 .focus 容器） */
  .focus {
    height: 2rem !important;
    overflow: hidden;
  }
  .header_banner .carousel-inner,
  .content_one .carousel-inner,
  .content_two .carousel-inner,
  .focus > .carousel-inner,
  .header_banner .carousel-inner .item,
  .content_one .carousel-inner .item,
  .content_two .carousel-inner .item,
  .focus > .carousel-inner .item {
    height: 100% !important;
  }
  .header_banner .carousel-inner .item img,
  .content_one .carousel-inner .item img,
  .content_two .carousel-inner .item img,
  .focus > .carousel-inner .item img {
    height: 100% !important;
    object-fit: cover !important;
  }
  /* 弹窗内轮播不限制高度 */
  .pop .focus {
    height: auto !important;
    overflow: visible !important;
  }
  /* 隐藏 Bootstrap 默认翻页按钮 */
  .carousel-control {
    display: none !important;
  }

  /* ======================
     18. 首页标题字号
     ====================== */
  .text_one p:nth-child(2),
  .text_two p:nth-child(2),
  .footer_header p:nth-child(2) {
    font-size: 0.24rem !important;
  }
  .text_one p:nth-child(3),
  .text_two p:nth-child(3),
  .footer_header p:nth-child(3) {
    font-size: 0.18rem !important;
  }
  /* Banner 标题字号 */
  .header_banner .text_wrap .top p:nth-child(2) {
    font-size: 0.24rem !important;
  }

}
