/**
 * RESPONSIVE CSS - MOBILE FIRST
 * Optimizado para todos los dispositivos
 * Breakpoints: 640px (mobile), 768px (tablet), 1024px (desktop)
 */

/* ============================================ */
/* MOBILE (0-640px) - BASE STYLES */
/* ============================================ */

/* Ya están en mobile por defecto, aquí solo ajustes específicos */

/* ============================================ */
/* NAVIGATION MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .nav-glass {
    width: calc(100% - 2rem);
    padding: 0.75rem 1rem;
    top: 1rem;
  }
  
  .nav-container {
    justify-content: space-between;
  }
  
  .nav-logo {
    font-size: 1.25rem !important;
  }
  
  .nav-links {
    display: none; /* Ocultar en móvil, mostrar menú hamburguesa si es necesario */
  }
  
  .nav-cta {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
  }
}

/* ============================================ */
/* HERO SECTION MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .hero-section {
    padding: 6rem 1rem 3rem !important;
    min-height: auto !important;
  }
  
  .hero-badge {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }
  
  .hero-title {
    font-size: 2.25rem !important; /* vs 4.5rem desktop */
    line-height: 1.2 !important;
    margin: 1.5rem 0 !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important; /* vs 1.25rem desktop */
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
  }
  
  .hero-cta-group {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: stretch !important;
  }
  
  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100% !important;
    justify-content: center !important;
    font-size: 1rem !important;
    padding: 1rem 1.5rem !important;
  }
  
  .hero-social-proof {
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 2rem !important;
  }
  
  .hero-stats {
    font-size: 0.85rem !important;
  }
  
  .hero-mockup-container {
    margin-top: 3rem !important;
    padding: 0 !important;
  }
  
  .hero-mockup {
    max-width: 100% !important;
    border-radius: var(--radius-lg) !important;
  }
  
  /* Orbes decorativos más pequeños */
  .hero-orb-1,
  .hero-orb-2 {
    width: 200px !important;
    height: 200px !important;
  }
}

/* ============================================ */
/* BENTO GRID MOBILE */
/* ============================================ */

@media (max-width: 768px) {
  .features-section {
    padding: 3rem 1rem !important;
  }
  
  .section-badge {
    font-size: 0.75rem !important;
  }
  
  .section-title {
    font-size: 2rem !important; /* vs 3rem desktop */
    line-height: 1.2 !important;
  }
  
  .section-subtitle {
    font-size: 1rem !important;
  }
  
  .bento-grid {
    grid-template-columns: 1fr !important; /* Una columna en móvil */
    gap: 1rem !important;
    margin-top: 2rem !important;
  }
  
  .bento-card {
    padding: 1.5rem !important;
    min-height: 180px !important;
  }
  
  /* Todos los tamaños de cards iguales en móvil */
  .bento-large,
  .bento-medium,
  .bento-small {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  
  .bento-icon-large {
    font-size: 2.5rem !important;
  }
  
  .bento-icon-medium,
  .bento-icon-small {
    font-size: 2rem !important;
  }
  
  .bento-title-large {
    font-size: 1.5rem !important;
  }
  
  .bento-title-medium,
  .bento-title-small {
    font-size: 1.25rem !important;
  }
  
  .bento-description {
    font-size: 0.9rem !important;
  }
}

/* ============================================ */
/* VIDEO SECTION MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .video-section {
    padding: 3rem 1rem !important;
  }
  
  .video-wrapper {
    border-radius: var(--radius-lg) !important;
    margin: 0 !important;
  }
  
  .custom-video-container {
    border-radius: var(--radius-lg) !important;
  }
}

/* ============================================ */
/* CTA SECTION MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .cta-section {
    padding: 3rem 1.5rem !important;
    text-align: center !important;
  }
  
  .cta-title {
    font-size: 2rem !important;
  }
  
  .cta-subtitle {
    font-size: 1rem !important;
    margin-bottom: 2rem !important;
  }
  
  .cta-button {
    width: 100% !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
  }
}

/* ============================================ */
/* FOOTER MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .footer {
    padding: 2rem 1rem !important;
  }
  
  .footer-content {
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: center !important;
  }
  
  .footer-links {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .footer-link {
    font-size: 0.9rem !important;
  }
  
  .footer-social {
    justify-content: center !important;
  }
  
  .footer-bottom {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
  }
}

/* ============================================ */
/* CHAT AI MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  /* Chat estilos eliminados - se manejan en ai-chat.css */
  /* NO forzar fullscreen en móvil */
  
  .quick-actions {
    flex-direction: column !important;
  }
  
  .quick-action-btn {
    width: 100% !important;
    text-align: center !important;
  }
}

/* ============================================ */
/* COMPARISON MODAL MOBILE */
/* ============================================ */

@media (max-width: 640px) {
  .comparison-modal-content {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  
  .comparison-header {
    padding: 1rem !important;
    flex-wrap: wrap !important;
  }
  
  .comparison-header h2 {
    font-size: 1.25rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
  }
  
  .browser-selector {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }
  
  .browser-btn {
    padding: 0.5rem !important;
    font-size: 1.5rem !important;
  }
  
  .comparison-body {
    padding: 1rem !important;
  }
  
  .comparison-section h3 {
    font-size: 1.1rem !important;
  }
  
  .comparison-list {
    font-size: 0.9rem !important;
  }
  
  .comparison-footer {
    padding: 1rem !important;
  }
  
  .comparison-footer a {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ============================================ */
/* TABLET (641px - 768px) */
/* ============================================ */

@media (min-width: 641px) and (max-width: 768px) {
  .hero-title {
    font-size: 3rem !important;
  }
  
  .bento-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  .bento-large {
    grid-column: span 2 !important;
  }
  
  .hero-cta-group {
    flex-direction: row !important;
  }
}

/* ============================================ */
/* DESKTOP SMALL (769px - 1024px) */
/* ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-section {
    padding: 8rem 2rem 4rem !important;
  }
  
  .hero-title {
    font-size: 3.5rem !important;
  }
  
  .bento-grid {
    gap: 1.5rem !important;
  }
  
  .section-container {
    max-width: 960px !important;
  }
}

/* ============================================ */
/* LANDSCAPE MOBILE */
/* ============================================ */

@media (max-width: 896px) and (orientation: landscape) {
  .hero-section {
    padding: 5rem 2rem 2rem !important;
    min-height: auto !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-mockup-container {
    margin-top: 2rem !important;
  }
  
  /* ai-chat-widget estilos en ai-chat.css */
}

/* ============================================ */
/* UTILITY CLASSES RESPONSIVE */
/* ============================================ */

@media (max-width: 640px) {
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-show {
    display: block !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-text-center {
    text-align: center !important;
  }
  
  .mobile-flex-col {
    flex-direction: column !important;
  }
}

/* ============================================ */
/* ANIMATIONS - REDUCE MOTION */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================ */
/* HIGH DPI SCREENS */
/* ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ajustes para pantallas Retina */
  body {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

/* ============================================ */
/* DARK MODE SUPPORT (Futuro) */
/* ============================================ */

@media (prefers-color-scheme: dark) {
  /* Preparado para dark mode */
  /* Descomentar cuando esté listo:
  :root {
    --color-bg: #1a1a2e;
    --color-text: #ffffff;
    --color-text-light: #a0aec0;
  }
  */
}
