/* AbogadoAI Mobile Fix — Inyectado en /usr/share/nginx/html/assets/mobile-fix.css */
/* Soluciona: menú hamburguesa, enlaces, touch events en móvil */

/* =========================================
   MOBILE MENU — Refuerzo del toggle
   ========================================= */
@media (max-width: 768px) {
  /* Forzar que el botón hamburguesa sea visible y clicable */
  .mobile-menu-btn {
    display: block !important;
    z-index: 1001 !important;
    position: relative !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  /* Asegurar que los links de nav se ocultan por defecto */
  .navbar-links {
    display: none !important;
  }

  /* Cuando el menú está abierto */
  .navbar-links.open {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    padding: 5rem 2rem 2rem !important;
    background: rgba(6, 7, 11, 0.97) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    z-index: 1000 !important;
    gap: 1.5rem !important;
    border-left: 1px solid rgba(212, 175, 55, 0.15) !important;
    animation: slideInRight 0.3s ease-out !important;
    overflow-y: auto !important;
  }

  /* Los enlaces DENTRO del menú abierto deben ser clicables */
  .navbar-links.open a {
    display: block !important;
    padding: 0.75rem 0 !important;
    font-size: 1.1rem !important;
    color: #f0f0f0 !important;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3) !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    min-height: 44px !important;  /* Zona de toque mínima recomendada */
    line-height: 44px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }

  .navbar-links.open a:active,
  .navbar-links.open a:hover {
    color: #d4af37 !important;
  }

  /* Overlay oscuro detrás del menú */
  .mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 999 !important;
    display: block !important;
  }

  /* =========================================
     BOTONES CTA — Zona táctil mínima 44px
     ========================================= */
  .btn, button, a.btn, [role="button"] {
    min-height: 44px !important;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3) !important;
    touch-action: manipulation !important;
  }

  /* Hero CTA buttons stack vertically */
  .hero-cta {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .hero-cta .btn {
    width: 100% !important;
    max-width: 320px !important;
  }

  /* =========================================
     CARDS — Fully responsive
     ========================================= */
  .agents-grid,
  .pricing-grid,
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Agent cards clicables en mobile */
  .agent-card {
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2) !important;
    touch-action: manipulation !important;
  }

  /* =========================================
     GENERAL MOBILE FIXES
     ========================================= */
  /* Prevenir overflow horizontal */
  body, html, #root {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Navbar padding más compacto */
  .navbar {
    padding: 0.6rem 1rem !important;
  }

  /* Hero más compacto en mobile */
  .hero {
    min-height: 70vh !important;
    padding: 2.5rem 1rem !important;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem) !important;
  }

  .hero p {
    font-size: 1rem !important;
    padding: 0 0.5rem !important;
  }

  /* Sections con menos padding */
  .section {
    padding: 2.5rem 1rem !important;
  }

  .section-title {
    font-size: 1.8rem !important;
  }

  /* Trust section */
  .trust-section {
    gap: 1.5rem !important;
    padding: 2rem 1rem !important;
  }
  
  .trust-value {
    font-size: 1.8rem !important;
  }

  /* Pricing card featured no scale */
  .pricing-card.featured {
    transform: none !important;
  }

  /* Footer más compacto */
  .footer {
    padding: 2rem 1rem !important;
  }
}

/* Animación para el menú desde la derecha */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* =========================================
   EXTRA SMALL (< 480px)
   ========================================= */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem !important;
  }

  .trust-section {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .pricing-card {
    padding: 1.5rem 1rem !important;
  }

  .price {
    font-size: 2.2rem !important;
  }
}
