/* ================================================================
   ARCHIVO RESPONSIVE.CSS COMPLETO (CORREGIDO PARA IPHONE/ANDROID)
   ================================================================ */

/* --- 1. AJUSTES PARA PANTALLAS LAPTOP/TABLET (1100px) --- */
@media (max-width: 1100px) {
    .nav-menu li a { 
        padding: 10px 12px; 
        font-size: 11px; 
    }
    .hero-title-area h1 { 
        font-size: 40px; 
    }
}

/* --- 2. AJUSTES PARA TABLET Y MÓVIL (991px) --- */
@media (max-width: 991px) {
    
    /* Menú Hamburguesa - Forzar visibilidad */
    .menu-toggle { 
        display: flex !important; 
        align-items: center;
        justify-content: center;
        font-size: 30px; 
        cursor: pointer; 
        color: #333; 
        padding: 5px;
    }

    /* Header en móvil: Logo a la izquierda, Hamburguesa a la derecha */
    .header-stack {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center;
        width: 100%;
    }

    .logo-row { 
        margin-bottom: 0 !important; 
    }

    .logo-section img, .logo-row img { 
        max-height: 60px !important; 
        width: auto !important; 
    }

    /* Navegación Desplegable */
    nav#main-nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: #ffffff; 
        z-index: 9999; 
        border-top: 3px solid #8b181b; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }
    
    nav#main-nav.active { 
        display: block !important; 
    }

    .nav-menu { 
        flex-direction: column !important; 
        padding: 0 !important; 
    }

    .nav-menu li { 
        width: 100%; 
        border-bottom: 1px solid #ededed; 
    }

    .nav-menu li a { 
        padding: 18px 25px !important; 
        display: block; 
        text-align: left;
        font-size: 14px;
        white-space: normal !important;
    }

    /* Reajuste de Secciones (Elimina alturas fijas para que no se corten en iPhone) */
    .hero-home, 
    .feature-row, 
    .map-form-section, 
    .hero-unificada, 
    .hero-clean, 
    .section-details { 
        height: auto !important; 
        min-height: auto !important;
        padding: 50px 0 !important; 
        background-attachment: scroll !important; /* Mejora rendimiento en móvil */
    }

    /* Arreglo de Cuadros Flotantes (De Absolute a Relative para iPhone) */
    .info-card-red, 
    .feature-box-left, 
    .feature-box-left-fix, 
    .feature-box-inline, 
    .map-data-box, 
    .glass-form-wrapper { 
        position: relative !important; 
        right: auto !important; 
        left: auto !important; 
        top: auto !important; 
        transform: none !important; 
        margin: 20px auto !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        text-align: center; 
        box-sizing: border-box;
    }

    /* Títulos de secciones */
    .hero-title-area {
        max-width: 100% !important;
        text-align: center;
        margin-bottom: 30px;
    }

    .hero-title-area h1 {
        font-size: 32px !important;
    }

    .page-title-red {
        font-size: 40px !important;
        text-align: center;
    }

    /* Grillas y Layouts en Fila pasan a Columna */
    .reasons-grid, 
    .footer-contact-grid, 
    .footer-grid, 
    .grid-2-cols, 
    .info-blocks-row-layout,
    .row-detail { 
        grid-template-columns: 1fr !important; 
        display: flex !important;
        flex-direction: column !important;
        gap: 25px;
    }

    .row-detail.reverse { 
        flex-direction: column !important; 
    }

    .col-img, .col-text {
        width: 100% !important;
    }

    .img-circle { 
        width: 280px !important; 
        height: 280px !important; 
        margin: 0 auto; 
    }

    /* Footer ajustes */
    .footer-logo {
        text-align: center;
    }
    .footer-logo img {
        margin: 0 auto;
    }
}

/* --- 3. AJUSTES PARA MÓVILES PEQUEÑOS (600px hacia abajo) --- */
@media (max-width: 600px) {
    .top-bar .toolbar-flex { 
        flex-direction: column; 
        gap: 5px; 
    }
    
    .contact-info {
        font-size: 11px;
    }

    .section-blue h2 { 
        font-size: 22px !important; 
    }

    .captcha-container { 
        flex-direction: column; 
        gap: 10px;
    }

    .captcha-input { 
        max-width: 100% !important; 
    }

    .btn-submit {
        width: 100%;
        padding: 15px;
    }

    .info-card-red, .feature-box-left {
        padding: 30px 15px !important;
    }
}