/* 响应式样式文件 */

/* 平板端样式 (768px - 1199px) */
@media (max-width: 1199px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
  }
}

/* 移动端样式 (最大宽度 767px) */
@media (max-width: 767px) {
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 2.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  /* 导航栏移动端样式 */
  .navbar-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: var(--spacing-xl);
    transition: left var(--transition-normal);
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav.active {
    left: 0;
  }
  
  .navbar-nav li {
    margin: var(--spacing-md) 0;
  }
  
  .navbar-nav a {
    font-size: 1.2rem;
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .navbar-toggle {
    display: flex;
  }
  
  .navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .navbar-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* 英雄区块移动端样式 */
  .hero {
    min-height: 100vh;
    padding: var(--spacing-xl) 0;
  }
  
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-cta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }
  
  .hero-content {
    padding: 0 var(--spacing-sm);
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  /* 标题移动端样式 */
  .section-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
  }
  
  /* 数据展示移动端样式 */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .stat-item {
    padding: var(--spacing-lg);
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 1rem;
  }
  
  /* 服务网格移动端样式 */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
  
  /* 页脚移动端样式 */
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: var(--spacing-md);
  }
  
  /* 表单移动端样式 */
  .form-group {
    margin-bottom: var(--spacing-md);
  }
  
  .form-control {
    width: 100%;
    padding: var(--spacing-sm);
    font-size: 1rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  /* 关于页面移动端样式 */
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .about-text {
    margin-bottom: var(--spacing-lg);
  }
  
  .about-image {
    order: -1;
    margin-bottom: var(--spacing-lg);
  }

  /* 防止固定宽度徽标容器与图片在移动端溢出 */
  .logo-box {
    width: 100% !important;
    max-width: 100% !important;
  }
  .logo-box img {
    max-width: 100% !important;
    height: auto;
  }
  
  /* 服务页面移动端样式 */
  .service-tabs {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .service-tab {
    width: 100%;
    text-align: center;
  }
  
  .service-content {
    flex-direction: column;
    text-align: center;
  }
  
  .service-image {
    order: -1;
    margin-bottom: var(--spacing-lg);
  }
  
  /* 联系页面移动端样式 */
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .contact-info {
    order: -1;
  }
  
  /* 动画优化 - 移动端减少动画 */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* 触摸优化 */
  .btn,
  .card,
  .navbar-nav a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 滚动指示器移动端 */
  .scroll-indicator {
    bottom: var(--spacing-md);
    font-size: 0.9rem;
  }
}

/* 超小屏幕 (最大宽度 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .container {
    padding: 0 var(--spacing-xs);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .card {
    padding: var(--spacing-sm);
  }
  
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--spacing-xl) 0;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
  }
  
  .scroll-indicator {
    display: none;
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero::before {
    background-size: 50px 50px;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  .hero-cta,
  .scroll-indicator,
  .btn {
    display: none;
  }
  
  .hero {
    min-height: auto;
    background: var(--white);
    color: var(--black);
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid var(--medium-gray);
  }
}