/* SB-M01–03: keep approved desktop geometry intact. */
.southbury-mobile-toggle {display:none;}
@media (max-width:1100px) {
 .southbury-kest-reference .kest-navigation .is-menu-open {
  padding:72px 20px 28px!important;height:100dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;background:var(--kr-navy)!important;color:white!important;
  /* Core's retained animation transform otherwise scrolls the fixed close button away. */
  animation:none!important;transform:none!important;
 }
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__responsive-close {max-width:640px;width:100%;margin:0 auto;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__responsive-dialog {margin:0;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__responsive-container-close {
  position:fixed;top:16px;right:20px;z-index:3;display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;border:1px solid #ffffff80;border-radius:50%;background:var(--kr-navy);color:white;
 }
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__responsive-container-content {padding:0;align-items:stretch;gap:0;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__container {display:flex;flex-direction:column;align-items:stretch;gap:0;}
 .southbury-kest-reference .kest-navigation .is-menu-open li.wp-block-navigation-item {display:flex;flex-flow:row wrap;align-items:center;width:100%;gap:0;margin:0;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__container > li {border-bottom:1px solid #ffffff30;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation-item__content {flex:1;min-width:0;padding:13px 8px;white-space:normal;text-align:left;font-size:16px;line-height:1.4;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__submenu-icon {display:none!important;}
 .southbury-kest-reference .kest-navigation .is-menu-open .southbury-mobile-toggle {display:flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;padding:0;border:0;background:transparent;color:white;cursor:pointer;}
 .southbury-kest-reference .kest-navigation .is-menu-open .southbury-mobile-toggle[aria-expanded="true"] svg {transform:rotate(180deg);}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__submenu-container {
  display:none!important;position:static!important;visibility:visible!important;opacity:1!important;
  width:100%!important;min-width:0!important;height:auto!important;overflow:visible;
  margin:0 0 8px!important;padding:0 0 0 12px!important;border:0;border-left:1px solid #ffffff45;gap:0;
 }
 .southbury-kest-reference .kest-navigation .is-menu-open .southbury-mobile-expanded > .wp-block-navigation__submenu-container {display:flex!important;flex-direction:column;}
 .southbury-kest-reference .kest-navigation .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {font-size:15px;padding:11px 8px;}
 .southbury-kest-reference .kest-navigation .is-menu-open .southbury-navigation-appointment {margin-top:16px;border:0;}
 .southbury-kest-reference .kest-navigation .is-menu-open .southbury-navigation-appointment > a {flex:none;width:100%;text-align:center;padding:14px 20px;}
 .southbury-kest-reference .kest-navigation .is-menu-open :is(a,button):focus-visible {outline:2px solid white;outline-offset:-2px;}
 .southbury-kest-reference:has(.kest-navigation .is-menu-open) .kest-quick-contact {visibility:hidden;}
 /* Natural flow replaces the old 400/420px height and fixed breadcrumb offsets. */
 .southbury-kest-reference .kest-title-band:not(.kest-title-band--guide) {min-height:0;padding:32px 24px 20px;gap:20px;justify-content:center;}
 .southbury-kest-reference .kest-title-band h1 {font-size:36px;line-height:1.2;}
 .southbury-kest-reference .southbury-breadcrumbs {position:static;inset:auto;max-width:100%;width:auto;margin:0;padding:12px 16px;border-radius:16px;background:white;}
 .southbury-kest-reference .kest-title-band > .southbury-breadcrumbs {margin-top:4px;}
 .southbury-kest-reference .southbury-breadcrumbs ol {justify-content:center;gap:6px 10px;}
 .southbury-kest-reference .southbury-breadcrumbs li {font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
}
@media (max-width:767px) {
 .southbury-kest-reference .kest-title-band:not(.kest-title-band--guide) {padding:28px 20px 18px;gap:18px;}
 .southbury-kest-reference .kest-title-band h1 {font-size:30px;}
 .southbury-kest-reference .kest-title-band .wp-block-button__link {padding:12px 24px;}
 /* Only the known contact-only sidebar; closing copy and primary forms remain. */
 .southbury-kest-reference .kest-sidebar.southbury-mobile-redundant-contact {display:none;}
 .southbury-kest-reference main.southbury-service .kest-content-layout {margin-bottom:32px;}
 /* Reserve real document space for the fixed toolbar and phone safe area. */
 html {scroll-padding-bottom:calc(64px + env(safe-area-inset-bottom));}
 body.southbury-kest-reference {padding-bottom:calc(46px + env(safe-area-inset-bottom));}
 .southbury-kest-reference .kest-quick-contact {padding-bottom:env(safe-area-inset-bottom);background:var(--kr-navy);}
}

/* Treatment-first header: brand/appointment row, then a full-width desktop menu. */
@media (min-width:1101px) {
 .southbury-kest-reference .kest-navigation--treatment {position:relative;flex-wrap:wrap;gap:0;padding-top:16px;padding-bottom:0;}
 .southbury-kest-reference .kest-navigation--treatment > .southbury-brand {margin-bottom:12px;}
 .southbury-kest-reference .kest-navigation--treatment > .wp-block-navigation {flex:0 0 100%;margin-top:12px;border-top:1px solid #ffffff35;}
 .southbury-kest-reference .kest-navigation--treatment .wp-block-navigation__container {gap:8px;align-items:stretch;}
 .southbury-kest-reference .kest-navigation--treatment :is(nav.wp-block-navigation,.wp-block-navigation__container,.wp-block-navigation__responsive-container,.wp-block-navigation__responsive-dialog) {position:static;}
 .southbury-kest-reference .kest-navigation--treatment .wp-block-navigation__container > li:not(.southbury-navigation-appointment) {flex:0 1 auto;}
 .southbury-kest-reference .kest-navigation--treatment .wp-block-navigation__container > li > .wp-block-navigation-item__content {font-size:15px;line-height:1.4;padding:16px 8px;white-space:normal;}
 .southbury-kest-reference .kest-navigation--treatment .southbury-navigation-appointment {position:absolute;top:16px;right:max(20px,calc((100vw - 1350px)/2));}
 .southbury-kest-reference .kest-navigation--treatment .wp-block-navigation__container > .southbury-navigation-appointment > a {padding:12px 20px;white-space:nowrap;}
 .southbury-kest-reference .kest-navigation--treatment .wp-block-navigation__container > li:nth-last-child(-n+4) > .wp-block-navigation__submenu-container {left:auto;right:0;}
}
