/* ===================================================
   iOS Safari Global Optimizations
   =================================================== */

/* 1. Prevent iOS auto-font zoom in landscape mode and smooth text */
html {
   -webkit-text-size-adjust: 100%;
   text-size-adjust: 100%;
}

body {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
   overflow-x: hidden; /* Prevent horizontal wobble on iPhones */
   width: 100%;
}

/* 2. Fix Sticky Header for Notch / Dynamic Island */
#wb_Menu_Navigation {
   position: -webkit-sticky;
   position: sticky;
   top: 0;
   padding-top: env(safe-area-inset-top, 0px); /* Respect iOS status bar & Dynamic Island */
   padding-left: env(safe-area-inset-left, 0px);
   padding-right: env(safe-area-inset-right, 0px);
}

/* 3. Fix Bottom Safe Area on Mobile Footers */
#wb_footer4LayoutGrid {
   padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
}

/* 4. Fix iOS Safari Broken `background-attachment: fixed` */
/* iOS Safari cannot properly render fixed background images and causes massive lag / scaling bugs */
@media (max-width: 768px) {
   #LayoutGrid2 > .col-1 {
      background-attachment: scroll !important; /* Fall back to scroll on iPhone */
      background-position: center center !important;
      background-size: cover !important;
   }
}

/* 5. Prevent Form Elements from Zooming on iOS */
/* iOS zooms the viewport if input text is under 16px. Ensure minimum font sizing and reset native styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
   font-size: 16px !important; /* Keeps Safari from auto-zooming on tap */
   -webkit-appearance: none;
   border-radius: 0;
}

#form12Button {
   -webkit-appearance: none; /* Removes iOS default glossy gradient button */
   appearance: none;
   border-radius: 4px;
   touch-action: manipulation;
}

/* 6. Eliminate 300ms Tap Delay and Gray Flash */
a, button, input {
   -webkit-tap-highlight-color: transparent;
   touch-action: manipulation;
}