/* ==========================================================================
   CROSS-BROWSER & DEVICE ALIGNMENT NORMALIZATION
   ========================================================================== */

/* 1. Viewport & Scrollbar Normalization */
html {
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape on iOS */
    -ms-text-size-adjust: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow globally */
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 2. Flexbox & Grid Cross-Browser Alignments */
.elementor-section, 
.elementor-container, 
.elementor-column, 
.elementor-widget-wrap {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
}

/* Force horizontal containers to behave */
.elementor-container {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
}

/* Fix vertical centering alignment issues on old Safari & iOS */
.elementor-align-center,
.align-center {
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
}

/* 3. Image & Media Responsive Alignment */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    -ms-interpolation-mode: bicubic; /* IE alignment smoothness */
}

/* 4. iOS / Safari Specific Webkit Fixes */
input, select, textarea {
    -webkit-appearance: none; /* Reset iOS default round inputs */
    appearance: none;
    border-radius: 0;
}

/* Fix iOS 100vh viewport height issue */
@supports (-webkit-touch-callout: none) {
    .min-h-screen, 
    .elementor-section-height-full {
        min-height: -webkit-fill-available;
    }
}

/* 5. Firefox Grid & Flex Fixes */
@-moz-document url-prefix() {
    .elementor-row,
    .elementor-container {
        width: 100%;
    }
}

/* 6. General Alignment Helpers for Edge Cases */
.alignleft {
    float: left;
    margin: 0.5em 1.5em 1.5em 0;
}
.alignright {
    float: right;
    margin: 0.5em 0 1.5em 1.5em;
}
.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
