/* ========================================
   MOBILE-ONLY.CSS V2.06 - REESCRITO
   Solo para móvil (≤768px)
   ======================================== */

@media (max-width: 768px) {

    /* ============================================
       VARIABLE DE ALTURA DEL HEADER
       ============================================ */
    :root {
        --mobile-header-height: 70px;
    }

    /* ============================================
       BASE: PREVENIR OVERFLOW
       ============================================ */

    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    * {
        box-sizing: border-box;
    }

    section {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* ============================================
       HEADER - FIJO Y FUNCIONAL
       ============================================ */

    nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2000 !important;
        height: var(--mobile-header-height) !important;
        padding: 0 1rem !important;
        backdrop-filter: blur(20px) !important;
        background: rgba(2, 6, 23, 0.95) !important;
        border-bottom: 1px solid var(--border) !important;
        transform: translateY(0) !important; /* Siempre visible */
        transition: none !important; /* Sin animaciones en móvil */
        display: flex !important;
        align-items: center !important;
    }

    /* Prevenir que el nav se oculte al hacer scroll */
    nav.hide-on-scroll {
        transform: translateY(0) !important; /* NO ocultar */
    }
    
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }
    
    /* Logo */
    .logo {
        max-width: 140px !important;
        width: 140px !important;
        margin-right: auto !important;
    }
    
    .logo img {
        height: 40px !important;
        width: auto !important;
    }
    
    /* Botón hamburguesa */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        background: none !important;
        border: none !important;
        color: var(--text) !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        z-index: 2001 !important;
        order: 10 !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Líneas del hamburguesa */
    .mobile-menu-btn span {
        display: block !important;
        width: 24px !important;
        height: 2px !important;
        background-color: var(--text) !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }

    /* Estado abierto - X */
    .mobile-menu-btn.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }

    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0 !important;
    }

    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px) !important;
    }
    
    /* Switch de idioma */
    .lang-switch {
        display: flex !important;
        gap: 0.5rem !important;
        z-index: 2001 !important;
        order: 9 !important;
    }
    
    .lang-switch a .flag {
        width: 24px !important;
        height: auto !important;
        aspect-ratio: 4/3 !important;
        border-radius: 3px !important;
        object-fit: cover !important;
    }
    
    /* Nav links - MENÚ MÓVIL COMPLETO */
    .nav-links,
    ul.nav-links {
        display: none !important;
        position: fixed !important;
        top: var(--mobile-header-height, 70px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - var(--mobile-header-height, 70px)) !important;
        max-height: none !important;
        background: rgba(2, 6, 23, 0.98) !important;
        flex-direction: column !important;
        padding: 1rem 2rem 2rem !important;
        z-index: 1999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        transform: none !important;
    }

    .nav-links.mobile-open,
    ul.nav-links.mobile-open {
        display: flex !important;
    }
    
    .nav-links li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-links a {
        display: block !important;
        padding: 1rem 0 !important;
    }
    
    /* Dropdown SIEMPRE visible en móvil - árbol completo */
    .nav-links .dropdown-content {
        position: static !important;
        background: transparent !important;
        border: none !important;
        padding: 0.5rem 0 0.5rem 1rem !important;
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Ocultar flecha del dropdown en móvil */
    .nav-links .dropdown-toggle::after {
        display: none !important;
    }

    /* Enlaces del dropdown con indent */
    .nav-links .dropdown-content a {
        padding: 0.75rem 0 0.75rem 0.5rem !important;
        font-size: 0.95rem !important;
        color: var(--text-muted) !important;
        border-bottom: none !important;
    }

    .nav-links .dropdown-content a:hover {
        color: var(--text) !important;
    }
    
    /* ============================================
       BREADCRUMBS - OCULTAR
       ============================================ */
    
    .breadcrumb,
    .breadcrumbs,
    .breadcrumb-nav,
    .service-nav-container {
        display: none !important;
    }
    
    /* ============================================
       HERO SLIDER Y PAGE HERO
       ============================================ */

    .hero-slider {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin-top: var(--mobile-header-height) !important; /* Espacio para header fijo */
    }

    /* Páginas de servicio - hero con margen para el header */
    /* SOLO page-hero y service-hero, NO section:first-of-type (afectaba al index) */
    .page-hero,
    .service-hero {
        padding-top: calc(var(--mobile-header-height) + 2rem) !important;
    }

    /* Si hay breadcrumb antes del hero, ajustar */
    .service-nav-container + .page-hero,
    .service-nav-container + .service-hero {
        padding-top: 2rem !important;
    }
    
    .slides-container {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .slide {
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100vh !important;
        height: auto !important;
        padding: 2rem 1rem !important; /* SIN margen superior extra */
        overflow: hidden !important;
    }
    
    /* ============================================
       SLIDE 1 - LAYOUT VERTICAL
       ============================================ */
    
    .slide-1 {
        min-height: 120vh !important; /* Altura ajustada */
        padding: 2rem 1rem !important; /* SIN margen superior extra */
    }
    
    /* Content-wrapper vertical */
    .slide-1 .content-wrapper {
        display: flex !important; /* Cambiar de grid a flex */
        flex-direction: column !important; /* Vertical */
        gap: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
    }
    
    /* Hero-main primero (order) */
    .slide-1 .hero-main {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        order: 1 !important; /* Primero */
    }
    
    /* Stats después */
    .hero-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        order: 2 !important; /* Después */
    }
    
    /* ============================================
       TÍTULOS Y TEXTO SLIDE 1
       ============================================ */
    
    .slide-1 h1,
    .slide-1 .hero-main h1 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word !important;
    }
    
    .slide-1 p,
    .slide-1 .hero-description {
        font-size: clamp(0.85rem, 3vw, 1rem) !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
        word-wrap: break-word !important;
    }
    
    /* ============================================
       BOTONES SLIDE 1 - MÁXIMA VISIBILIDAD
       ============================================ */
    
    .hero-main .hero-buttons,
    .slide-1 .hero-buttons,
    div.hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.5rem 0 !important; /* Margen moderado */
        padding: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 100 !important;
        position: relative !important;
    }
    
    .hero-buttons > a,
    .hero-buttons a.btn-secondary,
    .hero-buttons a.btn-outline {
        display: block !important;
        width: 100% !important;
        padding: 1.2rem 2rem !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        text-align: center !important;
        border-radius: 8px !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 100 !important;
        min-height: 52px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .hero-buttons a.btn-secondary {
        background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%) !important;
        color: white !important;
        border: none !important;
    }
    
    .hero-buttons a.btn-outline {
        background: transparent !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
    }
    
    /* ============================================
       STATS - TODOS IGUALES
       ============================================ */
    
    .stat-card {
        width: 100% !important;
        padding: 1.5rem !important;
        background: rgba(2, 6, 23, 0.7) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .stat-number-large {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }
    
    .stat-card.stat-global .global-title,
    .global-title {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }
    
    .stat-text {
        font-size: clamp(0.85rem, 3vw, 1rem) !important;
    }
    
    /* ============================================
       SLIDE 2 - CENTRADO
       ============================================ */
    
    .slide-2 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 4rem 1.5rem !important;
    }
    
    .slide-2 .content-wrapper-center {
        width: 100% !important;
        padding: 0 1rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .slide-2 h1,
    .slide-2 p {
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    .slide-2 .btn-secondary {
        max-width: 280px !important;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    
    footer {
        width: 100% !important;
        overflow-x: hidden;
    }
    
    footer .logo {
        max-width: 140px !important;
        width: 140px !important;
    }
    
    footer .logo img {
        height: 40px !important;
    }
    
    /* Botones footer más pequeños (75%) */
    .footer-cta-button {
        padding: 0.375rem 0.75rem !important; /* 75% de 0.5rem 1rem */
        font-size: 0.5625rem !important; /* 75% de 0.75rem */
        gap: 0.3rem !important;
    }
    
    .footer-cta-button .cta-icon {
        width: 12px !important; /* 75% de 16px */
        height: 12px !important;
    }
    
    .footer-cta-button span {
        font-size: 0.5625rem !important;
    }
    
    /* ============================================
       IMÁGENES Y GRIDS
       ============================================ */
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* ============================================
       TIPOGRAFÍA
       ============================================ */
    
    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    
    p, span, a, li, div {
        word-wrap: break-word !important;
    }
    
}

/* ============================================
   MÓVIL PEQUEÑO (≤480px)
   ============================================ */

@media (max-width: 480px) {
    
    .logo {
        max-width: 120px !important;
    }
    
    .logo img {
        height: 35px !important;
    }
    
    footer .logo {
        max-width: 120px !important;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
}

/* ========================================
   CORRECCIONES V2.07
   ======================================== */

@media (max-width: 768px) {
    
    /* ============================================
       1. BOTÓN "VER NUESTROS SERVICIOS" - COLOR CORRECTO
       ============================================ */
    
    .hero-buttons a.btn-secondary {
        background: var(--gradient-1) !important; /* Usar variable del tema */
        color: white !important;
        border: none !important;
    }
    
    /* Si var(--gradient-1) no funciona, usar gradiente directo */
    .slide-1 .hero-buttons a.btn-secondary,
    .hero-main .hero-buttons a.btn-secondary {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important; /* Cyan del tema */
        color: white !important;
        border: none !important;
    }
    
    /* ============================================
       2. BOTONES SLIDE 1 - MÁS PEQUEÑOS
       ============================================ */
    
    .hero-buttons > a,
    .hero-buttons a.btn-secondary,
    .hero-buttons a.btn-outline {
        padding: 0.9rem 1.5rem !important; /* Reducido de 1.2rem 2rem */
        font-size: 0.9rem !important; /* Reducido de 1rem */
        min-height: 48px !important; /* Reducido de 52px */
    }
    
    /* ============================================
       3. STATS (CAJONES) - MÁS PEQUEÑOS Y COMPLETOS
       ============================================ */
    
    .stat-card {
        padding: 1rem !important; /* Reducido de 1.5rem */
        margin-bottom: 0.75rem !important;
    }
    
    .stat-number-large {
        font-size: clamp(1.5rem, 6vw, 2rem) !important; /* Reducido */
        line-height: 1 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .stat-card.stat-global .global-title,
    .global-title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important; /* Reducido */
        line-height: 1 !important;
        margin: 0 !important;
    }
    
    .global-subtitle {
        font-size: 0.75rem !important; /* Más pequeño */
        margin-bottom: 0.25rem !important;
    }
    
    .stat-text {
        font-size: 0.8rem !important; /* Reducido */
        line-height: 1.3 !important;
    }
    
    /* Asegurar que stats no se corten */
    .hero-stats {
        margin-bottom: 2rem !important;
        padding-bottom: 1rem !important;
    }
    
    .slide-1 {
        padding-bottom: 3rem !important; /* Más espacio abajo */
    }
    
    /* ============================================
       4. SLIDE 2 - MÁS ESPACIO ENTRE TEXTO Y BOTÓN
       ============================================ */
    
    .slide-2 p {
        margin-bottom: 2.5rem !important; /* Aumentado de 2rem */
    }
    
    .slide-2 .btn-secondary {
        margin-top: 1rem !important; /* Espacio adicional arriba */
    }
    
    /* ============================================
       5. FOOTER - BOTONES "SOMOS" MÁS PEQUEÑOS
       ============================================ */
    
    /* Los botones del footer con imágenes (Grupo, Formación, Ingeniería) */
    .somos-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    
    .somos-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
    }
    
    .somos-btn img {
        max-width: 100px !important; /* Reducido significativamente */
        height: auto !important;
        max-height: 30px !important; /* Altura máxima */
        object-fit: contain !important;
    }
    
    .somos-btn:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* NO tocar los botones de email/teléfono */
    .footer-cta-button {
        /* Sin cambios - dejar como estaban */
    }
    
    /* ============================================
       6. MENÚ MÓVIL - ASEGURAR FUNCIONAMIENTO
       ============================================ */
    
    /* Nav siempre visible y fijo */
    nav {
        position: fixed !important;
        top: 0 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }
    
    /* Prevenir hide-on-scroll */
    nav.hide-on-scroll {
        transform: translateY(0) !important;
        top: 0 !important;
    }
    
    /* Nav-links con position fixed */
    /* Botón hamburguesa siempre visible */
    .mobile-menu-btn {
        position: relative !important;
        z-index: 2001 !important;
        pointer-events: all !important;
        cursor: pointer !important;
    }
    
}

/* ========================================
   CORRECCIONES V2.08
   ======================================== */

@media (max-width: 768px) {
    
    /* ============================================
       1. SLIDE 1 - REDUCIR MARGEN SUPERIOR
       ============================================ */
    
    .slide-1 {
        min-height: 120vh !important;
        padding: 1rem 1rem 3rem !important; /* Reducido padding-top de 2rem a 1rem */
    }
    
    /* Hero-main sin margen superior extra */
    .slide-1 .content-wrapper,
    .slide-1 .hero-main {
        margin-top: 0 !important; /* SIN margen superior */
        padding-top: 0 !important;
    }
    
    /* ============================================
       2. MENÚ MÓVIL - NO SUPERPONER HEADER
       ============================================ */
    
    /* Nav con altura específica */
    nav {
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        overflow: visible !important;
    }
    
    /* Nav-links debajo del header (no superpuesto) */
    /* Asegurar que el logo no se superponga */
    .logo {
        z-index: 2001 !important;
        position: relative !important;
    }

    /* Botón hamburguesa y banderas también */
    .mobile-menu-btn,
    .lang-switch {
        z-index: 2001 !important;
        position: relative !important;
    }
    
    /* ============================================
       3. FOOTER - BOTONES EMAIL/DIRECTORIO TAMAÑO ORIGINAL
       ============================================ */
    
    /* Restaurar tamaño original de footer-cta-button */
    .footer-cta-button {
        padding: 0.65rem 1.25rem !important; /* Tamaño ORIGINAL */
        font-size: 0.85rem !important; /* Tamaño ORIGINAL */
        gap: 0.5rem !important; /* Tamaño ORIGINAL */
    }
    
    .footer-cta-button .cta-icon {
        width: 18px !important; /* Tamaño ORIGINAL */
        height: 18px !important; /* Tamaño ORIGINAL */
    }
    
    .footer-cta-button span {
        font-size: 0.85rem !important; /* Tamaño ORIGINAL */
    }
    
    /* Los botones SOMOS siguen pequeños (NO tocar) */
    .somos-btn img {
        max-width: 100px !important;
        max-height: 30px !important;
    }
    
}

/* ========================================
   CORRECCIONES V2.09
   ======================================== */

@media (max-width: 768px) {
    
    /* ============================================
       1. HEADER - ARREGLAR ELEMENTOS CORTADOS
       ============================================ */
    
    /* Nav con altura automática (NO fija) */
    nav {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 0.8rem 1rem !important;
        overflow: visible !important;
    }
    
    /* Nav-container con espacio adecuado */
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0.5rem !important;
        min-height: 50px !important; /* Altura mínima para contenido */
    }
    
    /* Logo sin cortes */
    .logo {
        max-width: 140px !important;
        width: 140px !important;
        margin-right: auto !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .logo img {
        height: 40px !important;
        width: auto !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    /* Banderas sin cortes */
    .lang-switch {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    
    .lang-switch a {
        display: flex !important;
        align-items: center !important;
        padding: 0.25rem !important;
    }
    
    .lang-switch a .flag {
        width: 24px !important;
        height: auto !important;
        aspect-ratio: 4/3 !important;
        display: block !important;
    }
    
    /* Botón hamburguesa sin cortes */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        font-size: 1.8rem !important;
        line-height: 1 !important;
    }
    
    /* ============================================
       2. STATS - NUEVA SECCIÓN FUERA DEL SLIDER
       ============================================ */
    
    /* Nueva sección para stats */
    .hero-stats-section {
        width: 100% !important;
        padding: 2rem 1rem !important;
        background: var(--bg-dark) !important;
        margin: 0 !important;
    }
    
    .hero-stats-section .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Stats en la nueva sección */
    .hero-stats-section .hero-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Stat cards en nueva sección */
    .hero-stats-section .stat-card {
        width: 100% !important;
        padding: 1.5rem !important;
        background: rgba(2, 6, 23, 0.7) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .hero-stats-section .stat-number-large {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-stats-section .global-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }
    
    .hero-stats-section .stat-text {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        opacity: 0.9 !important;
    }
    
    /* ============================================
       3. SLIDE 1 - SIN STATS (MÁS COMPACTO)
       ============================================ */
    
    .slide-1 {
        min-height: 80vh !important; /* Reducido porque no tiene stats */
        padding: 1rem 1rem 2rem !important;
    }
    
    .slide-1 .content-wrapper {
        gap: 1.5rem !important;
    }
    
    /* Hero-main ocupa todo el ancho */
    .slide-1 .hero-main {
        width: 100% !important;
    }
    
    /* Ocultar stats dentro del slide (por si quedan) */
    .slide-1 .hero-stats {
        display: none !important;
    }
    
}


/* ========================================
   HERO-STATS-SECTION - COLORES IGUALES A DESKTOP
   ======================================== */

@media (max-width: 768px) {
    
    /* Stat cards con mismos colores que desktop */
    .hero-stats-section .stat-card {
        background: var(--bg-card) !important; /* rgba(30, 41, 59, 0.5) */
        border: 1px solid var(--border) !important; /* rgba(148, 163, 184, 0.1) */
    }
    
    .hero-stats-section .stat-card:hover {
        transform: translateY(-5px) !important;
        border-color: rgba(20, 184, 166, 0.3) !important;
        box-shadow: 0 10px 30px rgba(20, 184, 166, 0.1) !important;
    }
    
    .hero-stats-section .stat-number-large {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        color: var(--accent-light) !important;
    }
    
    .hero-stats-section .global-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        color: var(--accent-light) !important;
    }
    
    /* ============================================
       BOTÓN FLOTANTE MÓVIL CTA
       Solo para páginas de servicios
       ============================================ */
    
    .mobile-cta-float {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 100px; /* Arriba del botón de WhatsApp */
        right: 20px;
        background: var(--accent);
        color: white;
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    /* Ocultar texto del botón, solo icono */
    .mobile-cta-float span {
        display: none !important;
    }

    .mobile-cta-float svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .mobile-cta-float:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    /* WhatsApp flotante ajustado en móvil */
    .whatsapp-float {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        z-index: 998 !important;
    }
    
    /* Ocultar el botón del nav en móvil para páginas de servicios */
    .nav-expert-btn {
        display: none !important;
    }

}

/* ========================================
   TABLET BREAKPOINT (769px - 1024px)
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {

    /* ============================================
       NAVEGACIÓN TABLET
       ============================================ */

    nav {
        padding: 0.8rem 1.5rem !important;
    }

    .nav-container {
        gap: 0.75rem !important;
    }

    .nav-links {
        gap: 0.25rem !important;
    }

    .nav-links > li > a {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }

    .nav-links .dropdown-content a {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
    }

    .logo img {
        height: 38px !important;
    }

    .btn-primary.nav-expert-btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
    }

    /* ============================================
       HERO Y SLIDES
       ============================================ */

    .slide h1,
    .hero-main h1 {
        font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
    }

    .slide p,
    .hero-description {
        font-size: clamp(0.9rem, 2vw, 1rem) !important;
    }

    .page-hero h1 {
        font-size: 2rem !important;
    }

    .page-hero p {
        font-size: 1rem !important;
    }

    /* ============================================
       GRIDS - 2 COLUMNAS MÁXIMO
       ============================================ */

    .services-grid,
    .features-grid,
    .why-grid,
    .value-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    .help-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    .pros-cons-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    /* ============================================
       SERVICE CARDS - TAMAÑO INTERMEDIO
       ============================================ */

    .service-card,
    .feature-card {
        padding: 1.25rem !important;
    }

    .service-card h3 {
        font-size: 1.1rem !important;
    }

    .service-card p {
        font-size: 0.9rem !important;
    }

    .service-icon {
        font-size: 2.25rem !important;
    }

    /* ============================================
       HELP CARDS
       ============================================ */

    .help-card {
        padding: 1.25rem !important;
    }

    .help-card h4 {
        font-size: 1rem !important;
    }

    .help-card p,
    .help-card li {
        font-size: 0.85rem !important;
    }

    .help-number {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
    }

    /* ============================================
       CTA CARDS
       ============================================ */

    .cta-card {
        padding: 2rem !important;
    }

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

    .cta-card p {
        font-size: 0.95rem !important;
    }

    /* ============================================
       CARRUSEL - MOSTRAR TODOS EN TABLET
       ============================================ */

    .carousel-btn {
        display: none !important;
    }

    .services-carousel-wrapper {
        padding: 1.5rem 0 !important;
    }

    .services-carousel-container {
        overflow: visible !important;
    }

    .services-carousel-track {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
        transform: none !important;
    }

    .services-carousel-track .service-card {
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* ============================================
       SECCIÓN "CÓMO FUNCIONA"
       ============================================ */

    .como-funciona-grid {
        gap: 2rem !important;
    }

    .como-funciona-content h2 {
        font-size: 1.5rem !important;
    }

    .como-funciona-content p {
        font-size: 0.95rem !important;
    }

    /* ============================================
       PÁGINA NOSOTROS - SERVICIOS QUE OFRECEMOS
       ============================================ */

    .servicios-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        margin-top: 2rem !important;
    }

    .servicio-category {
        padding: 1.5rem !important;
    }

    .servicio-category h3 {
        font-size: 1.15rem !important;
    }

    .servicio-category ul {
        font-size: 0.95rem !important;
    }

    /* ============================================
       PÁGINA NOSOTROS - GRUPO LOGALI
       ============================================ */

    .grupo-logali {
        padding: 2rem !important;
    }

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

    .grupo-logali p {
        font-size: 0.95rem !important;
    }

    .logo-button {
        padding: 0.875rem 1.25rem !important;
    }

    .logo-button img {
        height: 32px !important;
    }

    .logo-button span {
        font-size: 0.95rem !important;
    }

    /* ============================================
       SECCIONES - PADDING REDUCIDO
       ============================================ */

    section {
        padding: 2.5rem 1.5rem !important;
    }

    .section,
    .section-alt {
        padding: 2.5rem 1.5rem !important;
    }

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

    .section-header p {
        font-size: 0.95rem !important;
    }

    /* ============================================
       PROS/CONS
       ============================================ */

    .pros-section,
    .cons-section {
        padding: 1.5rem !important;
    }

    .pros-section h3,
    .cons-section h3 {
        font-size: 1.15rem !important;
    }

    .pros-section li,
    .cons-section li {
        font-size: 0.9rem !important;
    }

    /* ============================================
       TECH SUMMARY
       ============================================ */

    .tech-intro {
        font-size: 1rem !important;
    }

    .tech-conclusion {
        font-size: 0.95rem !important;
    }

    /* ============================================
       OTHER SERVICES
       ============================================ */

    .other-services {
        padding: 2.5rem 1.5rem !important;
    }

    .other-services-header h3 {
        font-size: 1.5rem !important;
    }

    /* ============================================
       STATS
       ============================================ */

    .stats-grid,
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .stat-card {
        padding: 1.25rem !important;
    }

    .stat-number-large {
        font-size: 2rem !important;
    }

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

    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .footer-column {
        padding: 0 !important;
    }

    .somos-btn img {
        max-width: 120px !important;
        max-height: 35px !important;
    }

    /* ============================================
       POPUP CONTACTO
       ============================================ */

    .contact-popup {
        max-width: 600px !important;
        padding: 2rem !important;
    }

    /* ============================================
       BREADCRUMB
       ============================================ */

    .service-nav-container {
        margin-top: 80px !important;
    }

    .service-nav {
        padding: 0 1.5rem !important;
        gap: 0.5rem !important;
    }

    .nav-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .nav-btn-text {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.75rem !important;
    }

}

/* ========================================
   MÓVILES PEQUEÑOS (320px - 480px)
   ======================================== */

@media (max-width: 480px) {

    /* Títulos más pequeños */
    h1 {
        font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
    }

    h2 {
        font-size: clamp(1.1rem, 5vw, 1.5rem) !important;
    }

    h3 {
        font-size: clamp(1rem, 4vw, 1.25rem) !important;
    }

    /* Padding más compacto */
    section {
        padding: 1.5rem 0.75rem !important;
    }

    /* Botones full width */
    .btn,
    .cta-btn,
    .hero-buttons a,
    button[type="submit"] {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Cards más compactas */
    .service-card,
    .feature-card,
    .why-card {
        padding: 1rem !important;
    }

    /* Footer compacto */
    .footer-grid {
        gap: 1.5rem;
    }

    .footer-col h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Formularios */
    input,
    textarea,
    select {
        font-size: 16px !important; /* Prevenir zoom en iOS */
        padding: 0.75rem !important;
    }

    /* Logo más pequeño */
    .logo img {
        height: 32px !important;
    }
}

/* ========================================
   MÓVILES MUY PEQUEÑOS (< 360px)
   ======================================== */

@media (max-width: 360px) {

    nav {
        padding: 0.5rem 0.75rem !important;
    }

    .logo img {
        height: 28px !important;
    }

    .mobile-menu-btn {
        font-size: 1.5rem !important;
        padding: 0.25rem !important;
    }

    .lang-switch a .flag {
        width: 20px !important;
    }

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

    section {
        padding: 1rem 0.5rem !important;
    }
}

/* ========================================
   PÁGINAS DE CONSULTORAS - MEJORAS MÓVIL
   ======================================== */

@media (max-width: 768px) {

    /* ============================================
       GRIDS DE SERVICIOS - UNA COLUMNA EN MÓVIL
       ============================================ */

    .services-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        grid-template-columns: 1fr !important;
    }

    /* ============================================
       SERVICE CARDS - MÁS COMPACTAS
       ============================================ */

    .service-card {
        padding: 1.25rem !important;
        margin-bottom: 0 !important;
    }

    .service-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .service-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
    }

    .service-card ul {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-top: 0.5rem !important;
    }

    .service-card ul li {
        margin-bottom: 0.25rem !important;
        padding-left: 1rem !important;
    }

    .service-icon {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* ============================================
       HELP CARDS (PROCESO) - MÁS COMPACTAS
       ============================================ */

    .help-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        grid-template-columns: 1fr !important;
    }

    .help-card {
        padding: 1.25rem !important;
    }

    .help-card h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .help-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .help-card ul {
        margin-top: 0.5rem !important;
    }

    .help-card ul li {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.25rem !important;
    }

    .help-number {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* ============================================
       CTA CARDS - AJUSTE MÓVIL
       ============================================ */

    .cta-card {
        padding: 1.5rem !important;
        margin-top: 1rem !important;
    }

    .cta-card h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }

    .cta-card p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    /* ============================================
       SECCIÓN "CÓMO FUNCIONA" - VERTICAL
       ============================================ */

    .como-funciona-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .como-funciona-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .como-funciona-content p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .como-funciona-image {
        order: -1 !important;
        max-height: 200px !important;
        overflow: hidden !important;
    }

    .como-funciona-image img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
    }

    /* ============================================
       VALUE CARDS (POR QUÉ ELEGIRNOS)
       ============================================ */

    .value-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .value-card {
        padding: 1.25rem !important;
    }

    .value-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .value-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* ============================================
       PROS/CONS GRID (VENTAJAS/CONSIDERACIONES)
       ============================================ */

    .pros-cons-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .pros-section,
    .cons-section {
        padding: 1.25rem !important;
    }

    .pros-section h3,
    .cons-section h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }

    .pros-section li,
    .cons-section li {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.75rem !important;
    }

    /* ============================================
       TECH SUMMARY
       ============================================ */

    .tech-summary {
        margin: 1.5rem auto !important;
    }

    .tech-intro {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .tech-conclusion {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }

    /* ============================================
       SECTION HEADERS
       ============================================ */

    .section-header h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .section-header p {
        font-size: 0.9rem !important;
    }

    /* ============================================
       SECCIONES - PADDING REDUCIDO
       ============================================ */

    .section,
    .section-alt {
        padding: 2rem 1rem !important;
    }

    .section-alt .section {
        padding: 2rem 0 !important;
    }

    /* ============================================
       OTHER SERVICES (OTROS SERVICIOS)
       ============================================ */

    .other-services {
        padding: 2rem 1rem !important;
    }

    .other-services-header h3 {
        font-size: 1.25rem !important;
    }

    .other-services-header p {
        font-size: 0.9rem !important;
    }

    .other-services .services-grid {
        padding: 0 !important;
        margin: 1rem 0 !important;
    }

    /* ============================================
       CAROUSEL DE SERVICIOS - MOSTRAR TODOS EN MÓVIL
       ============================================ */

    /* Ocultar botones del carrusel en móvil */
    .carousel-btn,
    .carousel-btn-prev,
    .carousel-btn-next {
        display: none !important;
    }

    .services-carousel-wrapper {
        padding: 1rem 0 !important;
        flex-direction: column !important;
    }

    .services-carousel-container {
        width: 100% !important;
        overflow: visible !important;
    }

    /* Convertir el track en grid vertical */
    .services-carousel-track {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        transform: none !important; /* Anular el translateX del JS */
        width: 100% !important;
    }

    /* Todos los cards al 100% del ancho */
    .services-carousel-track .service-card {
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        flex-shrink: 0 !important;
    }

    /* ============================================
       PÁGINA NOSOTROS - SERVICIOS QUE OFRECEMOS
       ============================================ */

    .servicios-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .servicio-category {
        padding: 1.25rem !important;
    }

    .servicio-category h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .servicio-category ul {
        font-size: 0.9rem !important;
    }

    .servicio-category li {
        margin-bottom: 0.35rem !important;
        line-height: 1.4 !important;
    }

    /* ============================================
       PÁGINA NOSOTROS - BOTONES GRUPO LOGALI
       ============================================ */

    .grupo-logali {
        padding: 1.5rem !important;
        margin: 1.5rem auto !important;
    }

    .grupo-logali h2 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .grupo-logali p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }

    .grupo-logos-buttons {
        gap: 0.75rem !important;
    }

    .logo-button {
        padding: 0.75rem 1rem !important;
        gap: 0.75rem !important;
    }

    .logo-button img {
        height: 28px !important;
        max-width: 100px !important;
    }

    .logo-button span {
        font-size: 0.9rem !important;
    }

    /* Two column container en móvil */
    .two-column-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* ============================================
       POPUP CONTACTO - MEJOR EN MÓVIL
       ============================================ */

    .contact-popup {
        width: 95% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        padding: 1.5rem !important;
        margin: 1rem !important;
    }

    .contact-popup .popup-header h2 {
        font-size: 1.25rem !important;
    }

    .contact-popup .popup-header p {
        font-size: 0.9rem !important;
    }

    .popup-form .form-row {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .popup-form .form-group {
        width: 100% !important;
    }

    .popup-form input,
    .popup-form select,
    .popup-form textarea {
        font-size: 16px !important; /* Previene zoom en iOS */
        padding: 0.75rem !important;
    }

    .popup-form .btn-submit {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
    }

}

