/* Page Builder Animation Utilities */

/* Base animation states */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(2rem);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-up.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-2rem);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-left.animate-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(2rem);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-right.animate-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-in {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in.animate-visible {
    opacity: 1;
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scale-in.animate-visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animations for grids */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(2rem);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-stagger.animate-visible > *:nth-child(1) {
    transition-delay: 0.1s;
}

.animate-stagger.animate-visible > *:nth-child(2) {
    transition-delay: 0.2s;
}

.animate-stagger.animate-visible > *:nth-child(3) {
    transition-delay: 0.3s;
}

.animate-stagger.animate-visible > *:nth-child(4) {
    transition-delay: 0.4s;
}

.animate-stagger.animate-visible > *:nth-child(5) {
    transition-delay: 0.5s;
}

.animate-stagger.animate-visible > *:nth-child(6) {
    transition-delay: 0.6s;
}

.animate-stagger.animate-visible > *:nth-child(7) {
    transition-delay: 0.7s;
}

.animate-stagger.animate-visible > *:nth-child(8) {
    transition-delay: 0.8s;
}

.animate-stagger.animate-visible > *:nth-child(9) {
    transition-delay: 0.9s;
}

.animate-stagger.animate-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hero specific animations */
.animate-hero-bg {
    opacity: 0;
    transform: scale(1.1);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-hero-bg.animate-visible {
    opacity: 1;
    transform: scale(1);
}

.animate-hero-content {
    opacity: 0;
    transform: translateY(3rem);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.animate-hero-content.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline animations */
.animate-timeline-item {
    opacity: 0;
    transform: translateX(-2rem);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-timeline-item:nth-child(even) {
    transform: translateX(2rem);
}

.animate-timeline-item.animate-visible {
    opacity: 1;
    transform: translateX(0);
}

/* FAQ accordion animations */
.animate-accordion {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Map and interactive elements */
.animate-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-zoom-in.animate-visible {
    opacity: 1;
    transform: scale(1);
}

/* Loading states */
.animate-pulse-subtle {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right {
        transform: translateY(1rem);
    }
    
    .animate-fade-in-left,
    .animate-fade-in-right {
        transform: translateY(1rem);
    }
    
    .animate-hero-content {
        transform: translateY(2rem);
    }
}

/* Utility classes for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-fade-in,
    .animate-scale-in,
    .animate-stagger > *,
    .animate-hero-bg,
    .animate-hero-content,
    .animate-timeline-item,
    .animate-zoom-in {
        transition: none;
        opacity: 1;
        transform: none;
    }
}