/*
 * WB1 Geometry System 3.0.0
 * Reproduces the verified effective container geometry of the retired legacy theme
 * without restoring any Swift/Flexform runtime code.
 *
 * Verified reference:
 * >=1200 viewport  -> 1170px container
 * 980-1199        -> 940px container
 * 768-979         -> 724px container
 * <=767           -> fluid with 20px side gutters
 *
 * One page boundary. H1, copy, filters, and galleries align to the same container.
 */

:root{
  --wb1-legacy-container:1170px;
  --wb1-legacy-mobile-gutter:20px;
}

/* All Classic content surfaces share the same physical container. */
.wb1-page-template,
.wb1-home-frame,
.wb1-page-frame,
.wb1-project-frame,
.site-shell,
.article-shell,
.project-shell,
.content-shell,
.home-shell{
  box-sizing:border-box!important;
  width:var(--wb1-legacy-container)!important;
  max-width:var(--wb1-legacy-container)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Remove the nested reading-container geometry. */
.wb1-page-template__reading,
.wb1-reading-frame,
.wb1-home-frame > .wb1-reading-frame{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* H1, content, filters, discovery, and project gallery all share the same boundaries. */
.wb1-page-template__reading > .entry-header,
.wb1-page-template__reading > .entry-content,
.wb1-reading-frame > .entry-header,
.wb1-reading-frame > .entry-content,
.wb1-page-template__gallery,
.wb1-wide-frame,
.wb1-project-gallery-frame,
.wb1-structured-discovery,
.epr-project-discovery,
.epr-project-discovery .epr-pd-surface,
.epr-project-discovery .epr-pd-grid,
.epr-project-discovery .wb1-portfolio-grid{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Never let individual paragraphs recreate a narrower page container. */
.wb1-page-template__reading .entry-content > *,
.wb1-reading-frame .entry-content > *{
  max-width:none!important;
}

/* Standard Classic spacing. */
.wb1-page-template,
.wb1-page-frame,
.wb1-home-frame{
  padding-top:56px!important;
  padding-bottom:56px!important;
}

/* Keep gallery rhythm but no alternate width system. */
.wb1-page-template__gallery,
.wb1-wide-frame,
.wb1-project-gallery-frame{
  margin-top:40px!important;
}

/* Desktop large: exact legacy reference. */
@media(min-width:1200px){
  :root{--wb1-legacy-container:1170px}
}

/* Desktop / small desktop */
@media(min-width:980px) and (max-width:1199px){
  :root{--wb1-legacy-container:940px}
}

/* Tablet */
@media(min-width:768px) and (max-width:979px){
  :root{--wb1-legacy-container:724px}
  .wb1-page-template,
  .wb1-page-frame,
  .wb1-home-frame{
    padding-top:46px!important;
    padding-bottom:46px!important;
  }
}

/* Mobile */
@media(max-width:767px){
  .wb1-page-template,
  .wb1-home-frame,
  .wb1-page-frame,
  .wb1-project-frame,
  .site-shell,
  .article-shell,
  .project-shell,
  .content-shell,
  .home-shell{
    width:calc(100% - (var(--wb1-legacy-mobile-gutter) * 2))!important;
    max-width:none!important;
  }

  .wb1-page-template,
  .wb1-page-frame,
  .wb1-home-frame{
    padding-top:34px!important;
    padding-bottom:40px!important;
  }

  .wb1-page-template__gallery,
  .wb1-wide-frame,
  .wb1-project-gallery-frame{
    margin-top:30px!important;
  }
}

/* Footer/header alignment follows the same reference container. */
.header-inner,
.site-footer .footer-inner{
  box-sizing:border-box!important;
  width:var(--wb1-legacy-container)!important;
  max-width:var(--wb1-legacy-container)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
@media(min-width:980px) and (max-width:1199px){
  .header-inner,
  .site-footer .footer-inner{width:940px!important;max-width:940px!important}
}
@media(min-width:768px) and (max-width:979px){
  .header-inner,
  .site-footer .footer-inner{width:724px!important;max-width:724px!important}
}
@media(max-width:767px){
  .header-inner,
  .site-footer .footer-inner{
    width:calc(100% - (var(--wb1-legacy-mobile-gutter) * 2))!important;
    max-width:none!important;
  }
}
