/**
 * Мобильная версия — полная доработка
 * Touch-цели ≥44px, safe-area, улучшенные отступы и типографика
 */

/* ========== VIEWPORT & TOUCH ========== */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

/* Safe area для устройств с вырезами */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer .footer-inner,
  .header-main .header-inner {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .popup-content {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ========== TOUCH TARGETS (min 44px) ========== */
@media (max-width: 992px) {
  .nav-main a,
  .nav-main.is-open a {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
  }
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-small {
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-phone {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }
  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }
  .benefit-pill {
    min-height: 44px;
    padding: 0.65rem 1rem;
  }
  .footer-links a,
  .footer-contact-item a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
  }
}

/* ========== CONTAINER & SPACING ========== */
@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .page-head {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .page-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  .page-lead {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .hero {
    padding: 2rem 0 2.5rem;
    min-height: auto;
  }
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .about-grid,
  .steps-list,
  .for-whom-grid,
  .faq-grid,
  .catalog-preview {
    gap: 1.25rem;
  }
  .equipment-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .category-equipment-grid {
    grid-template-columns: 1fr;
  }
  .equipment-card-body {
    padding: 1.25rem;
  }
  .equipment-card h3,
  .equipment-card-title {
    font-size: 1.1rem;
  }
  .category-title {
    font-size: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .category-link {
    margin-left: 0;
    align-self: flex-start;
  }
  .benefits-row {
    gap: 1.5rem;
  }
  .benefits-text .btn {
    width: 100%;
    justify-content: center;
  }
  .cta-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .popup {
    padding: 10px;
    align-items: flex-end;
  }
  .popup-content {
    max-height: 90vh;
    padding: 1.5rem;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .form-row {
    gap: 1rem;
  }
  .form-group input,
  .form-group textarea {
    font-size: 16px; /* предотвращает zoom в iOS при фокусе */
    padding: 0.75rem 1rem;
  }
  .footer-grid {
    gap: 2rem;
  }
  .footer-seo {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  .footer-seo p {
    font-size: 0.85rem;
  }
}

/* ========== EXTRA SMALL ========== */
@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-title {
    font-size: 1.35rem;
  }
  .section-title {
    font-size: 1.35rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .benefits-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .benefit-pill {
    justify-content: center;
  }
  .step-item {
    padding: 1.5rem;
  }
  .step-num {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .catalog-category {
    margin-bottom: 2.5rem;
  }
  .category-seo-content p {
    font-size: 0.95rem;
  }
  .section-404 .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 992px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 1.5rem 0;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .nav-main.is-open {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ========== REDUCED MOTION (уже в style.css, дублируем для мобильных) ========== */
@media (max-width: 992px) and (prefers-reduced-motion: reduce) {
  .benefit-pill:hover,
  .equipment-card:hover,
  .for-whom-card:hover {
    transform: none;
  }
}
