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: keep the original kidney background image clear,
   then flow all hero copy and the existing statistics panel below it. Desktop is untouched. */
@media (max-width: 767px) {
  .hero-image.renal-hero {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
    background-size: 100% auto !important;
    background-position: top center !important;
    background-repeat: no-repeat !important;
    /* Preserve the original 2048 × 768 hero artwork at its exact mobile aspect ratio. */
    padding-top: 37.5vw !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    background-color: #fff;
  }
  .hero-image.renal-hero::before,
  .hero-image.renal-hero::after {
    display: none;
  }
  .hero-image.renal-hero > div.relative.z-10 {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
    height: auto;
    display: block;
    padding: 1rem 1rem 1.25rem !important;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .hero-image.renal-hero > div.relative.z-10 > div {
    width: 100%;
    max-width: 100%;
    transform: none !important;
    margin: 0;
  }
  .hero-image.renal-hero .hero-glass {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0;
    box-sizing: border-box;
  }
  .hero-image.renal-hero .hero-title {
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1.08;
    overflow-wrap: normal;
  }
  .hero-image.renal-hero .eyebrow {
    max-width: 100%;
    white-space: normal;
    letter-spacing: .08em;
  }
  .hero-image.renal-hero .hero-glass p {
    max-width: 100%;
  }
  .hero-image.renal-hero .hero-glass .flex.flex-wrap {
    gap: .65rem;
  }
  .hero-image.renal-hero .hero-glass .flex.flex-wrap a {
    justify-content: center;
    white-space: normal;
    text-align: center;
    padding: .75rem 1rem;
  }
  .hero-image.renal-hero > div.absolute.bottom-0 {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  .hero-image.renal-hero > div.absolute.bottom-0 > div {
    width: 100%;
    max-width: 100%;
    padding: 1rem !important;
    gap: .85rem;
    box-sizing: border-box;
  }
  .hero-image.renal-hero > div.absolute.bottom-0 > div > div {
    min-width: 0;
    align-items: flex-start;
  }
  .hero-image.renal-hero > div.absolute.bottom-0 > div > div > div:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 360px) {
  .hero-image.renal-hero .hero-title {
    font-size: 1.9rem;
  }
  .hero-image.renal-hero > div.absolute.bottom-0 > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
