/* =============================================================
   Astra Hover Submenus — frontend.css
   Strategy: kill native Astra .sub-menu, style .ahs-mega-panel
   ============================================================= */

/* 1. Hide ALL native Astra submenus — hard kill */
.ahs-ready .main-header-menu li.menu-item-has-children > ul.sub-menu {
	display:        none !important;
	visibility:     hidden !important;
	pointer-events: none !important;
	height:         0 !important;
	overflow:       hidden !important;
}

/* 2. Keep the nav itself and its ancestors overflow:visible
      so our panel can escape any clipping container */
.ahs-ready .main-navigation,
.ahs-ready .main-header-menu,
.ahs-ready .main-header-bar,
.ahs-ready .main-header-bar-navigation,
.ahs-ready header.site-header,
.ahs-ready .ast-builder-menu-1,
.ahs-ready .ast-main-header-bar-alignment {
	overflow: visible !important;
}

/* 3. Position anchor for the panel — must be on the <ul>, not on <li> */
.ahs-ready .main-header-menu {
/* 	position: relative !important; */
/* 	z-index:  9999 !important; */
}

/* li must NOT be the containing block — panel needs to escape it */
.ahs-ready .main-header-menu > li {
	position: static !important;
}

/* ── Mega panel variables ─────────────────────────────────── */
.ahs-mega-panel {
	--ahs-green:        #003f32;
	--ahs-orange:       #ef5a24;
	--ahs-line:         rgba(255, 255, 255, 0.18);
	--ahs-panel-height: 420px;
}

/* 4. Mega panel — hidden state */
.ahs-mega-panel {
	background:            radial-gradient(circle at 50% 20%, rgba(0, 100, 78, 0.5), transparent 44%), var(--ahs-green);
	border-top:            2px solid var(--ahs-orange);
	box-shadow:            0 18px 35px rgba(0, 0, 0, 0.14);
	box-sizing:            border-box;
	display:               none;
	grid-template-columns: repeat(var(--ahs-panel-columns, 1), minmax(0, 1fr));
	height:                var(--ahs-panel-height);
	left:                  0;
	margin:                0;
	opacity:               0;
	overflow:              hidden;
	padding:               42px 40px 46px;
	position:              absolute;
	right:                 0;
	top:                   100%;
	visibility:            hidden;
	z-index:               99991;
	/* gap above so mouse can travel from nav item → panel */
	pointer-events:        none;
}

/* pseudo-bridge so cursor can cross the gap between bar → panel */
.ahs-mega-panel::before {
	content:    "";
	position:   absolute;
	left:       0;
	right:      0;
	top:        -18px;
	height:     18px;
	background: transparent;
}

/* 5. Mega panel — visible state (JS adds .ahs-open to the <ul>) */
.ahs-ready .main-header-menu.ahs-open > .ahs-mega-panel {
	display:        grid;
	opacity:        1;
	visibility:     visible;
	pointer-events: auto;
}

/* 6. Columns */
.ahs-mega-panel .ahs-col {
	box-sizing: border-box;
	min-width:  0;
	padding:    0 42px;
	position:   relative;
}

.ahs-mega-panel .ahs-col::before {
	background: var(--ahs-line);
	content:    "";
	display:    block;
	height:     calc(100% - 84px);
	left:       0;
	position:   absolute;
	top:        0;
	width:      1px;
}

.ahs-mega-panel .ahs-col:first-child::before {
	display: none;
}

/* 7. Column heading */
.ahs-mega-panel .ahs-col-title {
	color:          #fff;
	display:        block;
	font-family:    "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
	font-size:      30px;
	font-weight:    800;
	letter-spacing: 1px;
	line-height:    1.05;
	margin:         0 0 48px;
	padding:        0;
	position:       relative;
	text-shadow:    0 2px 8px rgba(0, 0, 0, 0.45);
	text-transform: uppercase;
}

.ahs-mega-panel .ahs-col-title::after {
	background: var(--ahs-orange);
	bottom:     -22px;
	content:    "";
	display:    block;
	height:     4px;
	left:       0;
	position:   absolute;
	width:      64px;
}

/* 8. Link list */
.ahs-mega-panel .ahs-list,
.ahs-mega-panel .ahs-list > li {
	background: transparent;
	border:     0;
	list-style: none;
	margin:     0;
	padding:    0;
}

.ahs-mega-panel .ahs-list a {
	border-bottom:   1px solid var(--ahs-line);
	color:           rgba(255, 255, 255, 0.92);
	display:         block;
	font-size:       22px;
	font-weight:     400;
	line-height:     1.25;
	padding:         18px 0;
	text-decoration: none;
	text-shadow:     0 1px 5px rgba(0, 0, 0, 0.3);
}

.ahs-mega-panel .ahs-list > li:last-child a {
	border-bottom: 0;
}

.ahs-mega-panel .ahs-list a:hover,
.ahs-mega-panel .ahs-list a:focus {
	color: #fff;
}

/* 9. Responsive */
@media (max-width: 1024px) {
	.ahs-mega-panel {
		--ahs-panel-height: 360px;
	}

	.ahs-mega-panel .ahs-col-title {
		font-size: 24px;
	}

	.ahs-mega-panel,
	.ahs-mega-panel .ahs-col {
		padding-inline: 24px;
	}

	.ahs-mega-panel .ahs-list a {
		font-size: 18px;
	}
}

/* 10. Mobile — keep completely hidden, Astra handles mobile toggle */
@media (max-width: 920px) {
	.ahs-mega-panel {
		display: none !important;
	}

	/* Restore Astra native submenus on mobile so hamburger still works */
	.ahs-ready .main-header-menu li.menu-item-has-children > ul.sub-menu {
		display:        revert !important;
		visibility:     revert !important;
		pointer-events: revert !important;
		height:         revert !important;
		overflow:       revert !important;
	}
}
