/*
 * Homepage content grid.
 * Mirrors the calm institutional rhythm of a 1440px content container with
 * stable desktop and mobile gutters while leaving full-bleed backgrounds intact.
 */

body.home.yfg-design-layer {
  --yfg-home-content-max: 1440px;
  --yfg-home-gutter: 40px;
}

body.home.yfg-design-layer :is(
  .bde-section-24-305,
  .bde-section-24-325
) > .section-container {
  width: min(calc(100% - (var(--yfg-home-gutter) * 2)), var(--yfg-home-content-max)) !important;
  max-width: var(--yfg-home-content-max) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.home.yfg-design-layer .bde-section-24-377 > .section-container {
  width: min(calc(100% - (var(--yfg-home-gutter) * 2)), var(--yfg-home-content-max)) !important;
  max-width: var(--yfg-home-content-max) !important;
  margin-inline: auto !important;
}

body.home.yfg-design-layer :is(
  .yfg-awards-showcase__heading,
  .yfg-awards-carousel
) {
  width: min(calc(100% - (var(--yfg-home-gutter) * 2)), var(--yfg-home-content-max)) !important;
}

body.home.yfg-design-layer .bde-section-24-420.yfg-milestone-horizontal > .section-container {
  width: min(calc(100% - (var(--yfg-home-gutter) * 2)), var(--yfg-home-content-max)) !important;
  max-width: var(--yfg-home-content-max) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

@media (min-width: 1120px) {
  body.home.yfg-design-layer .bde-header-builder-1931-100 .bde-header-builder__container {
    width: min(calc(100% - (var(--yfg-home-gutter) * 2)), var(--yfg-home-content-max)) !important;
    max-width: var(--yfg-home-content-max) !important;
    padding-inline: 0 !important;
  }

  body.home.yfg-design-layer .bde-header-builder-1931-100 .bde-columns-1931-105 {
    right: 0 !important;
  }
}

@media (max-width: 980px) {
  body.home.yfg-design-layer {
    --yfg-home-gutter: 24px;
  }
}

@media (max-width: 640px) {
  body.home.yfg-design-layer {
    --yfg-home-gutter: 20px;
  }
}
