/* Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* RGPD CAR */

.textos-legales {
    font-size: 10px;
    line-height: 1.5em;
    opacity: .6;
    margin: 20px 0;
}


/* --- ANIMACIÓN DEL BOTÓN CTA (Línea visible en todos los dispositivos) --- */

/* 1. Definición de la Animación */
@keyframes linea-deslizar {
    0% { transform: translateX(0%); }
    49% { transform: translateX(100%); }
    50% { transform: translateX(100%); }
    51% { transform: translateX(-100%); }
    100% { transform: translateX(0%); }
}

/* 2. Estilos Base: SE APLICAN A TODO (PC, Tablet y Móvil) */
/* Solo excluimos los botones que estén dentro de un Popup (Menú) */
body:not(.elementor-popup-is-visible) .elementor-element .elementor-button {
    position: relative !important;
    overflow: hidden !important;
    transition: none !important;
}

/* 3. Creación de la Línea: VISIBLE SIEMPRE fuera del Popup */
body:not(.elementor-popup-is-visible) .elementor-element .elementor-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: currentColor;
    transform: translateX(0%);
    display: block !important; /* Asegura que se vea en móviles */
    transition: none !important;
}

/* 4. Animación: SOLO PARA PC (Evita problemas en táctiles) */
@media (hover: hover) and (pointer: fine) {
    body:not(.elementor-popup-is-visible) .elementor-element .elementor-button:hover::before {
        animation-name: linea-deslizar;
        animation-duration: 0.9s;
        animation-timing-function: ease-in-out;
        animation-iteration-count: 1;
        animation-fill-mode: forwards;
    }
}

/* 5. Exclusión total y definitiva para el Menú Popup */
.elementor-popup-modal .elementor-button::before,
.elementor-location-popup .elementor-button::before {
    display: none !important;
    content: none !important;
}


/* --- CÓDIGO DE LA PÁGINA "NOSOTROS" (COMPATIBILIDAD CON SCROLL) --- */

/* Estilos Base para las Secciones de Apilamiento */
.sticky-overlap-section {
    z-index: 1;
    will-change: transform;
    -webkit-will-change: transform;
}

/* Resetear Margins/Paddings (Solo el necesario) */
.elementor-section {
    margin: 0 !important;
    padding: 0 !important;
}



/* --- ANIMACIÓN DEL TEXTO CIRCULAR --- */

/* Definición de la Animación (mantener la misma) */
@keyframes rotacionInfinita {
    from {
        transform: rotate(0deg); 
    }
    to {
        transform: rotate(360deg);
    }
}

/* Aplicación de la animación al contenedor del widget */
/* Usamos el nombre de clase que pusiste en Elementor: 'texto-giratorio' */
.texto-giratorio {
    /* **CLAVE:** Necesita ser un elemento de bloque o en línea-bloque para rotar */
    display: inline-block; 
    
    /* Aplicar el punto de origen de la rotación al centro */
    /* El contenedor es el que debe rotar sobre su propio centro */
    transform-origin: center center;
    
    /* Aplicación de la Animación */
    animation-name: rotacionInfinita;
    animation-duration: 40s; /* Ajusta la velocidad */
    animation-iteration-count: infinite; 
    animation-timing-function: linear; 

    /* Compatibilidad */
    -webkit-animation-name: rotacionInfinita;
    -webkit-animation-duration: 40s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;

    will-change: transform; 
}



/* ======================================================= */
/* CORRECCIÓN DE VISIBILIDAD Y STICKY */
/* ======================================================= */

/* Anulamos el 'visibility: hidden' que Elementor aplica a la columna/contenedor sticky */
.elementor-column.sticky-text-wrapper,
.elementor-column.sticky-text-wrapper > div,
.elementor-column.sticky-text-wrapper [data-element_type="widget"] {
    visibility: visible !important;
}

/* El CSS de .changing-title sigue siendo necesario para el fade-in/out */
.changing-title {
    opacity: 1 !important;    
    transition: opacity 0.2s ease-in-out !important;    
    display: block !important;    
    z-index: 15;
}

/* Estilos del Contenedor Sticky (Asegúrate de que existe) */
.sticky-text-wrapper {
    padding: 10vh 0;    
}

.elementor-column.sticky-text-wrapper {
    z-index: 10;
}

