/* ASPO layout fix v3 — load AFTER aspo-visual-v2.css.
   Restores the 1140px theme grid without changing fullscreen backgrounds. */
:root { --aspo-content-width: 1140px; }
.wrapper,
#footer .wrapper.cf,
body.home #content .wrapper.cf {
  width: min(var(--aspo-content-width), calc(100% - 40px)) !important;
  max-width: var(--aspo-content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}
/* SiteOrigin itself may use full-width sections; keep those as-is.
   Only the central content area is constrained. */
body.home #content #posts.stage2-posts,
body.home #content #posts .post,
body.home #content #posts .post-excerpt {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* Original visual treatment of the main navigation band. */
header > .wrapper.cf:has(nav) {
  position: relative;
  isolation: isolate;
}
header > .wrapper.cf:has(nav)::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(236, 243, 249, 1);
  box-shadow: 0 5px 11px rgba(50, 50, 50, .4);
}
header > .wrapper.cf nav { position: relative; z-index: 1; }
/* Exactly four original footer widgets, phone in final column. */
#footer .footer-margin-left.cf {
  display: grid !important;
  grid-template-columns: 1.25fr 1fr 1fr 1fr !important;
  column-gap: 28px !important;
  row-gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 48px 0 40px !important;
  align-items: start;
}
#footer .footer-margin-left.cf > .footer-box {
  display: block;
  float: none !important;
  clear: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}
#footer .footer-margin-left.cf > .footer-box:last-child {
  grid-column: 4;
  grid-row: 1;
  text-align: right !important;
}
#footer .footer-margin-left.cf > .footer-box:last-child a { overflow-wrap: anywhere; }
@media (max-width: 780px) {
  #footer .footer-margin-left.cf { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 24px !important; }
  #footer .footer-margin-left.cf > .footer-box:last-child { grid-column: auto; grid-row: auto; text-align: left !important; }
}
@media (max-width: 480px) {
  .wrapper, #footer .wrapper.cf, body.home #content .wrapper.cf { width: calc(100% - 24px) !important; }
  #footer .footer-margin-left.cf { grid-template-columns: minmax(0, 1fr) !important; }
}
