/* ============================================
 * 博宣科技官网 - 移动端响应式补充样式
 * Phase 8 - 移动端适配
 * 依赖: Bootstrap 5.3.3
 * ============================================ */

/* --- 移动端导航优化 --- */
@media (max-width: 991.98px) {
  .navbar-nav {
    padding: 0.5rem 0;
  }
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .navbar .dropdown-menu {
    border: none;
    background: transparent;
    padding-left: 1.5rem;
  }
  .navbar .dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }
}

/* --- 通用移动端间距调整 --- */
@media (max-width: 767.98px) {
  /* 区块间距减半 */
  section, .section, .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

  /* 标题字号缩小 */
  h1, .h1 { font-size: 1.6rem !important; }
  h2, .h2 { font-size: 1.35rem !important; }
  h3, .h3 { font-size: 1.15rem !important; }

  /* 卡片间距 */
  .card, .card-body { margin-bottom: 1rem; }

  /* 图片自适应 */
  img { max-width: 100%; height: auto; }

  /* 表格横向滚动 */
  table, .table-responsive {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 按钮全宽 */
  .btn-mobile-full { display: block; width: 100%; margin-bottom: 0.5rem; }

  /* 联系方式页面 */
  .contact-info .col-md-6 { margin-bottom: 1.5rem; }
}

/* --- 小屏手机优化 (<576px) --- */
@media (max-width: 575.98px) {
  body { font-size: 14px; }

  h1, .h1 { font-size: 1.4rem !important; }
  h2, .h2 { font-size: 1.2rem !important; }

  .container { padding-left: 12px; padding-right: 12px; }

  /* 面包屑隐藏（小屏） */
  .breadcrumb { display: none; }

  /* 分页按钮缩小间距 */
  .pagination .page-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
  }

  /* 固定电话按钮 */
  .fixed-call-btn {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    text-decoration: none;
    font-size: 20px;
  }
}

/* --- 触摸优化 --- */
@media (pointer: coarse) {
  /* 增大可点击区域 */
  .nav-link, .dropdown-item, .btn, .page-link, a[role="button"] {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  /* 内联链接保持原有行高 */
  p a, span a, li a { min-height: auto; display: inline; }
}

/* --- 响应式图片（WebP + srcset）--- */
picture source, picture img { display: block; }
.responsive-img { max-width: 100%; height: auto; }

/* --- 图片懒加载占位 --- */
img[loading="lazy"] { background: #f5f5f5; }
img[loading="lazy"]:not([src]) { visibility: hidden; }

/* --- 打印样式 --- */
@media print {
  .navbar, .footer, .fixed-call-btn, .breadcrumb { display: none !important; }
  body { font-size: 12pt; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
