html { overflow-x: hidden; }
body { width: 100%; max-width: 100%; overflow-x: hidden; }
img, video, iframe, canvas, svg { max-width: 100%; }

@media (max-width: 1024px) {
  html, body { width: 100%; min-width: 0 !important; }
  .container, .wrapper, .section, .content, .content-wrapper, .main, .page, .page-container { max-width: 100% !important; box-sizing: border-box; }
  [style*="width: 1024px"], [style*="width:1024px"], [style*="width: 1023px"], [style*="width:1023px"] { max-width: 100% !important; box-sizing: border-box; }
}

@media (max-width: 767px) {
  * { box-sizing: border-box; }
  body { font-size: 16px; }
  h1, h2, h3, h4, h5, h6, p { max-width: 100%; overflow-wrap: anywhere; }
  section, header, footer, nav, main, article, aside { max-width: 100%; }
  .container, .wrapper, .section, .content, .content-wrapper, .main, .page, .page-container { width: 100% !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
  img, video, iframe, canvas { height: auto; }
  table { display: block; max-width: 100%; overflow-x: auto; }
  pre, code { max-width: 100%; overflow-x: auto; }
  input, select, textarea, button { max-width: 100%; }
  [style*="min-width: 1024px"], [style*="min-width:1024px"], [style*="min-width: 640px"], [style*="min-width:640px"] { min-width: 0 !important; }
  [style*="width: 1024px"], [style*="width:1024px"], [style*="width: 1023px"], [style*="width:1023px"], [style*="width: 767px"], [style*="width:767px"] { width: 100% !important; max-width: 100% !important; }
  .row, .grid, .cards, .card-grid, .features, .services-grid, .packages-grid, .doctor-grid { max-width: 100%; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  h1 { line-height: 1.15; }
  h2 { line-height: 1.2; }
  button, a { max-width: 100%; }
}

/* Targeted mobile hero correction: show the complete existing hero artwork first,
   then flow its existing text/content below it. Desktop rules remain untouched. */
@media (max-width: 767px) {
  .hero-image {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding-top: 37.5vw;
    background-size: 100% auto !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
    overflow: visible !important;
  }
  .hero-image > .relative.z-10 {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    padding: 1rem 1rem 1.5rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero-image > .relative.z-10 > div {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    transform: none !important;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-image .hero-glass {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .hero-image img,
  .hero-image video {
    max-width: 100%;
    height: auto;
  }
}
@media (max-width: 430px) {
  .hero-image > .relative.z-10 {
    padding: 0.875rem 0.875rem 1.25rem !important;
  }
  .hero-image .hero-glass {
    padding: 1rem !important;
  }
}
