/* NexoraWeb — premium mobile UX */
@media (max-width: 720px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body { padding-bottom: env(safe-area-inset-bottom, 0); }

  .container {
    width: min(100% - 20px, 520px) !important;
    padding-left: 0;
    padding-right: 0;
  }

  /* Header */
  .nav {
    height: 64px !important;
    gap: 8px;
  }
  .brand b { font-size: 18px !important; }
  .brand span { display: none; }
  .nav-actions { gap: 6px; }
  .menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
  }
  .lang-btn { min-height: 44px; min-width: 44px; }
  .donate-nav-btn { display: none !important; }

  /* Hero */
  .nx-hero-redesign {
    padding: 20px 0 32px !important;
    min-height: auto !important;
  }
  .nx-hero-shell { width: min(100% - 20px, 520px) !important; padding-top: 8px; }
  .nx-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    min-height: auto !important;
  }
  .nx-hero-copy { order: 1; }
  .nx-iphone16-scene { order: 0; }
  .nx-side-stats-mobile { order: 2; }

  .nx-pill { font-size: 11px; padding: 8px 12px; }
  .nx-title, .title {
    font-size: clamp(30px, 8.5vw, 40px) !important;
    line-height: 1.08 !important;
    margin-top: 14px !important;
  }
  .nx-lead, .lead {
    font-size: 15px !important;
    line-height: 1.65 !important;
    margin-top: 12px;
  }
  .nx-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
    margin: 20px 0 !important;
  }
  .nx-actions .btn { width: 100%; min-height: 50px; justify-content: center; }

  .nx-feature-bar {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    border-radius: 20px !important;
  }
  .nx-feature-bar div {
    min-height: auto !important;
    padding: 14px 12px !important;
  }
  .nx-feature-bar b { font-size: 13px; }
  .nx-feature-bar span { font-size: 11px; line-height: 1.4; }

  /* iPhone 16 Pro hero */
  .nx-iphone16-scene {
    min-height: auto !important;
    padding: 4px 0 12px !important;
    perspective: 900px;
    overflow: visible !important;
    display: grid !important;
    place-items: center;
  }
  .nx-iphone16 {
    width: min(250px, 74vw) !important;
    height: auto !important;
    aspect-ratio: 300 / 620;
    padding: 9px !important;
    border-radius: 42px !important;
    transform: rotateY(-8deg) rotateX(2deg) rotateZ(-2deg) !important;
    animation: none !important;
  }
  .nx-iphone16-screen { border-radius: 36px !important; min-height: 0; }
  .nx-iphone16-island { top: 15px !important; width: 72px !important; height: 22px !important; }
  .nx-iphone16-glow { width: 260px !important; height: 260px !important; }
  .nx-iphone16-shadow { width: min(200px, 55vw) !important; }
  .nx-float-chip { display: none !important; }
  .nx-iphone16-live { top: 18px; right: 20px; font-size: 8px; padding: 4px 7px; }
  .nx-side-stats-mobile {
    display: grid !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 4px;
  }
  .nx-side-stats-mobile > div {
    padding: 14px !important;
    border-radius: 18px !important;
  }
  .nx-side-stats-mobile b { font-size: 20px !important; }

  /* Sections */
  .section { padding: 52px 0 !important; }
  .section.small { padding: 44px 0 !important; }
  .section-title { font-size: clamp(24px, 6.5vw, 32px) !important; }
  .eyebrow { font-size: 11px; }

  .cards, .steps, .pricing, .included, .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .card { padding: 20px !important; border-radius: 22px !important; }

  /* Projects */
  .projects { grid-template-columns: 1fr !important; gap: 14px !important; }
  .project-img { height: 200px !important; }
  .project-featured .project-img { height: 220px !important; }
  .project-actions { display: grid !important; }
  .project-actions .btn { width: 100%; }

  /* Reviews */
  .reviews-top { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .reviews-top .btn { width: 100% !important; min-height: 50px; }
  .reviews-carousel {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 12px !important;
  }
  .reviews-carousel .review {
    flex: 0 0 min(88%, 320px) !important;
    scroll-snap-align: start;
    min-width: 0 !important;
  }
  .review-controls { margin-top: 8px; }
  .review-controls .arrow { min-width: 48px; min-height: 48px; }

  /* Contact */
  .contact-list { gap: 10px !important; }
  .contact-card { min-height: 56px; padding: 14px !important; }
  .form { gap: 10px !important; }
  input, textarea, select {
    font-size: 16px !important;
    min-height: 50px !important;
    border-radius: 14px !important;
  }
  textarea { min-height: 110px !important; }
  .form .btn, .contact-grid .btn { width: 100%; min-height: 50px; }

  /* Modals */
  .modal {
    align-items: flex-end !important;
    padding: 0 !important;
    overflow-y: auto !important;
  }
  .modal-box, .donate-box, .nx-review-box {
    width: 100% !important;
    max-width: none !important;
    max-height: 94vh !important;
    border-radius: 24px 24px 0 0 !important;
    overflow-y: auto !important;
  }
  .donate-grid { grid-template-columns: 1fr !important; padding: 14px !important; }
  .choices { grid-template-columns: 1fr !important; }

  /* Mobile menu */
  .mobile-menu {
    width: min(100vw, 360px) !important;
    padding: 20px !important;
  }
  .mobile-menu a {
    padding: 14px 0 !important;
    font-size: 16px !important;
  }
  .mobile-menu .btn { min-height: 50px; margin-top: 16px !important; }

  /* Chat FAB */
  .chat-fab {
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    width: 56px !important;
    height: 56px !important;
  }
  .ai-chat {
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: min(90vh, 680px) !important;
    border-radius: 24px 24px 0 0 !important;
  }

  /* Footer */
  .footer-row {
    flex-direction: column !important;
    gap: 16px !important;
    text-align: center;
  }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 12px !important; }

  /* Map */
  .map-wrap iframe { height: 240px !important; }
  .map-overlay {
    position: static !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
  }
  .map-overlay a.btn { width: 100%; text-align: center; }

  /* Toast */
  .toast, #toast {
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    text-align: center !important;
  }
}

@media (max-width: 400px) {
  .nx-feature-bar { grid-template-columns: 1fr !important; }
  .nx-side-stats-mobile { grid-template-columns: 1fr !important; }
  .price-value { font-size: 30px !important; }
}
