/* ============================================================
   mobile.css - 移动端专用样式
   描述：移动端优化的排版、触摸交互、全宽布局、移动卡片
   媒体查询：screen and (max-width: 767px)
   使用方式：<link rel="stylesheet" href="css/mobile.css"
            media="screen and (max-width: 767px)">
   ============================================================ */

/* ============================================================
   一、移动端排版优化
   ============================================================ */

/* 基础字号放大以确保可读性 */
html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 0.95rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  word-break: break-word;
}

/* 移动端标题缩放 */
h1 { font-size: 1.8rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

p {
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

/* 段落间距收紧 */
p + p {
  margin-top: -0.3rem;
}

/* ============================================================
   二、全宽容器
   ============================================================ */

.container {
  padding-left: 16px;
  padding-right: 16px;
  max-width: 100%;
}

.container-fluid {
  padding-left: 16px;
  padding-right: 16px;
}

/* 区块间距简化 */
section,
.section {
  padding: 40px 0;
}

/* 区块头部 */
.section-header {
  margin-bottom: 28px;
  padding: 0 5px;
}

.section-header h2 {
  font-size: 1.55rem;
}

.section-header p {
  font-size: 0.9rem;
  max-width: 100%;
}

/* 装饰线缩小 */
.section-header h2::after {
  width: 40px;
  height: 2px;
  margin-top: 10px;
}

/* ============================================================
   三、移动端导航栏
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 8px 16px;
  min-height: 70px;
  height: 70px;
  transition: height 0.3s ease, 0.35s ease;
}

.navbar:hover {
  height: 70px;
}

.navbar .container {
  justify-content: space-between;
  height: 60px;
}

.navbar .container:hover {
  height: 60px;
}

.navbar-nav {
  flex: none;
  justify-content: flex-start;
}

.nav-item {
  padding-top: 0;
}

/* 移动端默认白色背景（避免透明导致不可见） */
.navbar {
  background: #ffffff;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}

/* 首页Hero区域导航栏保持透明（如果有 .navbar-transparent 类） */
.navbar.navbar-transparent {
  background: transparent;
  box-shadow: none;
}

.navbar.navbar-scrolled {
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 6px 16px;
  min-height: 70px;
}

.navbar-brand {
  font-size: 1.2rem;
  font-weight: 700;
  gap: 0.5rem;
}

.navbar-brand .brand-sub {
  font-size: 0.8rem;
}

.navbar-brand img {
  height: 30px;
  width: auto;
}

/* 汉堡菜单按钮 */
.navbar-toggler {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
}

.navbar-toggler:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.navbar-toggler-icon {
  width: 22px;
  height: 22px;
}

/* 折叠菜单 - 白色圆角卡片 */
.navbar-collapse {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 10px 14px;
  margin-top: 8px;
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 菜单项 */
.navbar-collapse .nav-link {
  color: #333333;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* 触摸反馈 */
.navbar-collapse .nav-link:active {
  background: var(--primary-lighter);
  color: #005BBB;
  transform: scale(0.98);
}

.navbar-collapse .nav-link:hover {
  background: var(--primary-lighter);
  color: #005BBB;
}

/* 下拉菜单（移动端展开式） */
.navbar-collapse .dmenu {
  position: static;
  float: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 0 0 15px;
  margin: 0;
  border-radius: var(--radius-sm);
  display: none;
}

.navbar-collapse .dmenu.show {
  display: block;
}

.navbar-collapse .dmenu-item {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #555;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.navbar-collapse .dmenu-item:active {
  background: var(--primary-lighter);
  color: #005BBB;
}

/* 分隔线 */
.navbar-collapse .dropdown-divider {
  border-top: 1px solid var(--gray-lighter);
  margin: 5px 0;
}

.rd-showcase-content{
  background-size: 10rem 10rem;
}

/* ============================================================
   三、移动端自定义菜单覆盖层（非Bootstrap菜单）
   ============================================================ */

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
}

.mobile-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #005BBB;
  font-family: 'Source Han Sans CN Bold', sans-serif;
}

.mobile-menu-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #333;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 50%;
  transition: 0.2s ease;
}

.mobile-menu-close:hover,
.mobile-menu-close:active {
  background: #f5f5f5;
}

.mobile-menu-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  color: #333333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid #f8f8f8;
  transition: background 0.2s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
  background: #f5f9ff;
}

.mobile-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  color: #005BBB;
  font-size: 1.1rem;
}

.mobile-item-text {
  flex: 1;
}

.mobile-item-arrow {
  color: #999;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.mobile-menu-item.active .mobile-item-arrow {
  transform: rotate(90deg);
}

.mobile-submenu {
  display: none;
  background: #fafafa;
}

.mobile-submenu.show {
  display: block;
}

.mobile-submenu-item {
  display: block;
  padding: 14px 20px 14px 62px;
  color: #666666;
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-submenu-item:hover,
.mobile-submenu-item:active {
  background: #f0f7ff;
  color: #005BBB;
}

/* ============================================================
   四、移动端按钮（触摸友好）
   ============================================================ */

.btn,
.btn-primary,
.btn-secondary,
.btn-outline-white,
.btn-outline-dark {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  touch-action: manipulation;
  /* 防止双击缩放 */
  user-select: none;
}

/* 按钮按压反馈 */
.btn:active,
.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* 移动端禁用hover上浮效果，改用按压反馈 */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline-white:hover,
  .btn-outline-dark:hover {
    transform: none;
    box-shadow: none;
  }

  .btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.96);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .card:hover,
  .product-card:hover,
  .news-card:hover,
  .quality-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
}

/* 按钮组纵向排列 */
.btn-group {
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-group .btn {
  width: 100%;
}

/* 按钮大小调整 */
.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 1.05rem;
}

/* ============================================================
   五、移动端卡片布局
   ============================================================ */

/* 单列卡片 */
.card,
.product-card {
  margin-bottom: 16px;
  border-radius: var(--radius);
}

.card:last-child,
.product-card:last-child {
  margin-bottom: 0;
}

.card-body {
  padding: 18px;
}

.card-title {
  font-size: 1.1rem;
}

/* 产品卡片 */
.product-card .product-img {
  aspect-ratio: 16 / 10;
}

.product-card .product-body {
  padding: 15px;
}

.product-card .product-title {
  font-size: 1rem;
}

.product-card .product-desc {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* 新闻卡片全宽堆叠 */
.news-card {
  flex-direction: column;
  margin-bottom: 16px;
}

.news-card .news-img {
  flex: none;
  width: 100%;
  height: 180px;
}

.news-card .news-body {
  padding: 16px;
}

.news-card .news-title {
  font-size: 1.05rem;
}

/* ============================================================
   六、移动端 Hero/Banner
   ============================================================ */

.hero-section {
  min-height: 65vh;
  text-align: center;
  padding: 60px 16px 30px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.hero-content {
  max-width: 100%;
  text-align: center;
}

.hero-content h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.hero-illustration {
  display: none;
}

.hero-dots {
  width: 100%;
  background-size: 25px 25px;
  opacity: 0.4;
}

.scroll-indicator {
  display: none;
}

/* 页面Banner */
.page-banner {
  padding: 65px 0 25px;
  text-align: center;
}

.page-banner h1 {
  font-size: 1.5rem;
}

/* ============================================================
   七、移动端页脚
   ============================================================ */

.site-footer {
  padding: 30px 0 20px;
  text-align: center;
}

.site-footer .container {
  padding: 20px 0;
}

.site-footer .col-lg-8 .row {
  /* flex-direction: column; */
  display: none;
}

.site-footer .col-lg-6 {
  display: none;
}

.site-footer .col-lg-4 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer .footer-brand {
  margin-bottom: 16px;
  text-align: center;
}

.site-footer .footer-brand svg {
  /* height: 100px; */
  width: 150px;
  display: inline-block;
}

.site-footer .footer-desc {
  display: none;
}

.site-footer .mt-4 {
  margin-top: 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer .footer-qr-text {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 8px;
}

.site-footer img {
  width: 90px !important;
  height: 90px !important;
}

.footer-bottom {
  margin-top: 20px;
  padding: 14px 0;
  font-size: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

/* ============================================================
   八、移动端表单
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.form-control {
  padding: 11px 14px;
  font-size: 0.92rem;
  border-radius: var(--radius);
  min-height: 44px;
}

textarea.form-control {
  min-height: 100px;
}

.form-control:focus {
  box-shadow: 0 0 0 2px rgba(0, 91, 187, 0.15);
  border-color: var(--primary);
}

/* 服务表单 */
.service-form {
  padding: 22px 16px;
  border-radius: var(--radius);
}

.service-form .form-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.service-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 占位符字号 */
.form-control::placeholder {
  font-size: 0.85rem;
  color: var(--gray);
}

/* ============================================================
   九、移动端表格
   ============================================================ */

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

table {
  font-size: 0.85rem;
  min-width: 600px;
}

th, td {
  padding: 10px 12px;
  white-space: nowrap;
}

/* ============================================================
   十、移动端间距简化
   ============================================================ */

.quality-section {
  padding: 40px 0;
}

.quality-card {
  padding: 25px 16px;
}

.quality-icon {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.quality-card h4 {
  font-size: 1.05rem;
}

/* 时间线 */
.timeline {
  padding: 0;
}

.timeline-item {
  margin-bottom: 28px;
}

/* 招聘 */
.recruitment-item {
  padding: 16px;
  gap: 10px;
}

.recruitment-info h4 {
  font-size: 1rem;
}

/* 联系方式 */
.contact-info-item {
  padding: 14px;
  gap: 12px;
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

/* 认证卡片 */
.certification-item {
  padding: 18px 12px;
}

.certification-item img {
  height: 45px;
}
/* 研发体系卡片 */
.rd-sub-item-left {
    padding-right: 0;
    border-right: none;
}
.rd-sub-item-right{
    padding-left: 0;
    border-left: none;
}

/* ============================================================
   十一、移动端辅助交互
   ============================================================ */

/* 增大点击热区 */
/* a,
button,
.nav-link,
.dropdown-item,
.btn {
  min-height: 44px;
  min-width: 44px;
} */

/* 禁用hover浮起动画（触屏设备无hover） */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .product-card:hover,
  .news-card:hover,
  .quality-card:hover,
  .certification-item:hover,
  .contact-info-item:hover,
  .recruitment-item:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .product-card:hover .product-img img,
  .news-card:hover .news-img img,
  .hover-zoom:hover img {
    transform: none;
  }

  .back-to-top:hover {
    transform: translateY(0);
  }
}

/* 滚动流畅 */
.navbar-collapse,
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* 选中状态触摸反馈 */
.nav-link:active,
.btn:active,
.dropdown-item:active {
  opacity: 0.8;
}

/* ============================================================
   十二、移动端图片优化
   ============================================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 延迟加载占位 */
/* img[loading="lazy"] {
  background: var(--gray-lighter);
  min-height: 100px;
} */

/* ============================================================
   十三、移动端隐藏元素
   ============================================================ */

.mobile-hide {
  display: none !important;
}

.desktop-only {
  display: none !important;
}

.mobile-only {
  display: block !important;
}

/* ============================================================
   十四、移动端加载动画
   ============================================================ */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 9999;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* ============================================================
   十五、安全区域适配（刘海屏）
   ============================================================ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .back-to-top {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}