/* ============================================
   MOBILE FIXES - FUERZA HAMBURGUESA
   ============================================ */

/* FORZAR HAMBURGUESA VISIBLE EN MÓVIL */
.mobile-menu-toggle {
    display: block !important;
    width: 30px !important;
    height: 24px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 1000 !important;
    margin-right: 4px !important;
}

.mobile-menu-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background-color: var(--color-header-text, #333) !important;
    border-radius: 2px !important;
    margin: 5px 0 !important;
    transition: all 0.3s ease !important;
    transform-origin: center !important;
}

/* X cuando está activo */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
    background-color: var(--color-header-text, #333) !important;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
    background-color: var(--color-header-text, #333) !important;
}

/* Ocultar en desktop */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* LUPA VISIBLE */
.search-toggle {
    display: flex !important;
    color: var(--color-header-text, #333) !important;
    font-size: 1.25rem !important;
}

@media (min-width: 768px) {
    .search-toggle {
        display: flex !important;
    }
}

/* X DEL MODAL DE GALERÍA */
#galleryModal .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 2rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10001 !important;
    cursor: pointer !important;
}

#galleryModal .modal-close:hover {
    background: rgba(0, 0, 0, 1) !important;
}

/* Home: reposicionar la foto de fondo de "Nuestros Servicios" en móvil
   (en pantallas angostas el recorte centrado no favorecía a la foto) */
@media (max-width: 767px) {
    .services-section {
        background-position: left center !important;
    }

    /* Blanco sólido en vez de la capa translúcida (se veía gris/lavada en móvil) */
    .services-bg-overlay {
        background: rgba(255, 255, 255, 0.94) !important;
        opacity: 1 !important;
    }

    /* Carrusel de logos de marcas: en móvil se quita la animación (iba lento
       y se notaba el corte al reiniciar el loop) y se muestra fijo en 2x2 */
    .clients-marquee {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .clients-marquee-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: auto;
        animation: none;
    }
    /* Oculta la copia duplicada (se usaba solo para el loop continuo) */
    .clients-marquee-track .client-logo:nth-child(n+5) {
        display: none;
    }
    .client-logo {
        margin: 0;
    }
}

/* Página de Servicios: reducir espacios grandes en móvil
   (!important porque services.css se carga después de este archivo
   y sus reglas sin media query ganarían por orden a igual especificidad) */
@media (max-width: 767px) {
    .services-feature-page {
        padding-top: 0 !important;
    }
    .service-feature-row,
    .service-feature-row.reverse {
        padding: 1.5rem 0 !important;
        gap: 0.5rem !important;
    }
    .service-feature-row:first-of-type {
        padding-top: 0.25rem !important;
    }
    .service-feature-visual {
        margin-bottom: -0.5rem !important;
    }
    .service-feature-icon-circle {
        width: 90px !important;
        height: 90px !important;
    }
    .service-feature-icon-circle i {
        font-size: 2.5rem !important;
    }
}