/* 
 * Animations stylesheet for domain.com
 * Contains all CSS animations used throughout the site
 */

/* Fade In Animation */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
.animate-slide-up {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animation (from left) */
.animate-slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Animation (from right) */
.animate-slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Testimonial Carousel Animation */
.carousel-track {
    animation: carouselScroll 20s linear infinite;
}

@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-100%);
    }
    33.33% {
        transform: translateX(-100%);
    }
    58.33% {
        transform: translateX(-200%);
    }
    66.66% {
        transform: translateX(-200%);
    }
    91.66% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(0);
    }
}

/* Pause carousel on hover */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

/* Button Hover Glow Effect */
.primary-btn, .accent-btn {
    position: relative;
    overflow: hidden;
}

.primary-btn::after, .accent-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.primary-btn:hover::after, .accent-btn:hover::after {
    opacity: 1;
}

/* Staggered animation for service cards */
.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Pulsing animation for featured pricing plan */
.pricing-card.featured {
    animation: pulseShadow 3s infinite alternate;
}

@keyframes pulseShadow {
    from {
        box-shadow: 0 5px 15px rgba(255, 183, 3, 0.2);
    }
    to {
        box-shadow: 0 5px 30px rgba(255, 183, 3, 0.5);
    }
}

/* Floating label animation for form inputs */
.floating-label input::placeholder {
    color: transparent;
}

/* Animation for form submission success icon */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.check-icon {
    animation: checkmark 0.8s ease-in-out forwards;
}

/* Animation for FAQ accordion */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation for elements coming into viewport */
/* These would normally be applied via JavaScript, but for this project we're using predefined classes */
.come-in {
    transform: translateY(150px);
    animation: come-in 0.8s ease forwards;
}

@keyframes come-in {
    to {
        transform: translateY(0);
    }
}

/* Apply animation delay to elements based on their position */
.come-in:nth-child(odd) {
    animation-duration: 0.6s;
}
.come-in:nth-child(even) {
    animation-duration: 0.8s;
}
