/*
  Elementor wrapper compatibility.
  --------------------------------
  Each Technocast widget renders a complete, full-bleed <section> that manages its
  own .container, max-width and vertical rhythm — exactly as in the original static
  site. Elementor wraps every widget in section > container > column > widget-wrap >
  widget > widget-container, several of which carry default padding, a max-width and
  a bottom margin. Left alone those wrappers inset and stack our sections wrongly.

  These rules neutralise the wrapper geometry ONLY around widgets whose class starts
  with elementor-widget-tcf-, so any stock Elementor widget added later behaves
  normally. Attribute-prefix selectors are used instead of :has() so support is
  universal.
*/

/* The widget box itself must not add spacing of its own. */
.elementor-widget[class*="elementor-widget-tcf-"] {
  width: 100%;
  margin: 0;
}

.elementor-widget[class*="elementor-widget-tcf-"] > .elementor-widget-container {
  margin: 0;
  padding: 0;
}

/* Elementor's default 20px bottom margin between widgets would break the
   section-to-section rhythm the design already defines. */
.elementor-element.elementor-widget[class*="elementor-widget-tcf-"]:not(:last-child) {
  margin-bottom: 0;
}

/* Our sections are full-bleed; the column and its wrap must not inset them. */
.elementor-column .elementor-widget-wrap:has(> .elementor-widget[class*="elementor-widget-tcf-"]) {
  padding: 0;
}

/* Fallback for browsers without :has() — scoped by the body class the theme adds
   to pages built entirely from Technocast sections. */
.tcf-elementor-page .elementor-section > .elementor-container {
  max-width: none;
  margin: 0;
}

.tcf-elementor-page .elementor-section,
.tcf-elementor-page .elementor-column,
.tcf-elementor-page .elementor-widget-wrap {
  padding: 0;
}

/* Elementor injects a min-height on empty columns in the editor preview; harmless
   on the front end but it shifts our first section down inside the canvas. */
.elementor-editor-active .tcf-elementor-page .elementor-column > .elementor-widget-wrap {
  min-height: 0;
}
