/* ===========================================================================
   elementor-v41-compat.css
   ---------------------------------------------------------------------------
   The ONLY stylesheet this conversion adds. It contains no design decisions.
   Every rule exists to make the Elementor wrapper DOM behave like the V41
   source DOM. Nothing here changes a colour, a size, a spacing value, a
   radius, a font, a timing or a breakpoint.

   Loaded LAST, after content-v3.css, so it can neutralise Elementor's own
   defaults without out-specifying V41's rules (it never targets a V41 class
   for visual purposes — only Elementor's own wrapper classes).

   Each block states what it fixes and why. See V41_COMPATIBILITY_CHANGES.md.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   C1. Neutralise the Elementor container defaults on V41 hosts.

   Elementor gives every `.e-con` a flex layout, a gap inherited from the Kit,
   a `--content-width` max-width and its own padding. V41's own `<main>`,
   `<section>` and `.shell` rules already define all of that. Left alone,
   Elementor would layer a second layout system on top of V41's.

   Scoped to `.v41-page` so no other Elementor content on the site is touched.
--------------------------------------------------------------------------- */
/* CRITICAL: neutralise Elementor's own CUSTOM PROPERTIES only — never the
   real CSS properties. `.e-con` computes its padding, margin, gap, width and
   display FROM these variables, so zeroing the variables removes Elementor's
   contribution completely while leaving V41's own declarations to win the
   cascade normally.

   Setting the real properties here instead (`padding:0; margin:0; width:100%`)
   was tried and rejected: at specificity (0,2,0) loaded last it out-ranks
   `.xv2 .shell { margin-inline: auto }` (0,2,0) and silently left every
   `.shell` flush to the page edge instead of centred — a 30px shift measured
   on the article hero at all seven widths. Variables cannot cause that class
   of collision because V41 never declares them.                              */
.v41-page,
.v41-page .v41-section-host,
.v41-page .v41-article-host {
  --display: block;             /* V41 bands are block-level, not flex        */
  --content-width: 100%;
  --width: 100%;
  --min-height: 0;
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
  --margin-top: 0px; --margin-right: 0px; --margin-bottom: 0px; --margin-left: 0px;
  --gap: 0px;
  --widgets-spacing: 0px 0px;
  --container-widget-width: 100%;
  --overflow: visible;
}

/* Elementor's boxed-container inner wrapper, if a theme or an older Elementor
   build forces one. Same rule: variables, not properties. */
.v41-page > .e-con-inner,
.v41-page .v41-section-host > .e-con-inner,
.v41-page .v41-article-host > .e-con-inner {
  --content-width: 100%;
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
  --gap: 0px;
  display: block;
  max-width: none;
}

/* ---------------------------------------------------------------------------
   C2. Make the HTML-widget wrappers transparent to layout.

   An Elementor HTML widget renders as
       .elementor-element.elementor-widget.elementor-widget-html
         > .elementor-widget-container
           > [the V41 markup]
   Two extra boxes sit between a V41 <section> and its `.shell`. `display:
   contents` removes those boxes from the layout tree entirely, so the V41
   markup lays out as a direct child of its section exactly as in the source.

   The source's own `>` rules were audited (23 of them): every one either
   resolves through the real <main>/<section>/<article> tags emitted by the
   page tree, or lives wholly inside a single island. No selector rewriting
   is required — this is a layout fix only.
--------------------------------------------------------------------------- */
.v41-page .elementor-widget-html,
.v41-page .elementor-widget-html > .elementor-widget-container {
  display: contents;
}

/* `display: contents` removes the wrappers' BOXES but leaves them in the
   INHERITANCE tree. Any V41 rule that says `property: inherit` therefore
   resolves against the wrapper instead of the real V41 parent.

   One such rule exists in V41 and it is load-bearing:
       .xv2-hero__grid { min-height: inherit; }
   with `.xv2-hero { min-height: calc(100svh - …) }` and `align-content: end`.
   Without this fix the grid inherited 0px from `.elementor-widget-container`
   instead of 884px from the section, and the whole home hero copy block sat
   101px too high — measured at 1024px, invisible at 1440px.

   Re-propagating min-height through the two wrappers restores the exact
   source chain. It sets no value of its own: on sections that never declare
   a min-height this resolves to `auto`, which is the initial value anyway.

   (`color: inherit` and `font: inherit` also appear in V41 — 9 and 2 uses —
   but both are naturally inherited properties, so they pass through the
   wrappers unchanged and need nothing here.) */
.v41-page .elementor-widget-html,
.v41-page .elementor-widget-html > .elementor-widget-container {
  min-height: inherit;
}

/* Belt and braces: if a stylesheet or plugin overrides `display:contents`
   above, these keep the wrappers from introducing width, spacing or a
   stacking context. */
.v41-page .elementor-widget-html:not([style*="display"]) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------------------------
   C3. Elementor "widget space" and heading/paragraph resets.

   Elementor's frontend.css applies `margin-bottom` to `.elementor-widget:not(
   :last-child)` from the Kit's `space_between_widgets` value, and normalises
   heading/paragraph margins. V41 controls its own vertical rhythm.
--------------------------------------------------------------------------- */
.v41-page .elementor-widget:not(:last-child) { margin-block-end: 0; }
.v41-page .elementor-element { --widgets-spacing: 0px 0px; }

/* ---------------------------------------------------------------------------
   C4. Nodes site.js appends directly to <body>.

   `.baseline-menu`, `.gradual-blur`, `.page-bottom-shade` and `.lightbox` are
   created by site.js and appended to <body> — OUTSIDE the Elementor container
   tree and therefore outside `.v41-page`. Their V41 styling is unscoped in
   baseline-editorial.css / site.css and already applies. This block only
   guarantees they are not clipped or re-stacked by an Elementor or theme
   ancestor, and that the page root cannot create a containing block that
   would break their `position: fixed`.
--------------------------------------------------------------------------- */
.v41-page,
.v41-page .v41-section-host,
.v41-page .v41-article-host {
  transform: none;
  perspective: none;
  contain: none;
}

/* The Elementor page wrapper must not clip the fixed header/menu/blur. */
body.v41-host .elementor,
body.v41-host .elementor > .elementor-element,
body.v41-host .e-con,
body.v41-host .e-con-inner { overflow: visible; }

/* ---------------------------------------------------------------------------
   C5. Theme-shell suppression for standalone pages.

   Standalone pages are imported on the Elementor Canvas template, which emits
   no theme header, footer or page title. These rules are a safety net for
   installs where a theme still injects one, so the page can never show two
   headers or two footers. They are inert on a correct Canvas import.
--------------------------------------------------------------------------- */
body.v41-host > header:not(.site-header),
body.v41-host > footer:not(.site-footer),
body.v41-host .site-main > .entry-header,
body.v41-host .page-title,
body.v41-host .entry-title:not(.v41-page *) { display: none; }

/* ---------------------------------------------------------------------------
   C6. Editor-only. Inside the Elementor editor the preview iframe adds an
   empty-state placeholder and drop-zone outlines to containers that have no
   visible box of their own. Purely cosmetic, editor-side, and never emitted
   on the front end.
--------------------------------------------------------------------------- */
.elementor-editor-active .v41-page .v41-section-host,
.elementor-editor-active .v41-page .v41-article-host { min-height: 0; }
.elementor-editor-active .v41-page .elementor-widget-html { display: block; }
.elementor-editor-active .v41-page .elementor-widget-html > .elementor-widget-container { display: block; }
