/* Keyframes Definitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Fade In */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Slide Animations */
.slide-up {
    animation: slideInUp 0.6s ease forwards;
}

.slide-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Scale Animation */
.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

/* Delay Classes */
.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; }

/* Preloader Animation */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

.preloader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header Scroll Animations */
.main-nav {
    transition: transform 0.3s ease;
}

.main-nav.scroll-down {
    transform: translateY(-100%);
}

.main-nav.scroll-up {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
}

.btn:hover::after {
    width: 100%;
}

/* Image Hover Effects */
.image-hover {
    position: relative;
    overflow: hidden;
}

.image-hover img {
    transition: transform 0.6s ease;
}

.image-hover:hover img {
    transform: scale(1.1);
}