/**
 * Weima Display — Elementor Pro → Elementor Free compatibility layer.
 *
 * Structural fixes only. All colours, typography, spacing, backgrounds and
 * shadows still come from the Elementor settings stored in each template, so
 * the design is never redefined here — this file only removes theme wrappers
 * that would otherwise double up with the HFE header/footer and keeps the
 * sticky header working without Elementor Pro.
 *
 * @package WeimaCompat
 */

/* -------------------------------------------------------------------------
 * 1. HFE header wrapper
 * ---------------------------------------------------------------------- */

/*
 * HFE renders <header id="masthead"> around the Elementor template. Astra's
 * own header styles assume a .site-header wrapper, so neutralise the wrapper
 * and let the Elementor container carry the design (white background,
 * 0 5px 30px rgba(0,0,0,.1) shadow, z-index 100).
 */
header#masthead {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

/* Sticky header: Elementor Pro provided the "sticky: top" motion effect. */
#header_pop {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Keep the sticky element from being clipped by page wrappers. */
#page,
.site,
.hfeed {
	overflow: visible;
}

/* WordPress admin bar offset on desktop and mobile. */
body.admin-bar #header_pop {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #header_pop {
		top: 46px;
	}
}

/* The Elementor editor canvas must not be sticky. */
.elementor-editor-active #header_pop,
.elementor-editor-preview #header_pop {
	position: relative;
	top: auto;
}

/* -------------------------------------------------------------------------
 * 2. HFE footer wrapper
 * ---------------------------------------------------------------------- */

footer#colophon {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
 * 3. HFE Navigation Menu — layout normalisation
 * ---------------------------------------------------------------------- */

/*
 * The widget's colours, font family, size, weight and paddings are emitted by
 * Elementor from the template settings (copied from the Pro Nav Menu). These
 * rules only make the free widget's markup behave like the Pro one:
 * a clean list, no bullets, and the same box model.
 */
.hfe-nav-menu,
.hfe-nav-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hfe-nav-menu__layout-horizontal .hfe-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.hfe-nav-menu__layout-vertical .hfe-nav-menu > li {
	display: block;
	margin: 0;
}

.hfe-nav-menu__layout-vertical .hfe-menu-item {
	display: block;
}

/* The free toggle inherits the site text colour instead of Astra's menu colour. */
.hfe-nav-menu__toggle {
	color: inherit;
}

/* -------------------------------------------------------------------------
 * 4. Shared helpers
 * ---------------------------------------------------------------------- */

/* Astra adds a small top margin under HFE header/footer templates. */
#content .ast-container {
	box-sizing: border-box;
}
