/* ===================================================
   MOBILE OVERFLOW FIX
   Add this to all pages after main stylesheets
   =================================================== */

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Prevent all containers from overflowing */
.nav-container,
.hero-inner,
.section-container,
.footer-container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix images and media */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Constrain all rows and grids */
.services-grid,
.why-grid,
.about-features-grid,
.portfolio-grid,
.facilities-grid {
  max-width: 100%;
  overflow-x: hidden;
}

/* Mobile specific fixes */
@media (max-width: 767px) {
  * {
    max-width: 100vw;
  }
  
  .nav-container {
    padding: 0 16px !important;
  }
  
  .section-container {
    padding: 0 16px !important;
  }
  
  .hero-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Fix any absolute positioned elements */
  .hero-bg,
  .section-bg {
    left: 0;
    right: 0;
    width: 100%;
  }
}
