/* Fade in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    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);
    }
}

/* Header entry animation */
.header {
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero entry animations */
.hero-text h1 {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-text p {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.hero-image {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

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

/* Scroll animations */
.scroll-fade-up,
.scroll-slide-left,
.scroll-slide-right,
.scroll-in,
.scroll-stagger,
.feature,
.work-item,
.review-item,
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-slide-left {
    transform: translateX(-30px);
}

.scroll-slide-right {
    transform: translateX(30px);
}

.scroll-fade-up.animate,
.scroll-slide-left.animate,
.scroll-slide-right.animate,
.scroll-in.animate,
.scroll-stagger.animate,
.feature.animate,
.work-item.animate,
.review-item.animate,
.gallery-item.animate {
    opacity: 1;
    transform: translate(0, 0);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Hover effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* Button animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-1px);
}

/* Image hover effects */
.work-item.animate,
.gallery-item.animate {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item.animate:hover,
.gallery-item.animate:hover {
    transform: translateY(-5px);
}

/* Form focus animations */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
}

/* Navigation animations */
.nav-menu {
    transition: left 0.3s ease;
}

.nav-toggle span {
    transition: all 0.3s ease;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Gallery hero animations */
.gallery-hero h1 {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.gallery-hero p {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* 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;
    }
    
    .header,
    .hero-text h1,
    .hero-text p,
    .hero-buttons,
    .hero-image,
    .gallery-hero h1,
    .gallery-hero p,
    .animate-on-scroll,
    .scroll-fade-up,
    .scroll-slide-left,
    .scroll-slide-right,
    .scroll-in,
    .scroll-stagger,
    .feature,
    .work-item,
    .review-item,
    .gallery-item {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s ease;
}