/* V6.1.1 — Homepage-only layout corrections; no change to project/blog templates. */

/* The global header must be anchored to the viewport and above all Gutenberg effects. */
body.home > .site-header,
body.home .site-header,
body.front-page > .site-header {
  position: fixed !important;
  inset-inline: 0 !important;
  top: 0;
  z-index: 2147483000 !important;
  transform: none !important;
  width: 100%;
}
body.home.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.home.admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { body.home.admin-bar .site-header { top: 0; } }

/* Do not clip html/body: keep the window as the only horizontal scrolling root.
   Clip only content which can paint outside its main layout area. */
body.home .vn-page-main { 
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Old V5.4 full-width utility used 100vw plus negative margins; scrollbar width
   made it wider than the visible window. JS sets exact clientWidth in pixels.
   Fallback (no JS) stays inside the parent, rather than causing overflow. */
body.home .vn-page-main .vn54-width-full,
body.home .vn-page-main .entry-content .vn54-width-full {
  box-sizing: border-box;
  width: var(--vn611-viewport, 100%) !important;
  max-width: none !important;
  margin-left: calc(50% - var(--vn611-half-viewport, 50%)) !important;
  margin-right: calc(50% - var(--vn611-half-viewport, 50%)) !important;
}
/* When section is a direct child of the already full-width main, it does not
   need negative margins. */
body.home .vn-page-main > .vn54-width-full {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
}

/* Keep the existing full-screen Hero Builder; do not re-introduce 100vw. */
body.home .vn-page-main > .vn56-hero,
body.home .vn-page-main > .alignfull {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  margin-inline: 0;
}

/* Widened cards and typography must shrink inside responsive Gutenberg layouts. */
body.home .vn-page-main :where(.wp-block-columns, .wp-block-column, .wp-block-group, .vn54-layout-grid, .vn54-layout-flex) {
  min-width: 0;
}
body.home .vn-page-main .vn54-width-wide {
  max-width: 100% !important;
}
