/* Divi layout DEFAULTS — intentionally NOT !important so the design-system
   utility classes (which ARE !important) and the parent-row inset (higher
   specificity, src/_rows.scss) can override them. Loads after Divi's parent
   stylesheet, so these beat Divi's defaults on equal specificity. */

/* -----------------------------------------------------------------------------
   No automatic spacing. Divi 5 auto-spaces flex containers via gutter custom
   properties; we zero them all so YOU decide every gap (via the gap-*/m-*
   utilities, per-element settings, or your own values). Defaults zeroed:
     --section-gutter           gap between rows in a section
     --row-gutter-horizontal/-vertical  gap between columns in a row
     --module-gutter            gap between modules (et_flex_group/column/module)
     --module-gutter-grid       same, for grid layouts
   --------------------------------------------------------------------------- */

/* Sections */
.et_pb_section,
.et_flex_section {
  padding: 50px 0;
  /* no literal `gap: 0` — builder gaps arrive as --horizontal/vertical-gap
     custom properties feeding Divi's gap: var(...); a literal gap here would
     override them. Defaults stay 0 via the zeroed gutter variables below. */
  --section-gutter: 0;
  --module-gutter-grid: 0;
}

/* Rows (parent-row left/right inset lives in src/_rows.scss).
   NOTE: no `padding: 0` here (or below). Divi emits builder-set padding per
   module WITHOUT !important (margins DO get !important), and this stylesheet
   prints after Divi's per-module CSS — an equal-specificity `padding: 0` here
   silently ate every padding set in the builder. Divi's generics define no
   default padding for rows/columns/groups/modules, so zeroing isn't needed. */
.et_pb_row,
.et_flex_row {
  /* ROWS keep padding: 0 — Divi generics DO pad block rows (.et_block_row
     gets 30px/27px/2% 0 from Divi's static CSS). Columns/groups/modules
     stay un-zeroed (see note above). Row spacing: use the padding utilities. */
  padding: 0;
  margin: 0 auto;
  width: 90%;
  max-width: 1440px;
  --row-gutter-horizontal: 0;
  --row-gutter-vertical: 0;
}

/* Divi also pads inner rows at higher specificity — match it exactly. */
.et_pb_column .et_block_row.et_pb_row_inner {
  padding: 0;
}

/* Columns / flex groups / modules — no auto gap between items */
.et_pb_column,
.et_flex_group,
.et_flex_module,
.et_grid_group,
.et_grid_module {
  margin: 0;
  --module-gutter: 0;
  --module-gutter-grid: 0;
}

/* Modules (text, image, etc.) */
.et_pb_module {
  margin: 0;
}
