/* 4Granite v1.7.3: open Gutenberg Pages, clean wide articles, no double boxes.
   Loaded after v1.7.1 / v1.7.2 rules. Original industrial design retained. */

/* Wide articles are genuinely unboxed — not a white card sitting on gray. */
.fgmodern-site .fg-editorial-main.fg-editorial--wide {
  background:#fff;
  padding-block:clamp(30px,4vw,56px) clamp(44px,5vw,76px);
}
.fgmodern-site .fg-editorial-main.fg-editorial--wide .fg-editorial-grid {
  width:min(calc(100% - 2 * var(--fgmodern-edge,24px)),var(--fgmodern-max,1320px));
  max-width:var(--fgmodern-max,1320px);
  grid-template-columns:minmax(0,1fr);
}
.fgmodern-site .fg-editorial-main.fg-editorial--wide .fg-editorial-article {
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.fgmodern-site .fg-editorial-main.fg-editorial--wide .fg-editorial-body {
  width:100%;
  max-width:100%;
}
/* The normal Page renderer uses no constricting outer shell for full-width
   Gutenberg sections, unlike posts and deliberately chosen boxed layouts. */
.fgmodern-site main.fgmodern-open-page {
  background:var(--fg-body-background,#fff);
  padding:0;
  min-height:0;
}
.fgmodern-site .fgmodern-open-article {
  display:block;
  width:100%; max-width:none; min-width:0;
  margin:0;
  background:transparent;
  border:0;
  padding:0;
  box-shadow:none;
}
.fgmodern-site .fgmodern-open-body {
  width:100%; max-width:none; min-width:0;
  overflow-wrap:break-word;
}
.fgmodern-site .fgmodern-open-body > * {box-sizing:border-box;min-width:0;}
/* Paragraph-only and mixed-content Pages still have the same alignment as
   the header and section content, without an extra card or second gutter. */
.fgmodern-site .fgmodern-open-body > :not(.alignfull):not(.fg-native-section):not(.fg-section):not(.fg-native-photo-cta):not(.fgmodern-bottom-cta) {
  width:min(calc(100% - 2 * var(--fgmodern-edge,24px)),var(--fgmodern-max,1320px));
  max-width:var(--fgmodern-max,1320px);
  margin-inline:auto;
}
.fgmodern-site .fgmodern-open-body > :is(.alignfull,.fg-native-section,.fg-section,.fg-native-photo-cta,.fgmodern-bottom-cta) {
  width:100%; max-width:none;
  margin-inline:0;
}
/* Full-bleed section backgrounds with correctly constrained inner content.
   Earlier CSS added 40px *on top of* an article card's 50px gutters. */
.fgmodern-site .fgmodern-open-page .fgmodern-content .fg-native-section {
  box-sizing:border-box;
  width:100%; max-width:none;
  padding-block:clamp(38px,4.6vw,68px);
  padding-inline:max(18px,calc((100vw - var(--fgmodern-max,1320px))/2));
  margin-inline:0;
}
.fgmodern-site .fgmodern-open-page .fgmodern-open-body > .fg-section {
  padding-block:clamp(36px,4.5vw,68px);
}
.fgmodern-site .fgmodern-open-page .fg-native-section > :is(h1,h2,h3,h4,h5,h6,p,.wp-block-columns,.fg-service-grid,.fg-project-grid,.wp-block-buttons) {
  box-sizing:border-box;
  max-width:100%;
  overflow-wrap:break-word;
}
.fgmodern-site .fgmodern-open-page .fg-native-section > .wp-block-columns {width:100%;}
.fgmodern-site .fgmodern-open-page .fgmodern-open-body :is(img,video,iframe,svg) {
  max-width:100%;height:auto;
}
.fgmodern-site .fgmodern-open-page .fgmodern-open-body :is(pre,.wp-block-code,.wp-block-table) {
  max-width:100%;overflow-x:auto;
}
.fgmodern-site .fgmodern-open-page .fgmodern-open-body > .wp-block-columns {
  gap:clamp(16px,2.5vw,36px);
}
.fgmodern-site .fgmodern-open-featured {
  padding:clamp(24px,3vw,42px) 0 0;
  margin-bottom:0;
}
.fgmodern-site .fgmodern-open-featured img {
  display:block;width:100%;height:auto;max-height:475px;object-fit:cover;
}
/* A page can begin with a full-bleed section flush against its title band;
   these sections control their own spacing, not an extra editorial wrapper. */
.fgmodern-site .fgmodern-open-page.fgmodern-edge-first .fgmodern-open-body > :first-child:is(.alignfull,.fg-native-section,.fg-section,.fg-native-photo-cta,.fgmodern-bottom-cta) {
  margin-top:0;
}
.fgmodern-site .fgmodern-open-page.fgmodern-edge-last .fgmodern-open-body > :last-child:is(.alignfull,.fg-native-section,.fg-section,.fg-native-photo-cta,.fgmodern-bottom-cta) {
  margin-bottom:0;
}
@media (max-width:900px) {
 .fgmodern-site .fgmodern-open-page .fgmodern-content .fg-native-section {
   padding-inline:clamp(18px,3vw,30px);
 }
}
@media (max-width:610px) {
 .fgmodern-site .fgmodern-open-body > :not(.alignfull):not(.fg-native-section):not(.fg-section):not(.fg-native-photo-cta):not(.fgmodern-bottom-cta) {
   width:calc(100% - 36px);
 }
 .fgmodern-site .fgmodern-open-page .fgmodern-content .fg-native-section {padding-block:36px;padding-inline:18px;}
 .fgmodern-site .fgmodern-open-featured {padding-top:20px;}
}

/* Align title bands and archive shells to the same 1320px site design grid. */
body.fgmodern-site:is(.page,.single,.blog,.archive,.search) .fgmodern-page-banner > .fgmodern-shell {
  max-width:var(--fgmodern-max,1320px);
}
.fgmodern-site .fg-editorial-archive.fg-editorial--wide .fg-archive-layout-grid,
.fgmodern-site .fg-editorial-archive.fg-editorial--wide .fgmodern-blog-grid,
.fgmodern-site .fg-editorial-archive.fg-editorial--wide .fgmodern-pagination {
  max-width:var(--fgmodern-max,1320px);
}
