/* Custom animations for landing page */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth fade in animation variant */
@keyframes fadeInUpSmooth {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Enhanced service card animations */
@keyframes serviceCardFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes serviceIconBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes serviceBorderGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gradient border animation */
@keyframes rotateBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced dropdown menu animations */
@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dropdownItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading animations */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Initial hidden state for scroll-triggered animations */
.section-header,
.service-card,
.feature-card,
.testimonial-carousel,
.contact-content,
.features-grid,
.trust-indicators-section {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

/* Utility animation classes */
.animate-fadeInUp {
    animation: fadeInUpSmooth 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slideInLeft {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInFromRight 0.6s ease-out forwards;
}

.animate-pulse-custom {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Service card hover utility classes */
.service-card-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-hover:hover {
    animation: serviceCardFloat 3s ease-in-out infinite;
}

.service-icon-animate:hover {
    animation: serviceIconBounce 0.6s ease-in-out;
}

.service-border-glow:hover {
    animation: serviceBorderGlow 2s ease-in-out infinite;
}

.slide-in-content {
    animation: slideInFromLeft 0.4s ease-out forwards;
}

/* Dropdown hover glow effect */
.dropdown-glow {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
}

.dropdown-glow:hover {
    box-shadow: 0 25px 50px rgba(245, 158, 11, 0.25);
}

/* Staggered animation for dropdown items */
.dropdown-item-1 { animation-delay: 0.1s; }
.dropdown-item-2 { animation-delay: 0.15s; }
.dropdown-item-3 { animation-delay: 0.2s; }
.dropdown-item-4 { animation-delay: 0.25s; }
.dropdown-item-5 { animation-delay: 0.3s; }
.dropdown-item-6 { animation-delay: 0.35s; }

/* Enhanced hover states for dropdown */
.dropdown-hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-hover-scale:hover {
    transform: translateX(8px) scale(1.02);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

/* Backdrop blur effect */
.dropdown-backdrop {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Glass morphism effects */
.glass-morphism {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.125);
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(45deg, #f59e0b, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-animate:hover::before {
    width: 200px;
    height: 200px;
}

/* Enhanced transition for all interactive elements */
* {
    transition-property: color, background-color, border-color, transform, box-shadow, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Remove transitions from transform property to prevent conflicts */
button, a, .card, .btn {
    transition-property: color, background-color, border-color, box-shadow, opacity;
}

/* Professional gradients (following guidelines) */
.bg-gradient-professional {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.bg-gradient-bee {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.bg-gradient-trust {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

/* Button hover states */
.btn-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Responsive animation adjustments */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile animation optimizations */
@media (max-width: 768px) {
    /* Ensure elements stay hidden until animated on mobile */
    .section-header:not(.animate-fadeInUp),
    .service-card:not(.animate-fadeInUp),
    .feature-card:not(.animate-fadeInUp),
    .testimonial-carousel:not(.animate-fadeInUp),
    .contact-content:not(.animate-fadeInUp),
    .features-grid:not(.animate-fadeInUp),
    .trust-indicators-section:not(.animate-fadeInUp) {
        opacity: 0;
        transform: translateY(30px);
        visibility: visible; /* Ensure element takes space but is invisible */
    }
    
    /* Smoother and faster animation on mobile when scrolling */
    .animate-fadeInUp {
        animation: fadeInUpSmooth 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    .service-card:hover {
        transform: translateY(-0.5rem) scale(1.02);
    }
    
    .feature-card:hover {
        transform: translateY(-0.125rem);
    }
    
    .animate-slideInLeft,
    .animate-slideInRight {
        animation-duration: 0.4s;
    }
}