/* Global AIM blue wave treatment: reuses approved homepage wave asset across interior page hero areas. */
main > section:first-of-type:not(.home-hero) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

main > section:first-of-type:not(.home-hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(169, 213, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 0%, rgba(234, 245, 251, 0.78), transparent 34rem);
  pointer-events: none;
  z-index: 0;
}

main > section:first-of-type:not(.home-hero)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(150px, 22vw, 300px);
  background: url("assets/ui/home-wave-background.png") center bottom / cover no-repeat;
  pointer-events: none;
  z-index: 0;
  opacity: 0.96;
}

main > section:first-of-type:not(.home-hero) > * {
  position: relative;
  z-index: 1;
}

.patients-hero,
.services-hero,
.resources-hero,
.contact-hero,
.health-conditions-hero,
.resource-detail-hero,
.resource-doc-hero,
.service-detail-hero,
.patient-detail-hero,
.insurance-hero,
.booking-widget-hero,
.transfer-page-hero {
  padding-bottom: max(82px, clamp(78px, 10vw, 132px)) !important;
}

main > section.pre-footer-cta:first-of-type::after,
main > section.cta-band:first-of-type::after {
  display: none;
}

@media (max-width: 900px) {
  main > section:first-of-type:not(.home-hero)::after {
    height: 210px;
    background-position: 58% bottom;
  }

  .patients-hero,
  .services-hero,
  .resources-hero,
  .contact-hero,
  .health-conditions-hero,
  .resource-detail-hero,
  .resource-doc-hero,
  .service-detail-hero,
  .patient-detail-hero,
  .insurance-hero,
  .booking-widget-hero,
  .transfer-page-hero {
    padding-bottom: 88px !important;
  }
}

@media (max-width: 640px) {
  main > section:first-of-type:not(.home-hero)::after {
    height: 165px;
  }
}
