/* ==========================================================================
   Ovation — Elementor alignment
   Makes Elementor's own containers land on the same grid as the theme, so a
   section built in Elementor lines up with one built as a widget or a PHP
   section template.

   Also set Elementor > Site Settings > Layout > Content Width to 1440 so the
   editor's own rulers agree with this file.
   ========================================================================== */

/* Flexbox containers (Elementor 3.6+) */
.e-con {
	--container-max-width: var(--o-container);
	--container-default-padding-inline: var(--o-gutter);
}

.e-con-boxed > .e-con-inner {
	max-width: var(--o-container);
}

/* Legacy sections, for any content migrated from the previous build */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--o-container);
}

.elementor-section.elementor-section-full_width > .elementor-container {
	max-width: none;
}

/* --------------------------------------------------------------------------
   Letting full-section widgets reach the edges

   An Ovation full section already brings its own edge-to-edge background AND
   its own 1440 container. Dropped into a boxed Elementor container it would be
   clamped twice: once by .e-con-inner, once by its own .o-container — leaving a
   section that is subtly too narrow with a background that stops short of the
   viewport edge.

   .e-con-boxed is itself full width; only .e-con-inner is clamped. So releasing
   the inner wrapper is enough — no negative margins, no 100vw, and therefore no
   horizontal scrollbar.

   Caveat: this releases the whole container, so do not put other widgets
   alongside a full-section widget. One container per section is the pattern.
   -------------------------------------------------------------------------- */
.e-con-boxed:has(> .e-con-inner > .elementor-widget .o-section) > .e-con-inner {
	max-width: none;
	padding-inline: 0;
}

.e-con:has(> .elementor-widget .o-section),
.e-con:has(> .e-con-inner > .elementor-widget .o-section) {
	padding-inline: 0;
}

/* The per-widget wrapper must not add a gutter either. */
.elementor-widget-container:has(> .o-section) {
	padding: 0;
}

.elementor-widget-container > .o-section {
	margin-inline: 0;
}

/*
 * Elementor's default heading/text colours would otherwise win over a section's
 * colour scheme. Scope the scheme so it applies to Elementor content nested
 * inside an Ovation section.
 */
.o-scheme-dark .elementor-heading-title,
.o-scheme-dark .elementor-widget-text-editor {
	color: var(--o-text);
}
