/*
 * Custom header (masthead + desktop mega menu)
 * Converted from _header.scss + _mega-menu.scss.
 */

:root {
	/* colors */
	--blue-two: #D1DAE1;
	--secondary: #9AC2DE;

	/* fluid type scale (unitless px numbers, used inside clamp()/calc()) */
	--h2-min: 30;
	--h3-min: 22;
	--h3-max: 28;
	--h5-min: 16;
	--h5-max: 20;
}

/* grid */
#masthead .container,
#mega-menu .container {
	width: 100%;
	max-width: 1675px !important;
	margin-left: auto;
	margin-right: auto;
}

#mega-menu.is-open .container {
	margin-bottom: 80px;
}

#mega-menu.is-open .mega-menu-header-row {
	margin-top: 80px;
}

#masthead .row,
#mega-menu .row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -8px;
	margin-right: -8px;
}

#masthead .row>*,
#mega-menu .row>* {
	padding-left: 8px;
	padding-right: 8px;
}

.col-3 {
	flex: 0 0 25%;
	max-width: 25%;
}

.col-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.col-9 {
	flex: 0 0 75%;
	max-width: 75%;
}

.d-none {
	display: none !important;
}

@media (min-width: 1025px) {
	.col-lg-3 {
		flex: 0 0 25%;
		max-width: 25%;
	}

	.col-lg-4 {
		flex: 0 0 33.3333%;
		max-width: 33.3333%;
	}

	.col-lg-8 {
		flex: 0 0 66.6667%;
		max-width: 66.6667%;
	}

	.col-lg-9 {
		flex: 0 0 75%;
		max-width: 75%;
	}

	.d-lg-inline-block {
		display: inline-block !important;
	}

	.d-lg-block {
		display: block !important;
	}
}

/* utilities */
.d-flex {
	display: flex;
}

.flex-wrap {
	flex-wrap: wrap;
}

.align-items-center {
	align-items: center;
}

.justify-content-end {
	justify-content: flex-end;
}

.position-fixed {
	position: fixed;
}

.position-absolute {
	position: absolute;
}

.position-relative {
	position: relative;
}

.px-2 {
	padding-left: .5rem;
	padding-right: .5rem;
}

.mt-0 {
	margin-top: 0;
}

@media (min-width: 641px) {
	.px-sm-4 {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (min-width: 1676px) {
	.px-xxl-2 {
		padding-left: .5rem;
		padding-right: .5rem;
	}
}

@media (min-width: 1025px) {
	.pt-lg-2 {
		padding-top: .5rem;
	}
}

/* ==========================================================================
   masthead — from _header.scss
   ========================================================================== */

#masthead {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	transition: padding .3s ease, background-color .3s ease;
	padding-top: 4em;
}

#masthead .container-header-buttons,
#mobile-menu .container-header-buttons {
	gap: 16px;
}

#masthead .container-logo {
	gap: 10px;
}

#masthead.sticky {
	padding-top: 1em;
	padding-bottom: 1em;
	background: #4BA1C5;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

#masthead .container-logo .logo {
	height: auto;
}

#masthead .link-menu {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
}

#masthead .icon-hamburger {
	display: inline-block;
}

/* ==========================================================================
   mega menu — from _mega-menu.scss
   ========================================================================== */

#mega-menu {
	visibility: hidden;
	pointer-events: none;
}

#mega-menu.is-open .btn.transparent,
#mobile-menu .btn.transparent {
	border-color: #FFF;
	color: #FFF;
}

#mega-menu.is-open .btn.blue,
#mobile-menu .btn.blue {
	background: #fff;
	color: #004592;
}

@media screen and (min-width: 1025px) {
	#mega-menu {
		overflow-y: auto;
		transform: translateY(-100%);
		transition: transform .5s cubic-bezier(.16, 1, .3, 1);
		visibility: hidden;
		pointer-events: all;
		width: 100%;
		height: 100%;
		z-index: 1001;
	}

	#mega-menu.is-open {
		transform: translateY(0);
		visibility: visible;
		top: 0;
	}

	#mega-menu .container-logo {
		gap: 10px;
	}

	#mega-menu>.position-relative {
		min-height: 100%;
		height: auto;
	}

	#mega-menu .container-row-second {
		margin-top: 6rem;
		overflow-y: auto;
	}

	#mega-menu h2 {
		color: #FFF;
	}

	#mega-menu .container-header-buttons {
		gap: 16px;
	}

	/* our markup outputs a plain <img>, not <picture> — object-fit added so it doesn't distort */
	#mega-menu picture,
	#mega-menu img.position-absolute {
		width: 100% !important;
		height: 100% !important;
		max-width: 100% !important;
		max-height: 100% !important;
		object-fit: cover;
	}

	#mega-menu picture img {
		min-height: 100% !important;
		width: 100% !important;
	}

	#mega-menu ul {
		padding-left: 0;
	}

	#mega-menu ul li {
		list-style-type: none;
	}

	#mega-menu li.menu-item-has-children>a {
		color: #FFF;
		font-size: 34px;
		line-height: 44px;
		display: block;
		margin-bottom: 12px;
		font-family: 'Mirante Semibold';
		font-weight: 600;
		text-transform: capitalize;
	}

	#mega-menu li.menu-item-has-children:nth-child(2),
	#mega-menu li.menu-item-has-children:nth-child(3) {
		margin-top: 3em;
	}

	#mega-menu li.menu-item-has-children .sub-menu {
		margin-top: 0;
	}

	#mega-menu li.menu-item-has-children .sub-menu li {
		margin-bottom: 12px;
	}

	#mega-menu li.menu-item-has-children .sub-menu a {
		color: #FFF;
		font-style: normal;
		font-weight: 500;
		letter-spacing: 3.2px;
		text-transform: uppercase;
		font-size: clamp(calc(var(--h5-min) / 16 * 1rem),
				calc(var(--h5-min) * 1px + (var(--h5-max) - var(--h5-min)) * ((100vw - 640px) / 1280)),
				calc(var(--h5-max) / 16 * 1rem));
		line-height: normal;
	}

	#mega-menu li.menu-item-has-children .sub-menu a:hover,
	#mega-menu li.menu-item-has-children a:hover {
		color: var(--blue-two) !important;
		text-decoration: none;
	}

	#mega-menu .mega-menu-services {
		margin-top: 64px;
		gap: 1.5rem;
	}

	#mega-menu .mega-menu-parents {
		min-width: 398px;
	}

	#mega-menu .mega-menu-parent {
		color: #FFF;
		margin-bottom: 44px;
		display: flex;
		flex-direction: column;
		font-size: 32px;
		font-weight: 600;
		line-height: 44px;
		text-transform: capitalize;
		font-family: 'Mirante Semibold';
	}

	#mega-menu .mega-menu-parent.active,
	#mega-menu .mega-menu-parent:hover,
	#mega-menu .children-group a:hover {
		color: var(--blue-two) !important;
		text-decoration: none;
	}

	#mega-menu .header-menu-list {
		margin-top: 0;
		margin-bottom: 0;
		border-right: 1px solid #5583B6;
	}

	#mega-menu .children-group a {
		color: #FFF;
		font-size: 20px;
		font-style: normal;
		font-weight: 500;
		line-height: 39px;
		letter-spacing: 3.2px;
		text-transform: uppercase;
		margin-bottom: 10px;
	}

	#mega-menu .inner-column {
		padding-left: 3.5em;
		text-transform: capitalize;
	}

	#mega-menu .children-group {
		display: none;
	}

	#mega-menu .children-group.active {
		display: flex;
		flex-direction: column;
	}
}

@media screen and (min-width: 1640px) {
	#mega-menu .inner-column {
		padding-left: 6em;
	}
}

/* buttons — placeholder colors, no matching SCSS partial supplied yet */
.btn {
	display: inline-block;
	padding: 13px 32px;
	text-decoration: none !important;
	line-height: 1.2;
	cursor: pointer;
}

.btn.blue {
	background: #004592;
	color: #fff;
}

.btn.transparent {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
}

body.mega-menu-open {
	overflow: hidden;
}

/* backdrop appended by js/header-custom.js on mega-menu open — no matching SCSS partial, my own addition */
.mega-menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(0, 0, 0, .4);
}

/* ==========================================================================
   mobile menu — from _mobile-menu.scss
   markup (#mobile-menu, .background-mobile) doesn't exist yet — kept ready to go.
   ========================================================================== */

.background-mobile {
	display: none;
}

.background-mobile.show {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	min-height: 100vh;
	background: rgba(0, 0, 0, .7);
	z-index: 1000;
	display: block;
}

#mobile-menu {
	display: flex;
	flex-direction: column;
	max-width: 480px;
	right: -480px;
	top: 0;
	bottom: 0;
	position: fixed;
	width: 100%;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
	height: 100vh;
	height: -webkit-fill-available;
	height: 100dvh;
}

#mobile-menu .container-header-buttons {
	justify-content: center;
	margin-bottom: 48px;
}

@supports not (height: 100dvh) {
	#mobile-menu {
		height: calc(100vh - 80px);
	}
}

#mobile-menu #menu-mobile li {
	width: fit-content;
}

#mobile-menu .sub-menu {
	padding-left: 0;
	margin-top: 0;
}

#mobile-menu .sub-menu li {
	list-style: none;
}

#mobile-menu .sub-menu a {
	color: #FFF;
	font-size: 16px;
	font-style: normal;
	font-weight: 500;
	line-height: normal;
	letter-spacing: 2.56px;
	text-transform: uppercase;
	display: block;
	margin-bottom: 25px;
}

/* our markup outputs a plain <img>, not <picture> — object-fit added so it doesn't distort */
#mobile-menu picture,
#mobile-menu img.position-absolute {
	max-width: 100% !important;
	max-height: 100% !important;
	height: 100% !important;
	width: 100% !important;
	pointer-events: none;
	object-fit: cover;
	z-index: -1;
}

#mobile-menu picture img {
	width: 100%;
	min-height: 222%;
}

#mobile-menu .mobile-menu li:last-child a {
	border-bottom: 0;
}

#mobile-menu .container-logo {
	max-width: 300px;
	gap: 8px;
	margin-bottom: 16px;
}

#mobile-menu .btn.blue,
#mobile-menu .btn.transparent {
	margin-top: 16px;
}

#mobile-menu .mobile-nav-menu {
	list-style: none;
	padding-left: 0;
	margin-top: 2em;
	margin-bottom: 0;
}

#mobile-menu .mobile-nav-menu a {
	color: #FFF;
	width: fit-content;
}

#mobile-menu .mobile-nav-menu a:hover,
#mobile-menu .mobile-menu-services li.menu-item-has-children a:hover {
	color: #9AC2DE;
	text-decoration: none;
}

#mobile-menu li.menu-item-has-children>a {
	font-size: clamp(calc(var(--h3-min) / 16 * 1rem),
			calc(var(--h3-min) * 1px + (var(--h3-max) - var(--h3-min)) * ((100vw - 640px) / 1280)),
			calc(var(--h3-max) / 16 * 1rem));
	line-height: clamp(calc(27 / 16 * 1rem),
			calc(27px + (34 - 27) * ((100vw - 640px) / 1280)),
			calc(34 / 16 * 1rem));
	margin-bottom: 18px;
	display: block;
	color: #FFF;
}

#mobile-menu li.menu-item-has-children {
	margin-top: 4em;
}

#mobile-menu .line-divider {
	height: 1px;
	width: 100%;
	background: #4BA1C5;
	margin-top: 42px;
	margin-bottom: 32px;
}

#mobile-menu p.h2 {
	color: #FFF;
	font-size: clamp(calc(var(--h2-min) / 16 * 1rem),
			calc(var(--h2-min) * 1px + (40 - var(--h2-min)) * ((100vw - 640px) / 1280)),
			calc(40 / 16 * 1rem));
	line-height: clamp(calc(40 / 16 * 1rem),
			calc(40px + (60 - 40) * ((100vw - 640px) / 1280)),
			calc(60 / 16 * 1rem));
	text-transform: capitalize;
	margin-bottom: 24px;
}

#mobile-menu .mobile-menu-services {
	padding-left: 0;
}

#mobile-menu .mobile-menu-services li {
	list-style: none;
}

#mobile-menu .mobile-menu-services .sub-menu {
	padding-left: 2rem;
	display: none;
}

#mobile-menu .mobile-menu-services li.menu-item-has-children>a {
	margin-bottom: 24px;
}