/* Horizon Solutions Group - header behaviour.
   The mega panel and the header bar are built entirely from native Elementor
   containers and widgets, so every colour, spacing value, blurb and the video
   stay editable in Elementor. This file only carries the two behaviours
   Elementor free cannot express: the sticky nav bar and the mega menu reveal.
   Safe to delete if you later install Elementor Pro and rebuild the nav. */

/* ---- Sticky: only the nav bar pins. The thin top bar scrolls away. ---- */
.hz-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 500;
}

/* WordPress admin bar offset when logged in. */
.admin-bar .hz-sticky { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar .hz-sticky { top: 46px; }
}

/* Astra can clip sticky children on the page wrapper. */
#page, .site, .ast-container, .xpro-theme-builder-header,
.xpro-theme-builder-header-nav,
.xpro-theme-builder-header-nav > .elementor { overflow: visible !important; }

/* ---- Mega menu: anchored under the sticky bar, revealed on hover ---- */
.hz-sticky { position: sticky; }
.hz-mainbar { position: static; }

.hz-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 499;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
	box-shadow: 0 30px 70px -20px rgba(11, 13, 16, .28);
}

.hz-sticky:has(.hz-mega-trigger:hover) .hz-mega,
.hz-sticky:has(.hz-mega:hover) .hz-mega,
.hz-sticky:has(.hz-mega-trigger:focus-within) .hz-mega {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* The mega panel replaces the plain dropdown for this one item on desktop. */
@media (min-width: 1025px) {
	.hz-mega-trigger .xpro-elementor-dropdown-menu,
	.hz-mega-trigger .sub-menu,
	.hz-mega-trigger ul { display: none !important; }
}

/* On tablet and mobile the standard collapsible menu takes over. */
@media (max-width: 1024px) {
	.hz-mega { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.hz-mega { transition: none; }
}
