/* ===== ANIMATIONS CSS ===== */

/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(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 slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

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

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
    opacity: 0;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Animation Delays */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Hover Animations */
.hover-pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

.hover-bounce:hover {
    animation: bounce 1s ease-in-out;
}

.hover-rotate:hover {
    animation: rotate 0.5s ease-in-out;
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-dark-gray);
    border-top: 4px solid var(--color-gold);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        var(--color-dark-gray) 25%,
        var(--color-light-gray) 50%,
        var(--color-dark-gray) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Counter Animation */
.counter-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.counter-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-gold);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--color-gold);
    }
}

/* Floating Elements */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-slow {
    animation: float 8s ease-in-out infinite;
}

.float-animation-fast {
    animation: float 4s ease-in-out infinite;
}

/* Gradient Animation */
.gradient-animation {
    background: linear-gradient(
        45deg,
        var(--color-gold),
        var(--color-beige),
        var(--color-gold),
        var(--color-beige)
    );
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Stagger Animation */
.stagger-animation {
    animation-delay: calc(var(--stagger-delay, 0) * 0.1s);
}

/* Entrance Animations for Mobile */
@media screen and (max-width: 768px) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up {
        animation-duration: 0.6s;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up,
    .scale-in,
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .counter-animate {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .float-animation,
    .float-animation-slow,
    .float-animation-fast {
        animation: none;
    }
    
    .gradient-animation {
        animation: none;
        background: var(--color-gold);
    }
}

/* Performance Optimizations */
.animate-gpu {
    transform: translateZ(0);
    will-change: transform;
}

.animate-opacity {
    will-change: opacity;
}

.animate-transform {
    will-change: transform;
}
