/* "Our Services" mega menu (terra-bio/inc/angel-mega-menu.php). Desktop only. */

#angel-hdr {
	--mega-ink: #232f40;
	--mega-muted: #5d6878;
	--mega-line: #e7eaef;
	--mega-soft: #f6f7f9;
	--mega-accent: var(--angel-hdr-cta, #f2295b);
	--mega-accent-soft: #fdebf0;
}

/* The panel spans the header, so the parent <li> must not be the containing block. */
#angel-hdr .angel-hdr__menu > li.angel-has-mega { position: static; }
#angel-hdr .angel-hdr__menu > li.angel-has-mega > .sub-menu { display: none; }

/* Hover bridge from the link down to the panel so the menu doesn't close in the gap. */
#angel-hdr .angel-has-mega > a { position: relative; }
#angel-hdr .angel-has-mega > a::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 36px;
}
#angel-hdr.is-scrolled .angel-has-mega > a::before { height: 18px; }

#angel-hdr .angel-mega {
	position: absolute;
	top: 100%;
	left: 50%;
	width: min(1200px, calc(100vw - 48px));
	padding-top: 10px;
	color: var(--mega-ink);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	cursor: default;
}
#angel-hdr .angel-has-mega:hover > .angel-mega,
#angel-hdr .angel-has-mega:focus-within > .angel-mega {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition-delay: .06s, .06s, 0s;
}
/* Rotate the chevron while open. */
#angel-hdr .angel-has-mega:is(:hover, :focus-within) > a::after { transform: rotate(-135deg); margin-bottom: -1px; }

#angel-hdr .angel-mega__inner {
	display: grid;
	grid-template-columns: 270px 1fr 280px;
	gap: 8px;
	padding: 10px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(12, 15, 36, .28), 0 2px 6px rgba(12, 15, 36, .08);
}

#angel-hdr .angel-mega p { margin: 0; }
#angel-hdr .angel-mega a { text-decoration: none; }
#angel-hdr .angel-mega__eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--mega-accent);
}

/* ---------- Intro column ---------- */
#angel-hdr .angel-mega__intro {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px 26px;
	background: var(--mega-soft);
	border-radius: 12px;
}
#angel-hdr .angel-mega__heading {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--mega-ink);
}
#angel-hdr .angel-mega__text {
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--mega-muted);
}
#angel-hdr .angel-mega__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--mega-ink);
	white-space: nowrap;
}
#angel-hdr .angel-mega__all .angel-mega__svg { width: 18px; height: 18px; color: var(--mega-accent); transition: transform .2s ease; }
#angel-hdr .angel-mega__all:hover .angel-mega__svg,
#angel-hdr .angel-mega__all:focus-visible .angel-mega__svg { transform: translateX(4px); }

#angel-hdr .angel-mega__phone {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding: 14px 0 0;
	border-top: 1px solid var(--mega-line);
	font-size: 17px;
	font-weight: 700;
	color: var(--mega-ink);
	white-space: nowrap;
}
#angel-hdr .angel-mega__phone small {
	display: block;
	margin-bottom: 2px;
	font-size: 12px;
	font-weight: 500;
	color: var(--mega-muted);
}
#angel-hdr .angel-mega__phone-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--mega-ink);
	color: #fff;
}
#angel-hdr .angel-mega__phone-icon .angel-mega__svg { width: 18px; height: 18px; }
#angel-hdr .angel-mega__phone:hover .angel-mega__phone-icon { background: var(--mega-accent); }

/* ---------- Service cards ---------- */
#angel-hdr .angel-mega__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-content: start;
	gap: 2px 6px;
	margin: 0;
	padding: 14px 10px;
	list-style: none;
}
#angel-hdr .angel-mega__card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	color: var(--mega-ink);
	white-space: normal;
	transition: background-color .2s ease;
}
#angel-hdr .angel-mega__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--mega-accent-soft);
	color: var(--mega-accent);
	transition: background-color .2s ease, color .2s ease;
}
#angel-hdr .angel-mega__card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
#angel-hdr .angel-mega__card-title { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
#angel-hdr .angel-mega__card-text { font-size: 13.5px; font-weight: 400; line-height: 1.45; color: var(--mega-muted); }

#angel-hdr .angel-mega__card:hover,
#angel-hdr .angel-mega__card:focus-visible,
#angel-hdr .angel-mega__card.is-current { background: var(--mega-soft); }
#angel-hdr .angel-mega__card:hover .angel-mega__icon,
#angel-hdr .angel-mega__card:focus-visible .angel-mega__icon,
#angel-hdr .angel-mega__card.is-current .angel-mega__icon { background: var(--mega-accent); color: #fff; }
#angel-hdr .angel-mega__card.is-current .angel-mega__card-title { color: var(--mega-accent); }

/* ---------- Promo card ---------- */
#angel-hdr .angel-mega__promo {
	position: relative;
	display: flex;
	min-height: 320px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--mega-ink);
	isolation: isolate;
}
#angel-hdr .angel-mega__promo img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .6s ease;
}
#angel-hdr .angel-mega__promo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(35, 47, 64, 0) 20%, rgba(35, 47, 64, .78) 55%, rgba(35, 47, 64, .96) 100%);
}
#angel-hdr .angel-mega__promo:hover img { transform: scale(1.04); }
#angel-hdr .angel-mega__promo-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-self: flex-end;
	padding: 22px;
	color: #fff;
}
#angel-hdr .angel-mega__promo .angel-mega__eyebrow { color: #ffb3c6; }
#angel-hdr .angel-mega__promo-heading { font-size: 20px; font-weight: 700; line-height: 1.25; color: #fff; }
#angel-hdr .angel-mega__promo-text { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
#angel-hdr .angel-mega__promo-cta {
	align-self: flex-start;
	margin-top: 8px;
	padding: 11px 20px;
	border-radius: 7px;
	background: var(--mega-accent);
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}
#angel-hdr .angel-mega__promo-cta:hover,
#angel-hdr .angel-mega__promo-cta:focus-visible { background: #fff; color: var(--mega-ink); }

#angel-hdr .angel-mega a:focus-visible { box-shadow: 0 0 0 2px var(--mega-accent); }

/* "Don't see your project?" filler card (odd number of services). */
#angel-hdr .angel-mega__card--ask { border: 1.5px dashed var(--mega-line); }
#angel-hdr .angel-mega__card--ask .angel-mega__icon { background: var(--mega-soft); color: var(--mega-ink); }
#angel-hdr .angel-mega__card--ask .angel-mega__card-title { color: var(--mega-accent); }
#angel-hdr .angel-mega__card--ask:hover { border-color: transparent; }

/* Narrower desktops: drop the promo card. */
@media (max-width: 1199px) {
	#angel-hdr .angel-mega__inner { grid-template-columns: 250px 1fr; }
	#angel-hdr .angel-mega__promo { display: none; }
}
@media (max-width: 1024px) {
	#angel-hdr .angel-mega { display: none; }
}
