/* ====================================
   AgentApiary Animations
   Scroll-triggered animations and transitions
   ==================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Fade In Up Utility Class */
.fade-in-up {
    opacity: 0.5;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Animation Delays */
.fade-in-up[style*="animation-delay"] {
    animation-fill-mode: both;
}

/* Intersection Observer Animation States */
.fade-in-up.visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered Animation Delays */
.fade-in-up:nth-child(1) {
    animation-delay: 0s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(5) {
    animation-delay: 0.4s;
}

.fade-in-up:nth-child(6) {
    animation-delay: 0.5s;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover:not(.pricing-card) {
    animation: pulse 1s ease-in-out;
}

/* Service Icon Hover Animation */
.service-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(2, 193, 115, 0.3), rgba(2, 193, 115, 0.3));
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
}

/* Process Icon Animation */
.process-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-card:hover .process-icon {
    transform: scale(1.1);
}

.process-card:hover .process-icon i {
    animation: pulse 1s ease-in-out infinite;
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading States */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scroll Effect */
.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    opacity: 0;
    animation: textReveal 0.8s ease-out forwards;
}

/* Icon Spin Animation */
@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.icon-spin {
    animation: iconSpin 2s linear infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Accordion Slide Animation */
.accordion-collapse {
    transition: height 0.35s ease;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 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;
    }
    
    .fade-in-up {
        animation: none;
        opacity: 1;
    }
}
