/**
 * 知创万合官网 - 响应式适配
 * PC端(1920/1366) + 平板 + 移动端适配
 */

/* ===== 大屏适配 (1920px+) ===== */
@media (min-width: 1920px) {
  :root {
    --container-max: 1440px;
    --section-gap: 160px;
  }

  .hero-title {
    font-size: var(--text-7xl);
  }
}

/* ===== 平板适配 (1024px - 1279px) ===== */
@media (max-width: 1279px) {
  :root {
    --section-gap: 100px;
  }

  .hero-title {
    font-size: var(--text-5xl);
  }

  .ai-showcase,
  .service-detail,
  .about-grid,
  .contact-grid {
    gap: var(--space-10);
  }

  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-image-wrapper {
    max-width: 400px;
  }
}

/* ===== 小平板适配 (768px - 1023px) ===== */
@media (max-width: 1023px) {
  :root {
    --header-height: 64px;
    --section-gap: 80px;
  }

  .nav-menu,
  .nav-actions .nav-phone {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-actions .btn {
    display: none;
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-stats {
    gap: var(--space-6);
  }

  .business-grid,
  .scenes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-showcase {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .ai-visual {
    order: -1;
  }

  .ai-model-graphic {
    width: 320px;
    height: 320px;
  }

  .service-detail {
    grid-template-columns: 1fr;
  }

  .detail-visual {
    order: -1;
  }

  .dev-process {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .process-arrow {
    transform: rotate(90deg);
  }

  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-visual {
    order: -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-detail {
  gap: var(--space-8);
}

.service-image-card:hover {
  transform: translateY(-4px) scale(1.01);
}

.service-image-badge {
  bottom: 12px;
  right: 12px;
  padding: 4px 12px;
  font-size: var(--text-xs);
}
}

/* ===== 移动端适配 (640px - 767px) ===== */
@media (max-width: 767px) {
  :root {
    --container-padding: 20px;
    --section-gap: 64px;
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-16);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-desc {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hero-actions .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    display: none;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .business-grid,
  .scenes-grid,
  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .tab-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }

  .saas-products {
    grid-template-columns: 1fr;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .count-up {
    font-size: var(--text-4xl);
  }

  .about-floating-card {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* ===== 小屏移动端 (480px以下) ===== */
@media (max-width: 479px) {
  .hero-title {
    font-size: var(--text-2xl);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .business-card,
  .scene-card,
  .solution-card {
    padding: var(--space-5);
  }

  .contact-form-wrapper {
    padding: var(--space-6);
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .achievement-item {
    padding: var(--space-4);
  }

  .count-up {
    font-size: var(--text-3xl);
  }
}

/* ===== 横屏移动端 ===== */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-6)) 0 var(--space-10);
  }

  .hero-scroll-indicator {
    display: none;
  }
}

/* ===== 暗色模式适配 ===== */
@media (prefers-color-scheme: dark) {
  .header.scrolled {
    background: rgba(15, 23, 42, 0.9);
  }

  .mobile-menu {
    background: var(--bg-dark);
  }

  .glass {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .nav-link.active {
    background: rgba(37, 99, 235, 0.15);
  }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
