/* 
 * Animations for imagetovideoaiporn.love
 * Optimized for performance and SEO
 */

/* Pulse Animation for CTA buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 59, 227, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(92, 59, 227, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(92, 59, 227, 0);
    }
}

/* Arrow Animation */
.arrow {
    animation: arrowMove 2s infinite ease-in-out;
}

@keyframes arrowMove {
    0% {
        transform: translateX(0);
        opacity: 0.5;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animation */
.slide-in-left {
    animation: slideInLeft 0.8s ease-in-out;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-in-out;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animation */
.scale-in {
    animation: scaleIn 0.8s ease-in-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #5C3BE3;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Tech Animation */
.tech-svg {
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 2px rgba(92, 59, 227, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 8px rgba(92, 59, 227, 0.7));
    }
}

/* Staggered Fade In */
.stagger-fade-in > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-in-out forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; }

/* Smooth Page Transitions */
.page-transition {
    animation: pageTransition 0.4s ease-in-out;
}

@keyframes pageTransition {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

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

.hover-glow:hover {
    box-shadow: 0 0 15px rgba(92, 59, 227, 0.5);
}
