/* Mt. Hood Guide: desktop mega menu (Front/MegaMenu.php). Phones and tablets keep Elementor's dropdown. */

.mhg-mega { display: none; }

@media (min-width: 1025px) {
	/* Elementor's own small dropdowns give way to the panels. */
	.mhg-mega-on .elementor-nav-menu--main li.mhg-has-mega > .sub-menu { display: none !important; }

	/* Anchor every panel to the full nav bar row instead of its menu item. */
	.mhg-mega-on .elementor-column:has(> .elementor-widget-wrap > .elementor-widget-nav-menu .mhg-has-mega),
	.mhg-mega-on .elementor-widget-wrap:has(> .elementor-widget-nav-menu .mhg-has-mega),
	.mhg-mega-on .elementor-widget-nav-menu:has(.mhg-has-mega),
	.mhg-mega-on .elementor-widget-nav-menu:has(.mhg-has-mega) > .elementor-widget-container,
	.mhg-mega-on .elementor-nav-menu--main:has(.mhg-has-mega),
	.mhg-mega-on .elementor-nav-menu--main > .elementor-nav-menu,
	.mhg-mega-on .elementor-nav-menu--main li.mhg-has-mega { position: static; }

	.mhg-mega-on .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .elementor-widget-nav-menu .mhg-has-mega) { position: relative; }

	.mhg-mega {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 60;
		text-align: left;
		cursor: default;
	}
	html:not(.mhg-mega-js) .mhg-mega-on li.mhg-has-mega:hover > .mhg-mega,
	.mhg-mega-on li.mhg-has-mega:focus-within > .mhg-mega,
	.mhg-mega-on li.mhg-has-mega.is-open > .mhg-mega {
		display: block;
		animation: mhg-mega-in .18s ease-out;
	}
	/* The open item keeps its hover colour while the pointer is in the panel. */
	.mhg-mega-on .elementor-nav-menu--main li.mhg-has-mega.is-open > a.elementor-item { color: #ffb703; }
	.mhg-mega-on .elementor-nav-menu--main li.mhg-has-mega.is-open > a.elementor-item::after { opacity: 1; transform: none; background-color: #ffb703; }
}

@keyframes mhg-mega-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}

.mhg-mega__in {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 300px;
	gap: 32px;
	padding: 28px 32px 30px;
	background: #fff;
	border-top: 3px solid #ffb703;
	border-radius: 0 0 16px 16px;
	box-shadow: 0 28px 50px -18px rgba(2, 48, 71, .45);
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	white-space: normal;
}

/* Intro */
.mhg-mega__intro { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-right: 8px; border-right: 1px solid #e6eaee; }
.mhg-mega__title { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 30px; font-weight: 500; line-height: 1.1; color: #023047; text-transform: uppercase; letter-spacing: 1px; }
.mhg-mega__blurb { font-size: 15px; line-height: 1.5; color: #4a5560; }
.mhg-mega-on .mhg-mega a.mhg-mega__cta {
	display: inline-flex;
	flex: 0 0 auto; /* Elementor's horizontal menu sets flex-grow on every link */
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 10px 16px;
	border-radius: 999px;
	background: #023047;
	color: #fff;
	font-family: "Oswald", "Arial Narrow", sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1.5px;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: normal;
	transition: background .2s, color .2s;
}
.mhg-mega-on .mhg-mega a.mhg-mega__cta:hover,
.mhg-mega-on .mhg-mega a.mhg-mega__cta:focus-visible { background: #ffb703; color: #023047; }

/* Links */
.mhg-mega__links { display: grid; gap: 6px 18px; align-content: start; }
.mhg-mega__links.is-cols-1 { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.mhg-mega__links.is-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mhg-mega__links.is-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mhg-mega-on .mhg-mega a.mhg-mega__link {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: 12px;
	color: #023047;
	line-height: 1.3;
	white-space: normal;
	transition: background .15s;
}
.mhg-mega-on .mhg-mega a.mhg-mega__link:hover,
.mhg-mega-on .mhg-mega a.mhg-mega__link:focus-visible { background: #f2f6f8; }
.mhg-mega-on .mhg-mega a.mhg-mega__link:focus-visible,
.mhg-mega-on .mhg-mega a.mhg-mega__cta:focus-visible,
.mhg-mega-on .mhg-mega a.mhg-mega__feature:focus-visible { outline: 2px solid #219ebc; outline-offset: 2px; }

.mhg-mega__icon {
	flex: 0 0 40px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #fff4d6;
	color: #c27c00;
	font-size: 17px;
	transition: background .15s, color .15s;
}
.mhg-mega__link:hover .mhg-mega__icon,
.mhg-mega__link:focus-visible .mhg-mega__icon { background: #ffb703; color: #023047; }
.mhg-mega__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mhg-mega__name { font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 15px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: #023047; }
.mhg-mega__count {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #e7f4f8;
	color: #136f86;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
	vertical-align: 1px;
}
.mhg-mega__desc { font-size: 13.5px; line-height: 1.4; color: #5b6670; }

/* Photo card */
.mhg-mega-on .mhg-mega a.mhg-mega__feature {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 220px;
	padding: 0;
	overflow: hidden;
	border-radius: 14px;
	background: #023047;
	color: #fff;
	white-space: normal;
}
.mhg-mega__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mhg-mega__feature:hover .mhg-mega__img { transform: scale(1.04); }
.mhg-mega__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 48, 71, .1) 0%, rgba(2, 48, 71, .6) 42%, rgba(2, 48, 71, .94) 100%); }
.mhg-mega__caption { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.mhg-mega__ftitle { text-shadow: 0 1px 8px rgba(0, 0, 0, .35); font-family: "Oswald", "Arial Narrow", sans-serif; font-size: 20px; font-weight: 500; letter-spacing: .5px; line-height: 1.2; text-transform: uppercase; }
.mhg-mega__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mhg-mega__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	backdrop-filter: blur(4px);
	font-size: 12.5px;
	line-height: 1.3;
	color: #fff;
}
.mhg-mega__chip i { color: #ffb703; }
.mhg-mega__chip.is-ok i { color: #7bd88f; }
.mhg-mega__chip.is-warn,
.mhg-mega__chip.is-alert { background: rgba(251, 133, 0, .9); }
.mhg-mega__chip.is-warn i,
.mhg-mega__chip.is-alert i { color: #fff; }

@media (min-width: 1025px) and (max-width: 1279px) {
	.mhg-mega__in { grid-template-columns: 200px minmax(0, 1fr) 240px; gap: 22px; padding: 24px; }
	.mhg-mega__links.is-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mhg-mega__title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.mhg-mega-on li.mhg-has-mega > .mhg-mega { animation: none !important; }
	.mhg-mega__img { transition: none; }
}
