/* Animation Styles - Optimized for Performance */
.animate-in {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.6s ease forwards;
    will-change: transform, opacity;
}

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

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

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

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

/* Hover Animations */
.feature-icon {
    transition: transform 0.3s ease;
    will-change: transform;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.option-image img {
    transition: transform 0.5s ease;
    will-change: transform;
}

.option-card:hover .option-image img {
    transform: translateY(-10px);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    will-change: transform;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: transform, opacity;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Optimized Pulse Animation for CTA button */
.btn-large {
    position: relative;
    overflow: hidden;
}

/* Replace pulse animation with a simpler hover effect */
.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Testimonial Slider Animation */
.testimonials-slider {
    animation: slideInFromRight 0.8s ease-out;
    will-change: transform, opacity;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Optimized Floating Animation for Hero Image */
.hero-image img {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Mobile Menu Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Reduce animations on smaller screens for better performance */
@media (prefers-reduced-motion: reduce), (max-width: 768px) {
    .hero-image img,
    .call-forwarding-illustration {
        animation: none;
    }
    
    .animate-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Remove heavy animations */
.page-transition {
    display: none;
}

.cta {
    background-size: initial;
    animation: none;
}

.call-forwarding-illustration {
    transition: transform 0.3s ease;
    will-change: transform;
}

.call-forwarding-illustration:hover {
    transform: scale(1.05);
} 