/* =====================================================
   ANIMACIONES ELEGANTES - GONZASOFT
   Animaciones suaves y profesionales para experiencia wow
   ===================================================== */

/* === ANIMACIONES DE ENTRADA === */

/* Fade In Up - Elementos aparecen desde abajo */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down - Elementos aparecen desde arriba */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left - Elementos aparecen desde la izquierda */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right - Elementos aparecen desde la derecha */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In - Elementos crecen desde el centro */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Zoom In - Efecto de zoom elegante */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === CLASES DE ANIMACIÓN === */

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-zoom-in {
    animation: zoomIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* === DELAYS PARA ANIMACIONES SECUENCIALES === */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* === EFECTOS DE GLOW ANIMADOS === */

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3),
                    0 0 40px rgba(37, 99, 235, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.5),
                    0 0 60px rgba(37, 99, 235, 0.3),
                    0 0 80px rgba(37, 99, 235, 0.1);
    }
}

@keyframes glowPulseCyan {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3),
                    0 0 40px rgba(6, 182, 212, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.5),
                    0 0 60px rgba(6, 182, 212, 0.3),
                    0 0 80px rgba(6, 182, 212, 0.1);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

.glow-pulse-cyan {
    animation: glowPulseCyan 3s ease-in-out infinite;
}

/* === GRADIENTE ANIMADO === */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* === FLOTACIÓN SUAVE === */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

/* === PULSO SUTIL === */

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-subtle {
    animation: subtlePulse 4s ease-in-out infinite;
}

/* === SHIMMER (BRILLO DESLIZANTE) === */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* === HOVER EFFECTS ELEGANTES === */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
                0 0 40px rgba(37, 99, 235, 0.2);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4),
                0 0 60px rgba(37, 99, 235, 0.2);
    transform: scale(1.02);
}

/* === TEXTO TYPING EFFECT === */

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: currentColor;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

/* === PARTÍCULAS BACKGROUND === */

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-1 { animation: particleFloat 15s linear infinite; }
.particle-2 { animation: particleFloat 18s linear infinite 2s; }
.particle-3 { animation: particleFloat 20s linear infinite 4s; }
.particle-4 { animation: particleFloat 22s linear infinite 6s; }
.particle-5 { animation: particleFloat 16s linear infinite 8s; }

/* === LÍNEAS TECH ANIMADAS === */

@keyframes techLineMove {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.tech-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(37, 99, 235, 0.5),
        transparent
    );
    animation: techLineMove 8s linear infinite;
}

/* === TOOLTIP ELEGANTE === */

.elegant-tooltip {
    position: relative;
    cursor: pointer;
}

.elegant-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: linear-gradient(135deg, #2563EB 0%, #0891B2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.elegant-tooltip::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2563EB;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.elegant-tooltip:hover::before,
.elegant-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* === PERFORMANCE OPTIMIZATION === */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
