/**
 * Cutting Edge HF Builder Ultimate — header / footer / layout wrappers.
 */

/* ---------- Header ---------- */
.cehfb-header {
	position: relative;
	z-index: var(--cehfb-z, 999);
	width: 100%;
	box-sizing: border-box;
}

/* A menu panel inside the header is open: rise above the WordPress admin bar (z-index 99999). */
.cehfb-header.cehfb-has-overlay,
.cehfb-footer.cehfb-has-overlay,
.cehfb-part.cehfb-has-overlay {
	z-index: 100000 !important;
}

.cehfb-footer.cehfb-has-overlay,
.cehfb-part.cehfb-has-overlay {
	position: relative;
}

.cehfb-header.cehfb-is-stuck {
	position: fixed;
	top: var(--cehfb-offset, 0);
	left: 0;
	right: 0;
	width: 100%;
}

.cehfb-header.cehfb-scroll-animation,
.cehfb-header.cehfb-is-stuck {
	transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.cehfb-header.cehfb-is-stuck.cehfb-hide {
	transform: translateY(calc(-100% - var(--cehfb-offset, 0px)));
}

.cehfb-header-spacer {
	display: block;
	width: 100%;
}

/* Transparent (overlay) header: content scrolls beneath it. */
.cehfb-header.cehfb-transparent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background-color: transparent;
}

body.admin-bar .cehfb-header.cehfb-transparent:not(.cehfb-is-stuck) {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .cehfb-header.cehfb-transparent:not(.cehfb-is-stuck) {
		top: 46px;
	}
}

.cehfb-header.cehfb-transparent.cehfb-is-stuck {
	position: fixed;
}

.cehfb-header.cehfb-shadow,
.cehfb-fx-shadow {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Section / row level Header Effects (Elementor sections & containers, Beaver Builder rows). */
.cehfb-header .cehfb-fx-transparent-yes {
	background-color: transparent !important;
	background-image: none !important;
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 2;
}

.cehfb-header.cehfb-is-stuck .cehfb-fx-transparent-yes {
	position: relative !important;
}

.cehfb-fx-solid {
	transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

/* ---------- Footer & parts ---------- */
.cehfb-footer,
.cehfb-part {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	clear: both;
}

/* ---------- Layouts ---------- */
.cehfb-layout-main {
	display: block;
	width: 100%;
}

.cehfb-block-content > *:first-child {
	margin-top: 0;
}

.cehfb-block-content > *:last-child {
	margin-bottom: 0;
}

/* ---------- Template preview canvas ---------- */
body.cehfb-template-preview {
	margin: 0;
}

.cehfb-canvas {
	min-height: 100px;
}

/* ---------- Device visibility ---------- */
@media (min-width: 1025px) {
	.cehfb-hide-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.cehfb-hide-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.cehfb-hide-mobile {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cehfb-header,
	.cehfb-header.cehfb-is-stuck {
		transition: none;
	}
}
