/* Animations and Transitions for Yann Exchange */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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 slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(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 float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.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 var(--primary-color);
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid var(--background-alt);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animated span {
    position: relative;
    z-index: 1;
}

/* Card Animations */
.card-animated {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animated:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

/* Text Animations */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Progress Bar Animation */
@keyframes progress {
    from {
        width: 0%;
    }
}

.progress-animated {
    animation: progress 2s ease-out;
}

/* Notification Animation */
@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideInNotification 0.5s ease-out;
}

/* Rating Stars Animation */
.star-rating .star {
    transition: transform 0.2s ease, color 0.2s ease;
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.star-rating .star.active {
    animation: pulse 0.3s ease;
}

/* Form Input Focus Animation */
.form-input-animated {
    transition: all 0.3s ease;
}

.form-input-animated:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

/* Image Lazy Load Animation */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--background-alt) 25%,
        var(--background-alt-2) 50%,
        var(--background-alt) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    animation: float 2s ease-in-out infinite;
}

/* Navbar Animation */
.navbar-scrolled {
    animation: fadeInDown 0.3s ease-out;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

