/* ════════════════════════════════════════════════════════════════
   MOBILE POLISH — overrides pra telas pequenas (≤480px) e
   correções defensivas pra evitar overflow / texto cortado /
   componentes apertados nos 3 templates.
   Inclua via <link> APÓS style.css em cada template.
   ════════════════════════════════════════════════════════════════ */

/* ── Telas muito pequenas (320-480px) ─────────────────────── */
@media (max-width: 480px) {
  /* Nav — padding mais compacto, gap menor */
  .nav {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .nav-logo-text,
  .nav-logo-name {
    font-size: 0.95rem !important;
  }
  .nav-cta {
    padding: 7px 12px !important;
    font-size: 0.72rem !important;
  }
  /* Hero — padding menor, título mais contido */
  .hero {
    padding: 64px 16px 44px !important;
  }
  .hero-title {
    /* IMPORTANT: inclui var(--hero-title-font-scale) — sem isso, slider
       de Fonte do wizard fica ignorado em viewports pequenos (preview
       mobile do wizard mede ~393px e cai aqui). */
    font-size: calc(clamp(1.55rem, 7.5vw, 2.4rem) * var(--hero-title-font-scale, 1)) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.3px !important;
  }
  .hero-subtitle,
  .hero-sub {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }
  .hero-actions {
    gap: 10px !important;
  }
  .hero-trust {
    font-size: 0.68rem !important;
    gap: 8px !important;
  }
  .btn-wa, .btn-ghost {
    padding: 12px 18px !important;
    font-size: 0.85rem !important;
  }

  /* Section titles maiores que necessário em telas pequenas */
  .section-title {
    font-size: clamp(1.3rem, 6vw, 1.8rem) !important;
    line-height: 1.2 !important;
  }
  .section-eyebrow {
    font-size: 0.65rem !important;
    letter-spacing: 0.16em !important;
  }
  .section-inner,
  .section-narrow {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Features — 1 coluna em telas <380px (aumenta legibilidade) */
  .features-grid {
    gap: 10px !important;
  }

  /* Pricing — padding mais compacto */
  .plan-card {
    padding: 24px 18px !important;
  }
  .plan-name { font-size: 1.05rem !important; }
  .plan-price { font-size: 1.8rem !important; }
  .plan-features li { font-size: 0.82rem !important; }
  .plan-badge {
    font-size: 0.62rem !important;
    padding: 5px 12px !important;
  }

  /* Testimonials — card mais compacto */
  .testimonial {
    padding: 20px 18px !important;
  }
  .testimonial-text {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }

  /* Devices grid — 2 colunas em mobile pequeno */
  .devices-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .device-strip-item {
    padding: 14px 8px !important;
  }
  .device-name {
    font-size: 0.78rem !important;
  }

  /* FAQ — pergunta maior pra ler.
     IMPORTANT: padding fica no <p>, NUNCA em .faq-answer. Padding direto
     em .faq-answer com max-height:0 vaza pra fora do card (box-sizing
     content-box adiciona padding ao limite do max-height). */
  .faq-question {
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
    padding: 16px 14px !important;
  }
  .faq-answer p {
    font-size: 0.85rem !important;
    padding: 0 14px 18px !important;
  }
  .faq-item.open .faq-answer p {
    padding-top: 14px !important;
  }

  /* CTA final */
  .cta-title {
    font-size: clamp(1.3rem, 6vw, 1.9rem) !important;
    line-height: 1.2 !important;
  }
  .cta-sub {
    font-size: 0.88rem !important;
  }

  /* Footer */
  .footer {
    padding: 32px 16px 24px !important;
  }
  .footer-tagline {
    font-size: 0.85rem !important;
  }
  .footer-copy {
    font-size: 0.72rem !important;
  }

  /* Platforms strip — wrap melhor */
  .platforms-strip {
    padding: 16px 14px !important;
    gap: 14px 24px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  .platform-item {
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
  }

  /* WhatsApp float — não tampar conteúdo no fundo */
  .btn-wa-float, .wa-float {
    bottom: 16px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }

  /* Modal — full-width com margem mínima */
  .modal-overlay {
    padding: 14px !important;
  }
  .modal {
    padding: 22px 18px !important;
    border-radius: 14px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* Hero video section */
  .hero-video-wrap {
    border-radius: 12px !important;
    padding: 0 14px !important;
  }
}

/* ── Defensive overflow fixes (todos os tamanhos) ─────────── */
.hero-title,
.section-title,
.cta-title,
.plan-name {
  word-break: break-word;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* Evita scroll horizontal acidental em qualquer tamanho */
body {
  overflow-x: hidden;
}

/* iOS — inputs de tamanho mínimo 16px pra não dar zoom auto */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px !important; }
}
