/* ========================================
   AOS ANIMATION FIXES - PREVENT SCROLL JUMPING
   ======================================== */

/* Ensure elements maintain their space before animating */
[data-aos] {
    /* Prevent initial visibility issues */
    pointer-events: auto;
}

/* On mobile devices, override AOS to prevent layout shifts */
@media (max-width: 767px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* Force visibility on mobile */
    [data-aos].aos-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Desktop: Use more subtle animations that don't affect layout */
@media (min-width: 768px) {
    /* Fade animations without transform to prevent jumping */
    [data-aos="fade-up"] {
        opacity: 0;
        transition-property: opacity;
        transform: none !important; /* Remove transform to prevent layout shift */
    }
    
    [data-aos="fade-up"].aos-animate {
        opacity: 1;
    }
    
    [data-aos="fade-left"] {
        opacity: 0;
        transition-property: opacity;
        transform: none !important;
    }
    
    [data-aos="fade-left"].aos-animate {
        opacity: 1;
    }
    
    [data-aos="fade-right"] {
        opacity: 0;
        transition-property: opacity;
        transform: none !important;
    }
    
    [data-aos="fade-right"].aos-animate {
        opacity: 1;
    }
}

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Prevent scroll anchoring issues */
* {
    overflow-anchor: none;
}

/* Ensure sections have stable heights */
section {
    min-height: fit-content;
    will-change: auto; /* Disable will-change to prevent GPU layer issues */
}

/* Fix for iOS Safari scroll issues */
body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Prevent content shift during animations */
.container {
    position: relative;
}