/*
Theme Name: Astra Child Theme
Theme URI: https://wpastra.com/
Author: Brainstorm Force
Author URI: https://wpastra.com/about/
Description: Astra Child Theme for profiles.edifyme.io
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/

/* Import parent theme styles */
@import url('../astra/style.css');

/* Fix hero image display on iOS devices */
/* iOS doesn't support background-attachment: fixed properly, causing display issues */
@media only screen and (max-width: 768px) {
    /* Fix for UAGB container hero sections with fixed backgrounds */
    .wp-block-uagb-container[class*="uagb-block-"] {
        background-attachment: scroll !important;
    }
    
    /* Specifically target hero sections with overlay images */
    .wp-block-uagb-container[style*="background-attachment: fixed"] {
        background-attachment: scroll !important;
    }
    
    /* Fix any inline styles that might override */
    .uagb-container__overlay,
    .uagb-container-inner-blocks-wrap::before,
    .uagb-container-inner-blocks-wrap::after {
        background-attachment: scroll !important;
    }
}

/* Additional iOS-specific fixes using -webkit-overflow-scrolling */
@supports (-webkit-overflow-scrolling: touch) {
    .wp-block-uagb-container {
        background-attachment: scroll !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Force hardware acceleration for better performance */
    .wp-block-uagb-container .uagb-container-inner-blocks-wrap {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Specific fix for hero section background overlay */
.uagb-block-a7522434,
[id="home"] {
    position: relative;
}

/* Ensure proper image rendering on mobile */
@media only screen and (max-width: 768px) {
    .uagb-block-a7522434::before,
    .uagb-block-a7522434::after,
    .uagb-block-a7522434 .uagb-container__overlay {
        position: absolute !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }
}

/* Fix for viewport height issues on iOS */
@supports (-webkit-touch-callout: none) {
    .wp-block-uagb-container {
        min-height: -webkit-fill-available;
    }
}

/* Ensure smooth scrolling and proper rendering */
html {
    -webkit-overflow-scrolling: touch;
}

/* Additional performance optimizations for mobile */
@media only screen and (max-width: 768px) {
    .wp-block-uagb-container {
        will-change: transform;
    }
    
    /* Prevent z-index stacking issues */
    .uagb-container-inner-blocks-wrap {
        position: relative;
        z-index: 1;
    }
}