
/* Loading Animations */
@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 60%; }
    100% { width: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 43, 30, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 43, 30, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 43, 30, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(230, 43, 30, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(230, 43, 30, 0.8);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0deg);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Particle Animations */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

@keyframes particleGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(230, 43, 30, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(230, 43, 30, 0.8);
    }
}

/* Page Transition Animations */
.page-enter {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-exit {
    animation: slideOutLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Form Animation Classes */
.input-focus {
    animation: pulse 0.3s ease;
}

.form-submit {
    animation: bounce 0.6s ease;
}

.error-shake {
    animation: shake 0.5s ease;
}

/* Card Hover Animations */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-hover-tilt {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card-hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Button Animations */
.btn-hover-grow {
    transition: all 0.3s ease;
}

.btn-hover-grow:hover {
    transform: scale(1.05);
}

.btn-hover-slide {
    position: relative;
    overflow: hidden;
}

.btn-hover-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-hover-slide:hover::before {
    left: 100%;
}

/* Text Animations */
.text-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.text-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-red);
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Loading States */
.loading-dots::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Utility Animation Classes */
.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in {
    animation: slideInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

/* Delayed Animations */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .card-hover-tilt:hover {
        transform: none;
    }
    
    .card-hover-lift:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .animate-float {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
