/* H5响应式样式 */
/* 基础移动设备样式 */
@media (max-width: 768px) {

  /* 容器样式 */
  .container {
    padding: 0 15px;
  }

  .section-title {
    font-size: 28px;
  }

  /* 导航栏样式 */
  .header-container {
    padding: 10px 0;
  }

  .logo i {
    font-size: 24px;
  }

  .logo h1 {
    font-size: 20px;
  }

  nav ul {
    display: none;
  }

  .nav-btns {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  /* 英雄区域样式 */
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 100px 0 50px;
    text-align: center;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .hero-image {
    position: static;
    transform: none;
    max-width: 100%;
    margin-top: 30px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  /* 服务区域样式 */
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  .services {
    grid-template-columns: 1fr;
  }

  /* 关于我们区域 */
  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  .about-image,
  .about-text {
    flex: none;
    width: 100%;
  }
}

/* 小屏移动设备样式 */
@media (max-width: 576px) {
  .section-title {
    font-size: 24px;
  }

  /* 英雄区域样式 */
  .hero h2 {
    font-size: 28px;
  }

  .hero p {
    font-size: 14px;
  }

  /* 按钮样式 */
  .btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* 服务卡片样式 */
  .service-card {
    padding: 20px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-icon i {
    font-size: 24px;
  }

  .service-card h3 {
    font-size: 20px;
  }
}

/* 触摸优化样式 */
button,
a,
input[type="button"],
input[type="submit"] {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 滚动行为优化 */
html {
  scroll-behavior: smooth;
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  padding: 20px;
  transition: right 0.3s ease;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu ul {
  margin-top: 50px;
  list-style: none;
}

.mobile-menu ul li {
  margin-bottom: 20px;
}

.mobile-menu ul li a {
  font-size: 18px;
  font-weight: 500;
  color: var(--dark);
}

/* 移动端适配的表单元素 */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin-bottom: 15px;
}

/* 适配不同屏幕方向 */
@media (orientation: landscape) {
  .hero {
    height: 100vh;
  }
}


/* 移动端头部 & 抽屉导航 */
body.nav-open {
  overflow: hidden;
}

.nav-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

#site-nav ul {
  background-color: #fff;
  z-index: 1300;
  position: relative;
  margin: -7px;
}

body.nav-open .nav-mask {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width:1024px) {
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    z-index: 1003;
  }

  .nav-btns {
    display: none;
  }

  nav#site-nav {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 0;
    transform: translateY(-100%);
    transition: transform .3s ease;
    z-index: 1002;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  }

  nav#site-nav.active {
    transform: translateY(0);
  }

  nav#site-nav ul {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
  }

  nav#site-nav a {
    display: block;
    padding: 14px 8px;
    font-size: 16px;
  }
}

/* 避免锚点被吸顶头部遮住 */
[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}