/* Advanced Animations */

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

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

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

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Rotate Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.8), 0 0 30px rgba(0, 163, 224, 0.6);
    }
}

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

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

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

/* Utility Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

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

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

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

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

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

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

.loading-spinner {
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Stagger Animation Delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* Parallax Effect */
.parallax {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-out;
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

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

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Text Gradient Animation */
.text-gradient-animate {
    background: linear-gradient(90deg, #0066cc, #00a3e0, #0066cc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Card Flip Animation */
@keyframes flipIn {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

.flip-in {
    animation: flipIn 0.6s ease-out;
}

/* Slide In From Bottom */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out;
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 0.5s ease-out;
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #0066cc;
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s 1 normal both;
}

/* Blur In Animation */
@keyframes blurIn {
    from {
        filter: blur(10px);
        opacity: 0;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

.blur-in {
    animation: blurIn 0.8s ease-out;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Fade In Up Stagger */
.fade-in-up-stagger > * {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.fade-in-up-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.fade-in-up-stagger > *:nth-child(6) { animation-delay: 0.6s; }

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


/* Enhanced Background Animations */
@keyframes backgroundZoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.hero-slide {
    animation: backgroundZoom 20s ease-in-out infinite;
}

/* Slide Transition Effects */
@keyframes slideTransition {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Pulse for Chatbot */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 102, 204, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 102, 204, 0.8), 0 0 40px rgba(0, 163, 224, 0.6);
    }
}

.chatbot-toggle {
    animation: glowPulse 3s ease-in-out infinite;
}

/* Card Reveal Animation */
@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(20deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.hq-card {
    animation: cardReveal 0.8s ease-out;
}

/* Text Shine Effect */
@keyframes textShine {
    0% {
        background-position: -500%;
    }
    100% {
        background-position: 500%;
    }
}

.text-shine {
    background: linear-gradient(90deg, #0066cc 0%, #00a3e0 50%, #0066cc 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s linear infinite;
}

/* Bounce In Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

.rotate-in {
    animation: rotateIn 0.8s ease-out;
}

/* Slide and Fade */
@keyframes slideAndFade {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-and-fade {
    animation: slideAndFade 0.8s ease-out;
}

/* Elastic Scale */
@keyframes elasticScale {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.elastic-scale {
    animation: elasticScale 0.8s ease-out;
}

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

.wave {
    animation: wave 2s ease-in-out infinite;
}

/* Gradient Border Animation */
@keyframes gradientBorder {
    0% {
        border-image-source: linear-gradient(0deg, #0066cc, #00a3e0);
    }
    50% {
        border-image-source: linear-gradient(180deg, #0066cc, #00a3e0);
    }
    100% {
        border-image-source: linear-gradient(360deg, #0066cc, #00a3e0);
    }
}

/* Flip Card Animation */
@keyframes flipCard {
    0% {
        transform: perspective(1000px) rotateY(0);
    }
    100% {
        transform: perspective(1000px) rotateY(180deg);
    }
}

.flip-card {
    animation: flipCard 0.6s ease-in-out;
}

/* Neon Glow */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 102, 204, 0.5),
                     0 0 20px rgba(0, 102, 204, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 163, 224, 0.8),
                     0 0 30px rgba(0, 163, 224, 0.6),
                     0 0 40px rgba(0, 163, 224, 0.4);
    }
}

.neon-glow {
    animation: neonGlow 2s ease-in-out infinite;
}

/* Ripple Effect */
@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Swing Animation */
@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
}

.swing {
    animation: swing 1s ease-in-out;
    transform-origin: top center;
}

/* Jello Animation */
@keyframes jello {
    0%, 100% {
        transform: skewX(0deg) skewY(0deg);
    }
    30% {
        transform: skewX(25deg) skewY(25deg);
    }
    40% {
        transform: skewX(-15deg) skewY(-15deg);
    }
    50% {
        transform: skewX(15deg) skewY(15deg);
    }
    65% {
        transform: skewX(-5deg) skewY(-5deg);
    }
    75% {
        transform: skewX(5deg) skewY(5deg);
    }
}

.jello {
    animation: jello 1s ease-in-out;
}

/* Attention Seeker */
@keyframes attentionSeeker {
    0%, 100% {
        transform: scale(1);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
}

.attention-seeker {
    animation: attentionSeeker 1s ease-in-out;
}

/* Smooth Entrance Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children Animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

/* Hover Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.6),
                0 0 40px rgba(0, 163, 224, 0.4);
    transform: translateY(-5px);
}

/* Continuous Rotation */
@keyframes continuousRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.continuous-rotate {
    animation: continuousRotate 20s linear infinite;
}

/* Breathing Animation */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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


/* Product Card Animations */
@keyframes productIconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.product-icon-large {
    animation: productIconFloat 3s ease-in-out infinite;
}

.product-card:hover .product-icon-large {
    animation: none;
}

/* Product Badge Pulse */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
    }
}

.product-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Spec Item Reveal */
@keyframes specReveal {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-card:hover .product-specs li {
    animation: specReveal 0.4s ease-out forwards;
}

.product-card:hover .product-specs li:nth-child(1) { animation-delay: 0.1s; }
.product-card:hover .product-specs li:nth-child(2) { animation-delay: 0.2s; }
.product-card:hover .product-specs li:nth-child(3) { animation-delay: 0.3s; }
.product-card:hover .product-specs li:nth-child(4) { animation-delay: 0.4s; }

/* Power Rating Glow */
@keyframes powerGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 102, 204, 0.6), 0 0 30px rgba(0, 163, 224, 0.4);
    }
}

.product-card:hover .product-power {
    animation: powerGlow 2s ease-in-out infinite;
}


/* Scroll Transition Animations */
@keyframes slideDownFadeOut {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

@keyframes slideUpFadeIn {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Smooth Section Transitions */
.fullwidth-section {
    animation: slideUpFadeIn 0.8s ease-out;
}

.fullwidth-section.slide-out {
    animation: slideDownFadeOut 0.8s ease-out forwards;
}

/* Service Card Stagger Animation */
.service-cards-grid .service-card {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.service-cards-grid .service-card:nth-child(1) {
    animation-delay: 0.2s;
}

.service-cards-grid .service-card:nth-child(2) {
    animation-delay: 0.4s;
}

.service-cards-grid .service-card:nth-child(3) {
    animation-delay: 0.6s;
}

/* Gallery Grid Reveal */
.gallery-grid .gallery-item {
    opacity: 0;
    animation: scaleIn 0.6s ease-out forwards;
}

.gallery-grid .gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-grid .gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-grid .gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-grid .gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-grid .gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-grid .gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Why Items Reveal */
.why-content-centered .why-item {
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
}

.why-content-centered .why-item:nth-child(1) { animation-delay: 0.1s; }
.why-content-centered .why-item:nth-child(2) { animation-delay: 0.2s; }
.why-content-centered .why-item:nth-child(3) { animation-delay: 0.3s; }
.why-content-centered .why-item:nth-child(4) { animation-delay: 0.4s; }

/* Parallax Background Effect */
@keyframes parallaxMove {
    0% {
        background-position: center top;
    }
    100% {
        background-position: center bottom;
    }
}

/* Enhanced Carousel Zoom */
@keyframes carouselZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

/* Section Content Fade In */
.section-content {
    animation: fadeIn 1s ease-out 0.3s both;
}

/* Overlay Pulse */
@keyframes overlayPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.7;
    }
}

.section-overlay {
    animation: overlayPulse 8s ease-in-out infinite;
}
