/* Cross-page alignment corrections, November 2026. Loaded after legacy theme rules. */
html[data-page-style] body { max-width:100%; overflow-x:clip; }
html[data-page-style] .site-header {
  position:relative!important; top:0!important; left:auto!important; right:auto!important;
  margin:0 auto!important; transform:none!important; margin-top:0!important;
  height:64px!important; min-height:64px!important;
  padding:0 clamp(18px,3.2vw,54px)!important;
  display:flex!important; align-items:center!important; align-content:center!important;
  box-sizing:border-box!important; width:100%!important; max-width:100%!important;
}
html[data-page-style] .site-header .brand,
html[data-page-style] .site-header .header-right,
html[data-page-style] .site-header .desktop-nav {align-self:center!important; margin-top:0!important; margin-bottom:0!important;}
html[data-page-style] .site-header .desktop-nav .nav-link {height:42px!important; padding-top:0!important; padding-bottom:0!important; line-height:1.25!important;}
html[data-page-style] .site-header .desktop-nav .nav-link.current::after {bottom:1px!important;}
html[data-page-style] footer.footer .section-wrap {
  width:100%!important; max-width:1200px!important; margin-inline:auto!important;
  padding-left:clamp(28px,4.2vw,64px)!important; padding-right:clamp(28px,4.2vw,64px)!important;
  box-sizing:border-box!important;
}
html[data-page-style] footer.footer .footer-layout,
html[data-page-style] footer.footer .footer-bottom {margin-left:0!important; margin-right:0!important;}
/* Reserve text and portrait areas to eliminate collisions. */
html[data-page-style] .doctor-highlight {position:relative!important; overflow:hidden!important; isolation:isolate!important;}
html[data-page-style] .doctor-highlight .doctor-name {
 position:relative!important; z-index:3!important; display:block!important;
 width:51%!important; max-width:51%!important; margin-left:0!important;
 padding-left:clamp(13px,1.8vw,26px)!important; white-space:normal!important;
 overflow-wrap:normal!important; font-size:clamp(14px,1.4vw,20px)!important;
 line-height:1.25!important;
}
html[data-page-style] .doctor-highlight .doctor-credentials {font-size:clamp(10px,1vw,14px)!important; line-height:1.45!important;}
html[data-page-style] .doctor-highlight img {
 position:absolute!important; z-index:2!important; left:auto!important; right:0!important;
 width:49%!important; max-width:49%!important; height:calc(100% + 75px)!important;
 bottom:0!important; object-fit:contain!important; object-position:bottom right!important;
 transform:none!important;
}
@media (max-width:991.98px) {
 html[data-page-style] .site-header {height:60px!important; min-height:60px!important; padding-left:18px!important; padding-right:18px!important;}
 html[data-page-style] .site-header .top-mobile-menu {margin:0!important; position:static!important; align-self:center!important; flex:none!important; height:44px!important;}
 html[data-page-style] .site-header .top-mobile-menu > summary {width:44px!important; min-width:44px!important; height:44px!important; padding:0!important; display:flex!important; align-items:center!important; justify-content:center!important;}
 html[data-page-style] .site-header .top-mobile-menu nav {top:60px!important; height:calc(100dvh - 60px)!important; max-height:calc(100dvh - 60px)!important;}
 html[data-page-style] .doctor-highlight .doctor-name {width:54%!important; max-width:54%!important; padding-left:16px!important; font-size:clamp(14px,2.6vw,19px)!important;}
 html[data-page-style] .doctor-highlight img {width:46%!important; max-width:46%!important; height:calc(100% + 57px)!important;}
}
@media (max-width:800px) {
 html[data-page-style] .site-header {height:58px!important; min-height:58px!important; padding-left:16px!important; padding-right:16px!important;}
 html[data-page-style] .site-header .top-mobile-menu nav {top:58px!important; height:calc(100dvh - 58px)!important; max-height:calc(100dvh - 58px)!important;}
 html[data-page-style] .doctor-highlight {min-height:170px!important; height:170px!important; padding:16px 0!important; display:flex!important; align-items:center!important;}
 html[data-page-style] .doctor-highlight .doctor-name {width:54%!important;max-width:54%!important;padding-left:16px!important;font-size:clamp(15px,3.2vw,19px)!important;}
 html[data-page-style] .doctor-highlight .doctor-credentials {font-size:clamp(10px,2.4vw,13px)!important;}
 html[data-page-style] .doctor-highlight img {width:46%!important;max-width:46%!important;height:calc(100% + 40px)!important;right:0!important;bottom:0!important;}
 html[data-page-style] footer.footer .section-wrap {padding-left:24px!important;padding-right:24px!important;}
 html[data-page-style] .mobile-bottom-bar {width:100%!important;max-width:100%!important;left:0!important;right:0!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;padding-left:max(16px,env(safe-area-inset-left))!important;padding-right:max(16px,env(safe-area-inset-right))!important;gap:6px!important;}
 html[data-page-style] .mobile-bottom-bar .bottom-menu {width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;display:flex!important;align-items:stretch!important;justify-content:center!important;}
 html[data-page-style] .mobile-bottom-bar .bottom-menu > summary {width:100%!important;min-width:0!important;padding:0!important; margin:0!important;}
 html[data-page-style] .mobile-bottom-bar .mobile-action {min-width:0!important;margin:0!important;}
}
@media (max-width:520px) {
 html[data-page-style] .site-header {height:56px!important;min-height:56px!important;padding-left:14px!important;padding-right:14px!important;}
 html[data-page-style] .site-header .header-right {gap:6px!important;align-items:center!important;}
 html[data-page-style] .site-header .top-mobile-menu nav {top:56px!important;height:calc(100dvh - 56px)!important;max-height:calc(100dvh - 56px)!important;}
 html[data-page-style] .doctor-highlight {min-height:160px!important;height:160px!important;}
 html[data-page-style] .doctor-highlight .doctor-name {font-size:clamp(14px,4vw,18px)!important; width:55%!important;max-width:55%!important;padding-left:13px!important;letter-spacing:-.4px!important;}
 html[data-page-style] .doctor-highlight img {width:45%!important;max-width:45%!important;height:calc(100% + 28px)!important;}
 html[data-page-style] footer.footer .section-wrap {padding-left:22px!important;padding-right:22px!important;}
}

/* Final desktop header + doctor portrait corrections */
html[data-page-style] .page-hero {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 310px !important;
}
html[data-page-style] .page-hero .site-header {
  margin-top: 0 !important;
  top: 0 !important;
}
html[data-page-style] .page-hero .page-hero-content {
  padding-top: 82px !important;
  padding-bottom: 70px !important;
}

/* Keep homepage doctor portrait floating above the card without covering the text */
html[data-page-style] .services-band,
html[data-page-style] .services-inner,
html[data-page-style] .doctor-highlight {
  overflow: visible !important;
}
html[data-page-style] .doctor-highlight {
  isolation: isolate !important;
}
html[data-page-style] .doctor-highlight .doctor-name {
  width: 48% !important;
  max-width: 48% !important;
  padding-right: 10px !important;
  z-index: 5 !important;
}
html[data-page-style] .doctor-highlight img {
  width: 50% !important;
  max-width: 50% !important;
  right: 8px !important;
  bottom: -6px !important;
  height: calc(100% + 94px) !important;
  object-position: bottom right !important;
  z-index: 4 !important;
}

@media (max-width: 991.98px) {
  html[data-page-style] .page-hero {
    padding-top: 0 !important;
    min-height: 292px !important;
  }
  html[data-page-style] .page-hero .page-hero-content {
    padding-top: 74px !important;
    padding-bottom: 58px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 52% !important;
    max-width: 52% !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 46% !important;
    max-width: 46% !important;
    right: 2px !important;
    bottom: -4px !important;
    height: calc(100% + 60px) !important;
  }
}

@media (max-width: 800px) {
  html[data-page-style] .page-hero {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 220px !important;
  }
  html[data-page-style] .page-hero .page-hero-content {
    padding-top: 56px !important;
    padding-bottom: 40px !important;
  }
  html[data-page-style] .doctor-highlight {
    min-height: 170px !important;
    height: 170px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 54% !important;
    max-width: 54% !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 44% !important;
    max-width: 44% !important;
    right: 2px !important;
    bottom: 0 !important;
    height: calc(100% + 46px) !important;
  }
}

@media (max-width: 520px) {
  html[data-page-style] .page-hero .page-hero-content {
    padding-top: 50px !important;
    padding-bottom: 34px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 55% !important;
    max-width: 55% !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 43% !important;
    max-width: 43% !important;
    right: -2px !important;
    height: calc(100% + 30px) !important;
  }
}


/* Final homepage doctor card typography + raised portrait */
html[data-page-style] .doctor-highlight {
  align-items: flex-end !important;
}
html[data-page-style] .doctor-highlight .doctor-name {
  white-space: nowrap !important;
  width: 44% !important;
  max-width: 44% !important;
  font-size: clamp(15px, 1.9vw, 20px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.5px !important;
  padding-left: clamp(12px, 1.6vw, 22px) !important;
  padding-bottom: 10px !important;
}
html[data-page-style] .doctor-highlight .doctor-credentials {
  display: block !important;
  white-space: nowrap !important;
  font-size: clamp(10px, 0.95vw, 13px) !important;
  line-height: 1.25 !important;
  letter-spacing: -0.15px !important;
  margin-top: 8px !important;
}
html[data-page-style] .doctor-highlight img {
  width: 48% !important;
  max-width: 48% !important;
  right: 12px !important;
  bottom: -6px !important;
  height: calc(100% + 128px) !important;
  object-position: bottom right !important;
}

@media (max-width: 991.98px) {
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 47% !important;
    max-width: 47% !important;
    font-size: clamp(14px, 2.2vw, 18px) !important;
    padding-bottom: 8px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-credentials {
    font-size: clamp(9px, 1.25vw, 12px) !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 46% !important;
    max-width: 46% !important;
    right: 6px !important;
    height: calc(100% + 94px) !important;
  }
}

@media (max-width: 800px) {
  html[data-page-style] .doctor-highlight {
    align-items: center !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    white-space: normal !important;
    width: 54% !important;
    max-width: 54% !important;
    font-size: clamp(15px, 3.2vw, 19px) !important;
    padding-bottom: 0 !important;
  }
  html[data-page-style] .doctor-highlight .doctor-credentials {
    white-space: normal !important;
    font-size: clamp(10px, 2.3vw, 13px) !important;
    line-height: 1.35 !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 44% !important;
    max-width: 44% !important;
    right: 2px !important;
    height: calc(100% + 46px) !important;
  }
}

/* Larger homepage portrait + wider desktop doctor card */
html[data-page-style] .doctor-highlight {
  width: 470px !important;
  max-width: 470px !important;
  min-width: 470px !important;
  align-items: flex-end !important;
}
html[data-page-style] .doctor-highlight .doctor-name {
  width: 39% !important;
  max-width: 39% !important;
  white-space: nowrap !important;
  font-size: clamp(15px, 1.7vw, 19px) !important;
  line-height: 1.14 !important;
  padding-left: 18px !important;
  padding-bottom: 12px !important;
}
html[data-page-style] .doctor-highlight .doctor-credentials {
  white-space: nowrap !important;
  font-size: clamp(9px, 0.82vw, 12px) !important;
  line-height: 1.2 !important;
  margin-top: 8px !important;
}
html[data-page-style] .doctor-highlight img {
  width: 55% !important;
  max-width: 55% !important;
  right: 8px !important;
  bottom: -6px !important;
  height: calc(100% + 142px) !important;
  object-fit: contain !important;
  object-position: bottom right !important;
}

@media (max-width: 1200px) {
  html[data-page-style] .doctor-highlight {
    width: 430px !important;
    max-width: 430px !important;
    min-width: 430px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 40% !important;
    max-width: 40% !important;
    font-size: clamp(14px, 1.65vw, 18px) !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 54% !important;
    max-width: 54% !important;
    height: calc(100% + 120px) !important;
  }
}

@media (max-width: 991.98px) {
  html[data-page-style] .doctor-highlight {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 42% !important;
    max-width: 42% !important;
    font-size: clamp(13px, 2vw, 17px) !important;
    padding-left: 16px !important;
    padding-bottom: 10px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-credentials {
    font-size: clamp(8.5px, 1.1vw, 11px) !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 52% !important;
    max-width: 52% !important;
    right: 4px !important;
    height: calc(100% + 104px) !important;
  }
}

@media (max-width: 800px) {
  html[data-page-style] .doctor-highlight {
    min-height: 188px !important;
    height: 188px !important;
    align-items: center !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 43% !important;
    max-width: 43% !important;
    white-space: nowrap !important;
    font-size: clamp(14px, 3.1vw, 18px) !important;
    line-height: 1.18 !important;
    padding-left: 14px !important;
    padding-bottom: 0 !important;
  }
  html[data-page-style] .doctor-highlight .doctor-credentials {
    white-space: normal !important;
    font-size: clamp(9px, 2vw, 12px) !important;
    line-height: 1.28 !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 50% !important;
    max-width: 50% !important;
    right: 0 !important;
    bottom: 0 !important;
    height: calc(100% + 64px) !important;
  }
}

@media (max-width: 520px) {
  html[data-page-style] .doctor-highlight {
    min-height: 182px !important;
    height: 182px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-name {
    width: 44% !important;
    max-width: 44% !important;
    font-size: clamp(12px, 3.6vw, 16px) !important;
    padding-left: 13px !important;
  }
  html[data-page-style] .doctor-highlight .doctor-credentials {
    font-size: clamp(8px, 2.5vw, 10.5px) !important;
  }
  html[data-page-style] .doctor-highlight img {
    width: 50% !important;
    max-width: 50% !important;
    right: -2px !important;
    height: calc(100% + 52px) !important;
  }
}

/* November 17: Slightly larger cutout portrait, visibly above the card on mobile */
html[data-page-style] .doctor-highlight,
html[data-page-style] .services-inner,
html[data-page-style] .services-band {overflow:visible!important;}
html[data-page-style] .doctor-highlight img {
  width:60%!important;
  max-width:60%!important;
  height:calc(100% + 175px)!important;
  right:-2px!important;
  bottom:-5px!important;
  object-fit:contain!important;
  object-position:bottom right!important;
}
@media (max-width:1200px) {
  html[data-page-style] .doctor-highlight img {
    width:59%!important;
    max-width:59%!important;
    height:calc(100% + 150px)!important;
  }
}
@media (max-width:991.98px) {
  html[data-page-style] .doctor-highlight img {
    width:58%!important;
    max-width:58%!important;
    height:calc(100% + 130px)!important;
  }
}
@media (max-width:800px) {
  html[data-page-style] .doctor-highlight img {
    width:66%!important;
    max-width:66%!important;
    height:calc(100% + 115px)!important;
    right:-5px!important;
    bottom:5px!important;
  }
}
@media (max-width:520px) {
  html[data-page-style] .doctor-highlight img {
    width:68%!important;
    max-width:68%!important;
    height:calc(100% + 115px)!important;
    right:-7px!important;
    bottom:7px!important;
  }
}

/* Precise alignment: baseline flush on mobile; desktop labels further left/up */
@media (min-width: 992px) {
 html[data-page-style] .doctor-highlight .doctor-name {
   padding-left: 11px !important;
   padding-bottom: 36px !important;
   margin-left: 0 !important;
   transform: translateX(-2px) !important;
 }
}
@media (min-width: 801px) and (max-width: 991.98px) {
 html[data-page-style] .doctor-highlight .doctor-name {
   padding-left: 11px !important; padding-bottom: 30px !important;
 }
}
@media (max-width: 800px) {
 html[data-page-style] .doctor-highlight img {
   bottom: -2px !important;
 }
}

/* Mobile navigation edge alignment, Nov 17. Scoped: no changes to homepage hero or desktop. */
@media (max-width: 800px) {
  /* Sub-page hero padding must not inset its full-width top header. */
  html[data-page-style] body.sub-page > .page-hero {
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html[data-page-style] body.sub-page > .page-hero > .site-header {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }
  /* Restore comfortable hero title spacing without moving the header. */
  html[data-page-style] body.sub-page > .page-hero > .page-hero-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* All pages: the four bottom controls occupy equal, visible screen columns. */
  html[data-page-style] body > nav.mobile-bottom-bar,
  html[data-page-style] body > .mobile-bottom-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset-inline: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 max(10px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(10px, env(safe-area-inset-left, 0px)) !important;
    height: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    column-gap: 3px !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    transform: translate3d(0, 110%, 0) !important;
    border-radius: 12px 12px 0 0 !important;
    z-index: 2147483000 !important;
  }
  html[data-page-style] body > nav.mobile-bottom-bar.is-visible,
  html[data-page-style] body > .mobile-bottom-bar.is-visible {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  html[data-page-style] body > .mobile-bottom-bar > .mobile-action,
  html[data-page-style] body > .mobile-bottom-bar > .bottom-menu {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    grid-column: auto !important;
    position: relative !important;
  }
  html[data-page-style] body > .mobile-bottom-bar > .bottom-menu > summary {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html[data-page-style] body > .mobile-bottom-bar > .bottom-menu > nav {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: min(60dvh, 480px) !important;
  }
}

/* Desktop homepage only: allow the feature cards to finish before the next white section.
   Mobile remains entirely unchanged. */
@media (min-width: 801px) {
  html[data-page-style] body > .hero#home {
    height: 690px !important;
    min-height: 690px !important;
  }
  html[data-page-style] body > .hero#home .services-band {
    bottom: 18px !important;
  }
}
