﻿/* Animations - wwwroot/css/animations.css */

/* Floating Background Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

    .floating-element:nth-child(1) {
        width: 80px;
        height: 80px;
        top: 10%;
        left: 10%;
        animation-delay: 0s;
    }

    .floating-element:nth-child(2) {
        width: 120px;
        height: 120px;
        top: 60%;
        right: 10%;
        animation-delay: 2s;
    }

    .floating-element:nth-child(3) {
        width: 60px;
        height: 60px;
        bottom: 20%;
        left: 20%;
        animation-delay: 4s;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Button Animations */
.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Hero Reveal Animations */
.hero-reveal-image {
    animation: bounceIn 1s ease;
}

.hero-reveal-text {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animations */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* Hover Animations */
.btn:hover {
    transition: all 0.3s ease;
}

.card:hover {
    transition: all 0.3s ease;
}

/* Fade Transitions */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.fade-out {
    opacity: 1;
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Slide Animations */
.slide-in-left {
    transform: translateX(-100%);
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    to {
        transform: translateX(0);
    }
}

.slide-in-right {
    transform: translateX(100%);
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

.slide-in-up {
    transform: translateY(100%);
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    to {
        transform: translateY(0);
    }
}

.slide-in-down {
    transform: translateY(-100%);
    animation: slideInDown 0.5s ease forwards;
}

@keyframes slideInDown {
    to {
        transform: translateY(0);
    }
}

/* Scale Animations */
.scale-in {
    transform: scale(0);
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.scale-out {
    transform: scale(1);
    animation: scaleOut 0.5s ease forwards;
}

@keyframes scaleOut {
    to {
        transform: scale(0);
    }
}

/* Rotation Animations */
.rotate-in {
    transform: rotate(-180deg);
    animation: rotateIn 0.5s ease forwards;
}

@keyframes rotateIn {
    to {
        transform: rotate(0deg);
    }
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Glow Effects */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--color-primary), 0 0 10px var(--color-primary), 0 0 15px var(--color-primary);
    }

    to {
        box-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary), 0 0 30px var(--color-primary);
    }
}

/* Utility Animation Classes */
.animate-fast {
    animation-duration: 0.3s !important;
}

.animate-slow {
    animation-duration: 1s !important;
}

.animate-delay-1 {
    animation-delay: 0.1s !important;
}

.animate-delay-2 {
    animation-delay: 0.2s !important;
}

.animate-delay-3 {
    animation-delay: 0.3s !important;
}

.animate-infinite {
    animation-iteration-count: infinite !important;
}

.animate-once {
    animation-iteration-count: 1 !important;
}
