/**
 * AIBM mega menu: full-width sub-menu panels under the header.
 * Figma "Certification" / "About Us" frames:
 * - Band: #0F1396, padding-top 51, list max-width 1240, right-aligned,
 *   wrap, gap 14 (rows) / 6 (columns).
 * - Pill: min-height 44, padding 12 18 12 22, gap 12, radius 999,
 *   fill #E0F2FE @ 3.92%, 1px inside stroke #38BDF8 @ 37.65%,
 *   Spoof Regular 15 white, "+" icon 18×18.
 * Width follows the site-wide container (aibm-base.css).
 *
 * @package AIBM
 * @author  Sameer Ali N
 */

/* ---------- Panel (band) ---------- */
.aibm-header .aibm-mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 2;
	background: var(--aibm-color-primary);
	box-shadow: 0 24px 40px -24px rgba(4, 6, 60, .7);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition:
		opacity .3s var(--aibm-ease),
		transform .4s var(--aibm-anim-ease, var(--aibm-ease)),
		visibility 0s linear .4s;
}

/* Open state (JS). The :hover fallback only applies if aibm-mega.js never ran. */
.aibm-header .aibm-menu > li.is-open > .aibm-mega,
.aibm-header:not(.is-mega-ready) .aibm-menu > li:hover > .aibm-mega {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

/* While a panel opens, the search band fades out quickly */
.aibm-header.is-mega-open .aibm-search-panel {
	transition:
		opacity .2s var(--aibm-ease),
		transform .2s var(--aibm-ease),
		visibility 0s linear .2s;
}

.aibm-header .aibm-mega__inner {
	box-sizing: border-box;
	max-width: calc(var(--aibm-container, 1420px) + var(--aibm-header-pad-x) * 2);
	margin: 0 auto;
	padding: 51px var(--aibm-header-pad-x) 51px;
}

.aibm-header .aibm-mega__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 14px 6px;
	max-width: 1240px;
	margin: 0 0 0 auto;
	padding: 0;
	list-style: none;
}
.aibm-header .aibm-mega__list > li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Parent item while its panel is open ---------- */
.aibm-header .aibm-menu > li.is-open > a {
	background: var(--aibm-color-accent);
	box-shadow: none;
	color: var(--aibm-color-accent-text);
}
.aibm-header .aibm-menu > li.is-open > a .aibm-menu__caret {
	opacity: 1;
	transform: rotate(180deg);
}

/* ---------- Pills ---------- */
.aibm-header .aibm-mega__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 12px 18px 12px 22px;
	border-radius: 999px;
	background: rgba(224, 242, 254, .0392);
	box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .3765);
	color: #fff;
	font-family: var(--aibm-font-body);
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition:
		background-color .25s var(--aibm-ease),
		box-shadow .25s var(--aibm-ease),
		color .25s var(--aibm-ease),
		transform .25s var(--aibm-ease);
}
.aibm-header .aibm-mega__list > li > a:hover,
.aibm-header .aibm-mega__list > li > a:focus-visible {
	background: rgba(56, 189, 248, .16);
	box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .9);
	color: #fff;
	transform: translateY(-1px);
	outline: none;
}
.aibm-header .aibm-mega__list > li > a:focus {
	outline: none;
}

/* Current page inside the panel */
.aibm-header .aibm-mega__list > li.current-menu-item > a,
.aibm-header .aibm-mega__list > li.current_page_item > a {
	background: var(--aibm-color-accent);
	box-shadow: none;
	color: var(--aibm-color-accent-text);
}

.aibm-header .aibm-mega__label {
	display: inline-block;
}

.aibm-header .aibm-mega__plus {
	display: inline-flex;
	flex: 0 0 18px;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	transition: transform .35s var(--aibm-anim-ease, var(--aibm-ease));
}
.aibm-header .aibm-mega__plus svg {
	display: block;
	width: 18px;
	height: 18px;
}
.aibm-header .aibm-mega__list > li > a:hover .aibm-mega__plus,
.aibm-header .aibm-mega__list > li > a:focus-visible .aibm-mega__plus {
	transform: rotate(90deg);
}

/* ---------- Staggered entrance of pills ---------- */
.aibm-header .aibm-mega__list > li {
	opacity: 0;
	transform: translateY(8px);
	transition:
		opacity .35s var(--aibm-ease),
		transform .45s var(--aibm-anim-ease, var(--aibm-ease));
}
.aibm-header .aibm-menu > li.is-open .aibm-mega__list > li,
.aibm-header:not(.is-mega-ready) .aibm-menu > li:hover .aibm-mega__list > li {
	opacity: 1;
	transform: none;
	transition-delay: calc(var(--aibm-i, 0) * 22ms + 60ms);
}

/* ---------- Smaller desktops ---------- */
@media (max-width: 1279px) {
	.aibm-header .aibm-mega__inner {
		padding-top: 40px;
		padding-bottom: 40px;
	}
	.aibm-header .aibm-mega__list > li > a {
		padding: 10px 16px 10px 18px;
		font-size: 14px;
	}
}

/* Mobile uses the off-canvas accordion instead */
@media (max-width: 1099px) {
	.aibm-header .aibm-mega {
		display: none;
	}
}