/* Expansional Balance — pre-launch spacing QA
   Normalizes vertical rhythm and responsive header/footer spacing without altering page copy. */

:root{
  --eb-section-y:96px;
}

/* Header rhythm */
#masthead .header-inner{
  height:88px;
}
#logo{
  margin-right:40px;
}
.header-nav-main{
  gap:26px;
}
.header-nav-main > li.eb-header-social-group{
  margin-left:18px!important;
}
.nav-dropdown{
  padding:8px 0;
}
.nav-dropdown > li > a,
.nav-dropdown > li > a:hover,
.nav-dropdown > li.current-menu-item > a,
.nav-dropdown > li.current_page_item > a,
.nav-dropdown > li.active > a{
  padding:13px 18px!important;
}

/* Global section and type rhythm */
.eb-page-hero{
  padding:72px 0 64px;
}
.eb-page-hero__inner{
  min-height:310px;
}
.eb-page-hero h1{
  margin-bottom:26px;
}
.eb-page-hero .eb-lead{
  margin-bottom:0;
}
.eb-page-hero--book .eb-lead{
  margin-bottom:28px;
}
.eb-section-heading{
  margin-bottom:32px;
}
.eb-section-heading h2{
  margin-bottom:0;
}
.eb-richtext p{
  margin-bottom:14px;
}
.eb-richtext p:last-of-type{
  margin-bottom:0;
}
.eb-richtext p + .eb-text-link{
  display:inline-flex;
  margin-top:18px;
}
.eb-architecture-grid p,
.eb-process p,
.eb-home-service-grid p,
.eb-book-options p,
.eb-contact-grid p,
.eb-service-row p{
  margin-bottom:0;
}

/* Homepage */
.eb-home-hero__copy{
  padding:64px 0;
}
.eb-home-hero h1{
  margin-bottom:28px;
}
.eb-home-hero .eb-lead{
  margin-bottom:0;
}
.eb-home-hero .eb-hero__actions{
  margin-top:30px;
}
.eb-home-intro{
  padding-top:var(--eb-section-y);
}
.eb-home-session .eb-process + .eb-text-link{
  display:inline-flex;
  margin-top:28px;
}
.eb-home-location .eb-lead{
  margin-bottom:26px;
}

/* Grids and cards */
.eb-rolfing-page .eb-section-dark > .eb-container.eb-architecture-grid,
.eb-rehab-page .eb-section-dark > .eb-container.eb-architecture-grid{
  margin-top:0;
}
.eb-service-row__content .eb-text-link{
  display:inline-flex;
  margin-top:16px;
}
.eb-book-options article,
.eb-contact-grid > div{
  display:flex;
  flex-direction:column;
}
.eb-book-options article > .eb-text-link{
  align-self:flex-start;
  margin-top:auto;
}
.eb-contact-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.eb-contact-grid > div{
  min-height:220px;
}
.eb-contact-grid > div > p{
  margin-bottom:20px;
}
.eb-contact-grid > div > .eb-button,
.eb-contact-grid > div > .eb-header-social-links{
  margin-top:auto;
  align-self:flex-start;
}

/* Statement sections */
.eb-statement > .eb-container > p{
  margin-bottom:0;
}
.eb-statement .eb-button{
  margin-top:28px;
}

/* Contact hero and map */
.eb-contact-page .eb-page-hero__inner{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,340px);
  gap:64px;
  min-height:340px;
}
.eb-contact-hero-media{
  aspect-ratio:4/5;
  margin:0;
  max-height:400px;
  overflow:hidden;
}
.eb-contact-hero-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.eb-contact-map{
  padding-top:0;
  padding-bottom:72px;
}

/* CTA rhythm */
.eb-cta-band{
  padding:68px 0;
}

/* Footer rhythm */
.eb-site-footer{
  box-sizing:border-box;
  padding-left:var(--eb-gutter);
  padding-right:var(--eb-gutter);
  padding-bottom:22px;
}
.eb-site-footer > .eb-container{
  box-sizing:border-box;
  width:100%!important;
  max-width:var(--eb-content)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
  transform:none!important;
  left:auto!important;
  right:auto!important;
}
.eb-site-footer__top{
  grid-template-columns:minmax(0,1.2fr) minmax(0,.65fr) minmax(0,.75fr);
  gap:56px;
  padding-top:52px;
  padding-bottom:48px;
}
.eb-site-footer__top > *{
  min-width:0;
}
.eb-site-footer__brand{
  overflow:visible;
}
.eb-site-footer__brand strong{
  margin-bottom:12px;
}
.eb-site-footer__brand p{
  margin-bottom:0;
}
.eb-site-footer__nav{
  gap:12px;
}
.eb-site-footer__actions{
  gap:14px;
}
.eb-site-footer__social,
.eb-site-footer__location{
  margin-top:0!important;
}
.eb-site-footer__bottom{
  padding-top:22px;
}

@media only screen and (max-width:1100px) and (min-width:850px){
  .header-nav-main > li.eb-header-social-group{
    display:none!important;
  }
}

@media only screen and (max-width:1024px){
  :root{
    --eb-section-y:72px;
  }
  #masthead .header-inner{
    height:80px;
  }
  #logo{
    margin-right:24px;
  }
  .header-nav-main{
    gap:16px;
  }
  .eb-page-hero{
    padding:58px 0 52px;
  }
  .eb-page-hero__split,
  .eb-two-col,
  .eb-reading-layout{
    gap:48px;
  }
  .eb-contact-page .eb-page-hero__inner{
    grid-template-columns:minmax(0,1fr) minmax(240px,300px);
    gap:44px;
  }
}

@media only screen and (max-width:849px){
  #masthead .header-inner{
    height:76px;
  }
  #main-menu .nav-sidebar{
    padding:30px 24px 36px;
  }
  #main-menu .nav-sidebar > li > a{
    padding:15px 0;
  }
  .eb-home-hero__copy{
    padding:52px 0 30px;
  }
  .eb-home-hero__image{
    margin-bottom:26px;
  }
  .eb-contact-page .eb-page-hero__inner{
    grid-template-columns:1fr;
    gap:34px;
  }
  .eb-contact-hero-media{
    width:min(100%,520px);
    max-height:none;
  }
  .eb-contact-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  /* Restore the tablet footer grid after the base desktop QA rules. */
  .eb-site-footer__top{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:40px;
    padding:46px 0 42px;
  }
  .eb-site-footer__brand{
    grid-column:1 / -1;
  }
}

@media only screen and (max-width:549px){
  :root{
    --eb-section-y:56px;
  }
  #masthead .header-inner{
    height:72px;
  }
  #logo img{
    max-height:48px;
  }
  .eb-page-hero{
    padding:44px 0 42px;
  }
  .eb-page-hero__inner{
    min-height:0;
  }
  .eb-page-hero h1{
    margin-bottom:22px;
  }
  .eb-reading-layout,
  .eb-two-col{
    gap:32px;
  }
  .eb-home-hero__copy{
    padding:44px 0 24px;
  }
  .eb-home-hero h1{
    margin-bottom:24px;
  }
  .eb-home-hero .eb-hero__actions{
    margin-top:24px;
  }
  .eb-home-hero__image{
    margin-bottom:22px;
  }
  .eb-home-hero__footer{
    min-height:64px;
  }
  .eb-section-heading{
    margin-bottom:24px;
  }
  .eb-home-session .eb-process + .eb-text-link{
    margin-top:22px;
  }
  .eb-contact-grid{
    grid-template-columns:1fr;
  }
  .eb-contact-grid > div{
    min-height:0;
  }
  .eb-contact-map{
    padding-bottom:54px;
  }
  .eb-cta-band{
    padding:54px 0;
  }
  .eb-site-footer{
    padding-bottom:20px;
  }
  /* Phones require a single-column flow, not the desktop three-column grid. */
  .eb-site-footer__top{
    grid-template-columns:minmax(0,1fr);
    gap:30px;
    padding:42px 0 38px;
  }
  .eb-site-footer__brand{
    grid-column:auto;
  }
  .eb-site-footer__brand strong{
    font-size:clamp(30px,8vw,36px);
    line-height:1.12;
  }
  .eb-site-footer__brand p{
    max-width:32ch;
    font-size:14px;
  }
  .eb-site-footer__nav,
  .eb-site-footer__actions{
    width:100%;
  }
  .eb-site-footer__social{
    flex-wrap:wrap;
  }
  .eb-site-footer__bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    padding-top:20px;
  }
}
