/**
 * Giltech Mizpah Elementor Widgets — Section Spacing Fix
 * ------------------------------------------------------
 * Every widget in this plugin (Hero Static, Hero Slider, Video Hero,
 * Video Gallery, Contact) is built as a standalone, full-bleed block
 * with its own generous top/bottom padding so it looks right on its
 * own. The widgets keep their original internal wrapper ID prefix
 * ("amdromida-...") purely as an implementation detail carried over
 * from the base widget code — it has no bearing on branding.
 *
 * When two of these widgets are placed directly one after another on a
 * page, that padding "doubles up" — e.g. one section's bottom padding
 * plus the next section's top padding creates a large gap before
 * Elementor's own row/column padding is even added.
 *
 * This file trims the TOP padding of any such section that is
 * immediately preceded by another section from this plugin, so the
 * visual rhythm stays generous but the gap doesn't compound. It does
 * NOT touch a section's spacing when it follows normal content, so
 * nothing changes for a section used on its own.
 *
 * Tune the gap by editing --amdromida-stack-gap-top below.
 */

:root {
    --amdromida-stack-gap-top: 40px;
}

/* Elementor wraps every widget in .elementor-element > .elementor-widget-container.
   Target the wrapper directly following another Amdromida-widget wrapper. */
.elementor-element:has(> .elementor-widget-container > [id^="amdromida-"])
+ .elementor-element
> .elementor-widget-container
> [id^="amdromida-"] {
    padding-top: var(--amdromida-stack-gap-top) !important;
}

/* Same fix inside Elementor's editor preview iframe (class names match the
   live front end, this simply guarantees the rule also applies there). */
.elementor-editor-active .elementor-element:has(> .elementor-widget-container > [id^="amdromida-"])
+ .elementor-element
> .elementor-widget-container
> [id^="amdromida-"] {
    padding-top: var(--amdromida-stack-gap-top) !important;
}
