/* ============================================
   FIXES FINALES MÓVIL - PLANIFICA+ v2.0
   Correcciones críticas para mobile
   ============================================ */

/* ============================================
   FIX CRÍTICO: HEADER MÓVIL
   ============================================ */

@media (max-width: 768px) {
    /* Header compacto y organizado */
    .main-header {
        padding: 0.6rem 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .header-content {
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
    }
    
    /* Logo más pequeño */
    .logo {
        flex-shrink: 0 !important;
        order: 1 !important;
    }
    
    .logo img {
        height: 24px !important;
        width: auto !important;
        max-width: 140px !important;
    }
    
    /* Botón Contáctanos más compacto */
    .nav-cta {
        padding: 0.5rem 1rem !important;
        font-size: 0.7rem !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        order: 2 !important;
        flex-shrink: 0 !important;
    }
    
    /* Menú hamburguesa */
    .mobile-menu-toggle {
        display: flex !important;
        order: 3 !important;
        flex-shrink: 0 !important;
        padding: 0.4rem !important;
        margin-left: 0.5rem !important;
    }
    
    .mobile-menu-toggle span {
        width: 22px !important;
        height: 2px !important;
    }
}

@media (max-width: 420px) {
    .header-content {
        padding: 0 0.75rem !important;
    }
    
    .logo img {
        height: 22px !important;
        max-width: 120px !important;
    }
    
    .nav-cta {
        padding: 0.45rem 0.85rem !important;
        font-size: 0.65rem !important;
    }
}

/* ============================================
   FIX CRÍTICO: FOOTER MÓVIL
   ============================================ */

@media (max-width: 768px) {
    .site-footer {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.5rem !important;
        text-align: center !important;
    }
    
    /* Logo del footer */
    .footer-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .footer-logo {
        height: 30px !important;
        width: auto !important;
        max-width: 160px !important;
        margin: 0 auto 1rem !important;
        display: block !important;
    }
    
    .footer-description {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        max-width: 100% !important;
        margin: 0 auto 1.25rem !important;
        text-align: center !important;
    }
    
    /* Redes sociales centradas */
    .footer-social {
        display: flex !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        margin: 0 auto !important;
    }
    
    .footer-social a {
        width: 42px !important;
        height: 42px !important;
    }
    
    /* Links del footer */
    .footer-links {
        text-align: center !important;
    }
    
    .footer-links h4 {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-links ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.6rem !important;
    }
    
    .footer-links ul li {
        margin: 0 !important;
    }
    
    .footer-links ul li a {
        font-size: 0.9rem !important;
        display: inline-block !important;
    }
    
    /* Footer bottom */
    .footer-bottom {
        padding-top: 1.5rem !important;
        margin-top: 2rem !important;
        padding: 1.5rem 1rem 0 !important;
    }
    
    .footer-bottom p {
        font-size: 0.85rem !important;
        text-align: center !important;
    }
}

@media (max-width: 420px) {
    .footer-content {
        padding: 0 1rem !important;
    }
    
    .footer-logo {
        height: 28px !important;
    }
    
    .footer-description {
        font-size: 0.85rem !important;
    }
}

/* ============================================
   FIX: HERO SECTION MÓVIL
   ============================================ */

@media (max-width: 768px) {
    .hero {
        padding: 5rem 0 3rem !important;
        min-height: auto !important;
    }
    
    .hero-content {
        padding: 0 1.5rem !important;
    }
    
    .hero-badge {
        padding: 0.65rem 1.25rem !important;
        font-size: 0.65rem !important;
        letter-spacing: 2px !important;
        margin-bottom: 1.5rem !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .hero-title {
        font-size: clamp(2.2rem, 9vw, 3rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 1.25rem !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.95rem, 4vw, 1.1rem) !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }
    
    .hero-stats {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        margin-bottom: 2rem !important;
    }
    
    .stat-card {
        padding: 1.5rem !important;
    }
    
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    .hero-cta {
        width: 100% !important;
    }
    
    .hero-cta .btn {
        width: 100% !important;
    }
}

@media (max-width: 420px) {
    .hero {
        padding: 4rem 0 2.5rem !important;
    }
    
    .hero-content {
        padding: 0 1rem !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}

/* ============================================
   FIX: SECCIONES GENERALES
   ============================================ */

@media (max-width: 768px) {
    .section {
        padding: 3rem 0 !important;
    }
    
    .container {
        padding: 0 1.5rem !important;
    }
    
    .section-header {
        margin-bottom: 2.5rem !important;
    }
    
    .section-badge {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.7rem !important;
        letter-spacing: 2px !important;
        margin-bottom: 1rem !important;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .section-description {
        font-size: clamp(0.9rem, 3.5vw, 1rem) !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   FIX: SERVICES GRID
   ============================================ */

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-card {
        padding: 2rem 1.5rem !important;
    }
    
    .service-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 1.25rem !important;
    }
    
    .service-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .service-card p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   FIX: ABOUT SECTION
   ============================================ */

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }
    
    .about-stat {
        padding: 1.5rem 1rem !important;
    }
    
    .about-stat-number {
        font-size: 2rem !important;
    }
}

/* ============================================
   FIX: CTA SECTION Y FORMULARIO
   ============================================ */

@media (max-width: 768px) {
    .cta {
        padding: 3.5rem 0 !important;
    }
    
    .cta-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .cta-description {
        font-size: clamp(0.95rem, 4vw, 1.05rem) !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }
    
    .contact-form-inline {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important;
        padding: 0.9rem 1.2rem !important;
    }
    
    .btn-white {
        width: 100% !important;
        padding: 1rem 2rem !important;
        font-size: 0.95rem !important;
    }
}

/* ============================================
   FIX: WHATSAPP BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 56px !important;
    height: 56px !important;
    z-index: 999999 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 420px) {
    .whatsapp-float {
        width: 52px !important;
        height: 52px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
}

/* ============================================
   FIX: OVERFLOW Y CONTENIDO CORTADO
   ============================================ */

@media (max-width: 768px) {
    body,
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .hero,
    .section,
    .container,
    .footer-content {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* ============================================
   FIX: CURSOR OCULTO EN MÓVIL
   ============================================ */

@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none !important;
        opacity: 0 !important;
    }
    
    body,
    a,
    button,
    .btn {
        cursor: auto !important;
    }
}

/* ============================================
   FIX: PERFORMANCE MÓVIL
   ============================================ */

@media (max-width: 768px) {
    /* Desactivar animaciones pesadas */
    .g-fade-up,
    .fade-in,
    [data-fade-up] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Canvas más ligero */
    #heroCanvas,
    #strategy-hero-canvas {
        opacity: 0.4 !important;
    }
}

/* ============================================
   FIX: SAFARI iOS
   ============================================ */

@supports (-webkit-touch-callout: none) {
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important;
    }
    
    .hero {
        min-height: -webkit-fill-available !important;
    }
}

/* ============================================
   ORDEN DE CARGA CORRECTO
   ============================================ */

/*
Este archivo debe cargarse AL FINAL:
<link rel="stylesheet" href="css/responsive-fixes.css">
<link rel="stylesheet" href="css/fixes-completos.css">
<link rel="stylesheet" href="css/fixes-mobile-final.css">
<link rel="stylesheet" href="css/threejs-mobile.css">
*/