/* Animation Styles for CycleCue Website */

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Intersection Observer Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for multiple elements */
.stagger-animation .fade-in:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation .fade-in:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation .fade-in:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation .fade-in:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation .fade-in:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation .fade-in:nth-child(6) { transition-delay: 0.6s; }

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(233, 30, 99, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Interactive Elements */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
}

.hover-bounce:hover {
    animation: bounce 0.6s ease;
}

/* Button Animations */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Notification Animations */
.notification {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.notification-success {
    border-left: 4px solid var(--success);
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.1), transparent);
}

.notification.notification-error {
    border-left: 4px solid var(--error);
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.1), transparent);
}

.notification.notification-info {
    border-left: 4px solid var(--info);
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.1), transparent);
}

/* FAQ Accordion Animations */
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: var(--spacing-md) 0;
}

.faq-question .faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question .faq-icon {
    transform: rotate(45deg);
}

/* Mobile Menu Animation */
.nav-menu {
    transition: transform 0.3s ease;
}

.nav-toggle span {
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Cookie Consent Animation */
.cookie-consent {
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Progress Bar */
.progress-bar {
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

/* Image Lazy Loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.loaded {
    opacity: 1;
}

/* Scroll Indicators */
.scroll-indicator {
    animation: bounce 2s ease-in-out infinite;
}

/* Gradient Animation */
.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-pulse,
    .animate-bounce,
    .animate-float,
    .scroll-indicator {
        animation: none !important;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .loading-shimmer {
        background: linear-gradient(90deg, #000 25%, #333 50%, #000 75%);
    }
    
    .hover-glow:hover {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    }
}

/* Print Styles */
@media print {
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .slide-up {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .animate-pulse,
    .animate-bounce,
    .animate-spin,
    .animate-float {
        animation: none !important;
    }
}