/* Mobile Animation Speed Optimizations */

/* Faster animations for mobile devices */
@media (max-width: 767px) {

    /* Override WOW.js animation durations for mobile */
    .wow {
        animation-duration: 0.4s !important;
        -webkit-animation-duration: 0.4s !important;
    }

    /* Reduce animation delays for mobile */
    .wow[data-wow-delay] {
        animation-delay: 0.1s !important;
        -webkit-animation-delay: 0.1s !important;
    }

    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        scroll-behavior: smooth;
    }

    /* Prevent layout shifts during animations */
    .animated {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        perspective: 1000px;
        -webkit-perspective: 1000px;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }

    /* Faster fade animations */
    .fadeIn,
    .fadeInUp,
    .fadeInDown,
    .fadeInLeft,
    .fadeInRight {
        animation-duration: 0.4s !important;
        -webkit-animation-duration: 0.4s !important;
    }

    /* Prevent content jumping */
    .wow.fadeInUp,
    .wow.fadeInDown,
    .wow.fadeInLeft,
    .wow.fadeInRight {
        will-change: transform, opacity;
    }

    /* Smooth transitions for all animated elements */
    .animated,
    .wow {
        transition: transform 0.4s ease-out, opacity 0.4s ease-out;
        -webkit-transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    }
}

/* Tablet devices - slightly faster than desktop but slower than mobile */
@media (min-width: 768px) and (max-width: 991px) {
    .wow {
        animation-duration: 0.6s !important;
        -webkit-animation-duration: 0.6s !important;
    }

    .wow[data-wow-delay] {
        animation-delay: 0.15s !important;
        -webkit-animation-delay: 0.15s !important;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        scroll-behavior: smooth;
    }

    .animated {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Prevent scroll jump on animation completion */
@media (max-width: 991px) {

    /* Ensure containers don't change height when animations complete */
    .infetech-clients-area,
    .infetech-information-area,
    .infetech-offer-area,
    .orbital-innovation-area,
    .infetech-project-offer-area-2,
    .infetech-project-slider-area-2,
    section {
        position: relative;
        overflow: hidden;
    }

    /* Prevent margin collapse that causes layout shift */
    .animated,
    .wow {
        margin-top: 0 !important;
        padding-top: inherit;
    }

    /* Reduce offset for mobile so animations trigger sooner */
    .wow {
        visibility: hidden;
    }

    .wow.animated {
        visibility: visible;
    }
}

/* Additional performance optimizations for mobile */
@media (max-width: 767px) {

    /* Hardware acceleration for smoother animations */
    .animated,
    .wow {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Smooth scrolling container */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Optimize scroll performance */
    body {
        -webkit-overflow-scrolling: touch;
    }
}