/* ===== Mobile First Responsive Styles ===== */

/* Smartphones (320px - 480px) */
@media (max-width: 480px) {
  html, body {
    font-size: 14px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
  }

  /* Tipografia */
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  p {
    font-size: 0.95rem !important;
    line-height: 1.5;
  }

  /* Seções */
  section {
    padding: 1.5rem 0 !important;
  }

  .py-12 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .py-20 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Grid ajustado */
  .grid-cols-12 {
    grid-template-columns: 1fr !important;
  }

  .col-span-7,
  .col-span-5,
  .col-span-6 {
    grid-column: span 1 !important;
  }

  /* Botões */
  .btn {
    width: 100%;
    font-size: 0.95rem !important;
    padding: 0.75rem 1rem !important;
  }

  .btn-group,
  .flex.gap-4 {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  a.btn {
    display: inline-block;
    text-align: center;
  }

  /* Cards */
  .card {
    margin-bottom: 1rem;
    padding: 1rem !important;
  }

  /* Images responsivas */
  img {
    max-width: 100%;
    height: auto;
  }

  /* SVG responsive */
  svg {
    max-width: 100%;
    height: auto;
  }

  /* Remover elementos que ficam ruins em mobile */
  .hidden-mobile {
    display: none !important;
  }

  /* Lottie animations ajustadas */
  dotlottie-wc {
    max-width: 100%;
    height: auto !important;
  }

  /* Overflow hidden para horizontais */
  .overflow-x-auto {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.75rem !important;
  }

  section {
    padding: 2rem 0 !important;
  }

  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Grid para tablets */
  .grid-cols-12 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .col-span-7 {
    grid-column: span 2 !important;
  }

  .col-span-5 {
    grid-column: span 2 !important;
  }

  .flex.gap-4 {
    flex-direction: row;
  }

  .btn {
    width: auto;
  }
}

/* Pequenos Desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }

  .hidden-lg {
    display: none !important;
  }
}

/* Otimizações Touch */
@media (hover: none) and (pointer: coarse) {
  /* Aumentar alvo de toque */
  a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Remover hover effects em touch */
  .card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .btn-primary:hover {
    transform: none;
  }

  /* Adicionar active state */
  .btn:active {
    opacity: 0.8;
  }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 1rem 0;
  }

  .py-20 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* Melhorias de tipografia responsiva */
@media (min-width: 1025px) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  p {
    font-size: 1.125rem;
  }
}

/* Imagens e performance */
@media (max-width: 640px) {
  /* Reduzir blur no background */
  .filter.blur-3xl {
    filter: blur(50px) !important;
  }

  /* SVG backgrounds menos complexos */
  svg.opacity-30 {
    opacity: 0.1 !important;
  }

  /* Otimizar gradientes */
  .bg-gradient-to-r,
  .bg-gradient-to-b {
    background-size: 200% 200%;
  }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Input fields mobile friendly */
input,
textarea,
select {
  font-size: 16px !important;
  border-radius: 8px;
}

/* Prevent zoom on input focus iOS */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-size: 16px !important;
}

/* Footer responsive */
footer {
  padding: 2rem 1rem;
}

@media (max-width: 480px) {
  footer {
    padding: 1.5rem 1rem;
  }

  footer nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/* Navbar mobile fixes */
nav {
  padding: 1rem;
}

@media (max-width: 768px) {
  nav {
    padding: 0.75rem;
  }

  nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
  }
}
