/* =========================================================================
   ESTILOS PARA LANDING PAGES (ANIMACIONES Y ELEMENTOS ESPECIALES)
   ========================================================================= */

/* 1. ANIMACIÓN DE ENTRADA GIRATORIA (3D) */
.giratorio {
    opacity: 0;
    /* Inicio desplazado y rotado para efecto 3D dramático */
    transform: translateY(150px) perspective(1000px) rotateY(-70deg);
    transition: all 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    will-change: transform, opacity;
    transform-origin: center center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Estado final visible */
.giratorio.visible {
    opacity: 1;
    /* IMPORTANTE: Al terminar la animación, quitamos la perspectiva y rotación (3D) 
       y dejamos el elemento plano (2D). Esto permite que el filtro SVG 'Fluid Glass' 
       se renderice correctamente sin ponerse negro. */
    transform: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* 
   GESTIÓN HÍBRIDA DE EFECTOS (ROTACIÓN + CRISTAL)
   1. Durante la animación (estado .giratorio base): Usamos un desenfoque estándar (blur) 
      porque los navegadores no pueden renderizar filtros SVG en movimiento 3D.
   2. Al terminar (estado .giratorio.visible): Recuperamos el filtro SVG premium 
      definido en style.css (ya que el elemento ahora es plano).
*/

/* Estado animando (Base) - Modo Seguro */
.giratorio .glass-surface--svg,
.giratorio .glass-surface__filter {
    backdrop-filter: blur(20px) saturate(100%);
    -webkit-backdrop-filter: blur(20px) saturate(100%);
    background: rgba(255, 255, 255, 0.05);
    transition: backdrop-filter 0.5s ease;
    /* Transición suave al efecto final */
}

/* Estado final (Visible) - Modo Premium (Restaurar) */
.giratorio.visible .glass-surface--svg,
.giratorio.visible .glass-surface__filter {
    /* 'revert' intenta usar el valor original de la clase CSS base (style.css) */
    backdrop-filter: var(--filter-id, url(#glass-filter)) saturate(var(--glass-saturation, 1));
    -webkit-backdrop-filter: var(--filter-id, url(#glass-filter)) saturate(var(--glass-saturation, 1));
    background: rgba(255, 255, 255, 0.05);
    /* Mantener fondo sutil */
}

/* =========================================================================
   2. FLECHAS ESTÁTICAS Y RESPONSIVAS
   ========================================================================= */

/* Contenedor Estático (Ancho completo) */
.arrow-container-static {
    width: 100% !important;
    max-width: none !important;
    height: auto;
    display: block;
    position: relative;
    overflow: visible;
}

/* Contenedor Responsivo (Ajustable con flex) */
.arrow-container-responsive {
    width: 100%;
    height: 150px;
    /* Altura base para área de dibujo */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-left: 10%;
    box-sizing: border-box;
}

/* SVG Responsivo */
.responsive-arrow-svg {
    width: 100% !important;
    height: auto;
    display: block;
    overflow: visible;
}

/* Línea Punteada Base (Guía visual) */
.arrow-line-dashed {
    stroke: white;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-dasharray: 10 20;
    fill: none;
}

/* Máscara de Revelado (Cubre la línea punteada) */
.arrow-mask-path {
    stroke: white;
    stroke-width: 12px;
    /* Más ancho para asegurar cobertura completa */
    fill: none;
    transition: stroke-dashoffset 1.5s ease-out;
}

/* Cabeza de Flecha (Estilo Chevron) */
.arrow-head-responsive {
    fill: none;
    stroke: white;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    /* Oculta hasta el final de la animación */
}

/* Estados de Animación Activa */
.arrow-anim-active .arrow-mask-path {
    will-change: stroke-dashoffset;
}

.arrow-anim-active .arrow-head-responsive {
    opacity: 1;
    transition: opacity 0.5s ease-in 1.2s;
    /* Delay sincronizado */
}

/* =========================================================================
   3. ANIMACIÓN DE ELEMENTOS FLOTANTES (NUBES)
   ========================================================================= */
.nube {
    /* Animación continua suave (8s base) */
    animation: flotar 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    /* Usamos 'translate' para evitar conflictos con transformaciones de Elementor */
    will-change: translate;
}

@keyframes flotar {
    0% {
        translate: 0px 0px;
    }

    20% {
        translate: 3px -5px;
    }

    40% {
        translate: -3px -10px;
    }

    60% {
        translate: -5px -6px;
    }

    80% {
        translate: 2px -3px;
    }

    100% {
        translate: 0px 0px;
    }
}

/* =========================================================================
   4. EFECTO DE GLOW / RESPIRACIÓN EN VIDEO
   ========================================================================= */

/* Wrapper Principal */
.video-glow-wrapper {
    position: relative;
    width: 100%;
    /* Aspect Ratio 16:9 forzado */
    padding-bottom: 56.25%;
    height: 0;
    overflow: visible;
    /* Permitir que el glow salga del contenedor */
    display: block;
}

/* Elemento de Video (Iframe) */
.video-glow-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

/* Overlay de Respiración (Luz Superior) */
.respiracion-overlay {
    position: absolute;
    top: -200px;
    /* Desplazado hacia arriba */
    left: 0;
    width: 100%;
    height: 400px;
    pointer-events: none;
    z-index: 10;

    /* Gradiente complejo para simular haz de luz */
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(59, 80, 234, 0) 25%,
            #3b50ea 44%,
            #3b50ea 56%,
            /* Centro sólido */
            rgba(59, 80, 234, 0) 75%,
            transparent 100%);

    opacity: 0.8;
    animation: respirarTop 4s ease-in-out infinite;
}

@keyframes respirarTop {
    0% {
        opacity: 0.8;
    }

    /* Casi sólido */
    50% {
        opacity: 1;
    }

    /* Totalmente sólido */
    100% {
        opacity: 0.8;
    }

    /* Vuelta a casi sólido */
}

/* =========================================================================
   5. DARK VEIL (FONDO ANIMADO WEBGL)
   ========================================================================= */

/* Contenedor principal */
.fondoanimado {
    position: relative;
    overflow: hidden;
    /* Asegurar que el canvas no se desborde */
    min-height: 600px;
    /* Amplitud fija en lugar de pantalla completa */
    background-color: #000312;
    /* Color de fondo base pedido por el usuario */
    display: flex;
    /* Opcional: para centrar contenido verticalmente si se desea */
    flex-direction: column;
}

/* Canvas del efecto */
.darkveil-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    /* Detrás del contenido */
    pointer-events: none;
}