/* Stravum Builder — Mega Menu family (mega-menu, -item, -column, -link, -promo).

   SCOPE OF THIS FILE
   Appearance and desktop layout, breakpoint-agnostic. The desktop-bar ⇄
   mobile-drawer switch is NOT here: the breakpoint is a per-instance setting,
   so widgets/mega-menu.php emits a scoped @media block per instance
   (st_mm_responsive_css()). Open/close STATE classes (.is-open,
   .is-drawer-open) are added by assets/widgets.js and styled here.

   !important DISCIPLINE — READ BEFORE EDITING
   This header has already shipped a half-applied override once: a dark
   background got !important, the matching text colour did not, some other
   global-styles rule kept winning, and the text rendered black on black. So
   every colour / background-color / border-color declaration below carries
   !important, applied ACROSS THE WHOLE related rule set — default state AND
   hover AND open state together, never just one of them. The style engine's
   per-instance rules for this widget family are also emitted with !important
   (see the widget files), and `.st-el-{uid} .st-mm-x` outranks a bare
   `.st-mm-x`, so editor settings still win cleanly.

   Palette matches the rest of the site: surface #10131a / #12151c / #191c23,
   accent #fd5b38, accent-light #ffb4a4, text #fff, muted #a9adc1. */

/* ============================================================== The bar. */

.st-mm {
	display: flex;
	align-items: center;
	position: relative; /* containing block for "wide" panels. */
}

/* On desktop this element is just the bar's list wrapper — it MUST stay
   transparent, because below the breakpoint the very same element becomes the
   off-canvas drawer and gets its dark surface from the per-instance @media
   block (and from the drawer_bg control, which is scoped to .is-mobile). */
.st-mm-drawer {
	display: block;
	background: transparent !important;
}

.st-mm-list {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.st-mm-item {
	position: relative;
	display: flex;
	align-items: center;
}

/* "wide" and "full" panels resolve against .st-mm / the viewport instead of
   the item, so those items must not create a containing block. */
.st-mm-item.is-layout-wide,
.st-mm-item.is-layout-full {
	position: static;
}

/* ---------------------------------------------- Top-level trigger / link. */

.st-mm-trigger,
.st-mm-toplink {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	margin: 0;
	padding: 9px 4px;
	border: 0;
	border-radius: 10px;
	background: transparent !important;
	color: #e0e2ec !important;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.st-mm-trigger:hover,
.st-mm-toplink:hover,
.st-mm-trigger:focus-visible,
.st-mm-toplink:focus-visible,
.st-mm-item.is-open > .st-mm-trigger {
	color: #ffb4a4 !important;
	background: transparent !important;
}

.st-mm-trigger:focus-visible,
.st-mm-toplink:focus-visible,
.st-mm-burger:focus-visible,
.st-mm-close:focus-visible,
.st-mm-col-head:focus-visible,
.st-mm-link:focus-visible,
.st-mm-more:focus-visible,
.st-mm-promo-btn:focus-visible {
	outline: 2px solid #fd5b38;
	outline-offset: 2px;
}

.st-mm-arrow {
	display: none; /* desktop: the caret only earns its space on mobile rows. */
	font-size: 20px;
	line-height: 1;
	color: inherit !important;
	transition: transform 0.25s ease;
}

.st-mm-item.is-layout-wide > .st-mm-trigger .st-mm-arrow,
.st-mm-item.is-layout-full > .st-mm-trigger .st-mm-arrow,
.st-mm-item.is-layout-auto > .st-mm-trigger .st-mm-arrow {
	display: inline-flex; /* triggers always show a caret — it signals the panel. */
}

.st-mm-item.is-open > .st-mm-trigger .st-mm-arrow {
	transform: rotate(180deg);
}

.st-mm-badge {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(253, 91, 56, 0.16) !important;
	color: #ffb4a4 !important;
	font-family: "Geist", sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
}

/* ============================================================== The panel. */

.st-mm-panel {
	position: absolute;
	top: 100%;
	z-index: 120;
	margin-top: 14px;
	box-sizing: border-box;
	min-width: 260px;
	background: #12151c !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.st-mm-item.is-open > .st-mm-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

/* An invisible bridge across the gap between the trigger and the panel, so a
   mouse travelling down does not cross "nothing" and trigger a close. The
   hover-intent delay in widgets.js covers the rest. */
.st-mm-item.has-panel > .st-mm-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -18px;
	height: 18px;
}

/* auto — sized to content, aligned to the item. */
.st-mm-item.is-layout-auto.is-align-left > .st-mm-panel { left: 0; right: auto; }
.st-mm-item.is-layout-auto.is-align-right > .st-mm-panel { right: 0; left: auto; }

/* wide — centred on the bar, capped. */
.st-mm-item.is-layout-wide > .st-mm-panel {
	left: 50%;
	width: max-content;
	max-width: min(1100px, calc(100vw - 48px));
	transform: translateX(-50%) translateY(8px);
}
.st-mm-item.is-layout-wide.is-open > .st-mm-panel {
	transform: translateX(-50%) translateY(0);
}

/* full — edge to edge. Fixed rather than absolute so the viewport is the
   containing block; widgets.js keeps --st-mm-top in sync with the bar's
   bottom edge (the header is sticky, so it changes rarely but it does change
   on resize). */
.st-mm-item.is-layout-full > .st-mm-panel {
	position: fixed;
	top: var(--st-mm-top, 100%);
	left: 0;
	right: 0;
	width: auto;
	margin-top: 0;
	border-left: 0 !important;
	border-right: 0 !important;
	border-radius: 0;
}

.st-mm-panel-inner {
	padding: 28px 32px;
}

.st-mm-cols {
	display: flex;
	align-items: flex-start;
	gap: 36px;
}

/* ============================================================== Columns. */

.st-mm-col {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
}

.st-mm-col:not(:first-child) {
	padding-left: 0;
}

.st-mm-col-head {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: transparent !important;
	color: inherit;
	font: inherit;
	text-align: left;
	pointer-events: none; /* desktop: it is a heading, not a control. */
	cursor: default;
}

.st-mm-col-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 7px;
	border-radius: 8px;
	background: rgba(253, 91, 56, 0.1) !important;
	color: #fd5b38 !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.st-mm-col-icon .material-symbols-outlined {
	font-size: 18px;
	line-height: 1;
}

.st-mm-col-title {
	flex: 1 1 auto;
	color: #ffffff !important;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.st-mm-col-arrow {
	display: none;
	flex: 0 0 auto;
	font-size: 20px;
	line-height: 1;
	color: #a9adc1 !important;
	transition: transform 0.25s ease;
}

.st-mm-col.is-open > .st-mm-col-head .st-mm-col-arrow {
	transform: rotate(180deg);
}

.st-mm-col-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* ============================================================== Links. */

.st-mm-link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
	padding: 9px 10px;
	border-radius: 12px;
	background: transparent !important;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}

.st-mm-link:hover,
.st-mm-link:focus-visible {
	background: rgba(255, 255, 255, 0.05) !important;
}

/* Plain density (no description): a tight text list, no icon slot reserved. */
.st-mm-link.is-plain {
	align-items: center;
	padding: 7px 10px;
}

.st-mm-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-top: 1px;
	padding: 8px;
	border-radius: 10px;
	background: rgba(253, 91, 56, 0.1) !important;
	color: #fd5b38 !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.st-mm-link.is-plain .st-mm-link-icon {
	margin-top: 0;
	padding: 0;
	background: transparent !important;
	color: #ffb4a4 !important;
}

.st-mm-link-icon .material-symbols-outlined {
	font-size: 20px;
	line-height: 1;
}

.st-mm-link:hover .st-mm-link-icon {
	background: rgba(253, 91, 56, 0.2) !important;
	color: #fd5b38 !important;
}

.st-mm-link.is-plain:hover .st-mm-link-icon {
	background: transparent !important;
	color: #fd5b38 !important;
}

.st-mm-link-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.st-mm-link-title {
	color: #e6e8f0 !important;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;
}

.st-mm-link.has-desc .st-mm-link-title {
	color: #ffffff !important;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 15px;
	font-weight: 700;
}

.st-mm-link.is-plain .st-mm-link-title {
	font-weight: 500;
}

.st-mm-link:hover .st-mm-link-title,
.st-mm-link:focus-visible .st-mm-link-title {
	color: #ffb4a4 !important;
}

.st-mm-link-desc {
	color: #a9adc1 !important;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.6;
}

.st-mm-link:hover .st-mm-link-desc,
.st-mm-link:focus-visible .st-mm-link-desc {
	color: #c4c7cf !important;
}

/* ============================================================== Panel footer. */

.st-mm-panel-foot {
	display: flex;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.st-mm-more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	border: 1px solid rgba(253, 91, 56, 0.35) !important;
	border-radius: 999px;
	background: rgba(253, 91, 56, 0.08) !important;
	color: #ffb4a4 !important;
	font-family: "Geist", sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.st-mm-more .material-symbols-outlined {
	font-size: 16px;
	line-height: 1;
	color: inherit !important;
}

.st-mm-more:hover,
.st-mm-more:focus-visible {
	background: #fd5b38 !important;
	border-color: #fd5b38 !important;
	color: #ffffff !important;
}

/* ============================================================== Promo card. */

.st-mm-promo {
	flex: 0 0 280px;
	width: 280px;
	box-sizing: border-box;
	padding: 22px;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 16px;
	/* background-COLOR, not the shorthand: the card_bg control sets
	   background-color, and a shorthand default here would leave a
	   background-image behind that quietly painted over the editor's choice. */
	background-color: #171b26 !important;
}

.st-mm-promo-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	margin: 0 0 14px;
	border-radius: 12px;
}

.st-mm-promo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 14px;
	padding: 11px;
	border-radius: 12px;
	background: rgba(253, 91, 56, 0.12) !important;
	color: #fd5b38 !important;
}

.st-mm-promo-icon .material-symbols-outlined {
	font-size: 26px;
	line-height: 1;
}

.st-mm-promo-stat {
	color: #fd5b38 !important;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.st-mm-promo-title {
	margin-top: 6px;
	color: #ffffff !important;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.st-mm-promo-body {
	margin: 8px 0 0;
	color: #a9adc1 !important;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 13px;
	line-height: 1.6;
}

.st-mm-promo-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 16px;
	padding: 10px 16px;
	border-radius: 10px;
	background: #fd5b38 !important;
	/* Was #ffffff — measured 3.12:1 on this background, below the 4.5:1 WCAG
	   AA floor for normal-size text. #590c00 is theme.json's own
	   on-primary-container token (the color already designed to sit on top
	   of the primary/orange surface) and measures 4.53:1 here — accessible
	   AND more on-spec than the white it replaces. */
	color: #590c00 !important;
	font-family: "Geist", sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.st-mm-promo-btn .material-symbols-outlined {
	font-size: 17px;
	line-height: 1;
	color: inherit !important;
	transition: transform 0.2s ease;
}

.st-mm-promo-btn:hover,
.st-mm-promo-btn:focus-visible {
	background: #ff6f4f !important;
	color: #590c00 !important;
}

.st-mm-promo-btn:hover .material-symbols-outlined {
	transform: translateX(3px);
}

/* ============================================================== Hamburger. */

.st-mm-burger {
	display: none; /* the per-instance @media block shows it below the breakpoint. */
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 0;
	border-radius: 10px;
	background: transparent !important;
	color: #ffffff !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.st-mm-burger:hover {
	color: #ffb4a4 !important;
	background: rgba(255, 255, 255, 0.06) !important;
}

.st-mm-burger-box {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 24px;
	height: 16px;
}

.st-mm-burger-box > span {
	display: block;
	height: 2px;
	width: 100%;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.st-mm.is-drawer-open .st-mm-burger-box > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.st-mm.is-drawer-open .st-mm-burger-box > span:nth-child(2) { opacity: 0; }
.st-mm.is-drawer-open .st-mm-burger-box > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================== Drawer chrome. */

.st-mm-scrim {
	display: none; /* shown below the breakpoint by the per-instance @media block. */
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(6, 8, 12, 0.66) !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.st-mm.is-drawer-open .st-mm-scrim {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.st-mm-drawer-head {
	display: none; /* shown below the breakpoint by the per-instance @media block. */
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex: 0 0 auto;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.st-mm-drawer-title {
	color: #a9adc1 !important;
	font-family: "Geist", sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.st-mm-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border: 0;
	border-radius: 8px;
	background: transparent !important;
	color: #ffffff !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.st-mm-close:hover {
	color: #fd5b38 !important;
	background: rgba(255, 255, 255, 0.06) !important;
}

.st-mm-close .material-symbols-outlined {
	font-size: 24px;
	line-height: 1;
	color: inherit !important;
}

/* Scroll lock while a drawer is open (set on <html> by widgets.js). */
html.st-mm-lock,
html.st-mm-lock body {
	overflow: hidden;
}

/* ---------------------------- The portal host ------------------------------
   While the drawer is open, widgets.js moves the drawer + scrim onto a host
   element appended to <body>, because ANY ancestor with backdrop-filter /
   filter / transform / will-change / contain becomes the containing block for
   position:fixed and would collapse the drawer to that ancestor's box. This
   site's own header does exactly that (backdrop-filter:blur(20px) for the
   frosted-glass bar), which pinned the drawer to 86px instead of the full
   844px viewport — see the long comment in widgets.js.

   The host mirrors the nav's ENTIRE class list so every descendant selector
   still matches (.st-el-{uid} .st-mm-drawer from the per-instance @media
   block, .st-mm.is-mobile cosmetics, the style engine's instance rules). That
   inherited .st-mm would otherwise make the host a flex box in normal flow, so
   it is flattened to a zero-footprint wrapper here. Both its children are
   position:fixed, so it needs no size of its own — and it must never inherit
   the bar's own background or spacing. */
.st-mm-portal {
	display: block !important;
	position: static !important;
	/* Never clip: the drawer this hosts is the full-height overlay, and the
	   per-instance @media block keys the drawer's off-canvas start position on
	   this host's own .st-mm-portal class. */
	overflow: visible !important;
	width: auto !important;
	max-width: none !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	z-index: auto !important;
}

/* ==============================================================
   Mobile-only appearance. These are keyed on .is-mobile (added by widgets.js
   from the same breakpoint the @media block uses) rather than on a hard-coded
   media query, because the breakpoint is per-instance. They are pure
   cosmetics — rows, indents, dividers — so the brief moment before
   widgets.js runs shows correct layout with default spacing, never a
   broken or invisible menu.
   ============================================================== */

.st-mm.is-mobile .st-mm-trigger,
.st-mm.is-mobile .st-mm-toplink {
	padding: 15px 20px;
	border-radius: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #ffffff !important;
}

/* Kept at three classes (not four) so a per-item label_hover setting, which
   compiles to `.st-el-{uid}.is-open > .st-mm-trigger`, can still win on ties. */
.st-mm.is-mobile .st-mm-trigger:hover,
.st-mm.is-mobile .st-mm-toplink:hover,
.st-mm.is-mobile .is-open > .st-mm-trigger {
	color: #fd5b38 !important;
	background: rgba(255, 255, 255, 0.03) !important;
}

/* Level 2 — column heads become accordion rows, indented under their item. */
.st-mm.is-mobile .st-mm-col-head {
	margin: 0;
	padding: 13px 20px 13px 32px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
	pointer-events: auto;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.02) !important;
}

.st-mm.is-mobile .st-mm-col-head:hover .st-mm-col-title {
	color: #fd5b38 !important;
}

.st-mm.is-mobile .st-mm-col-title {
	color: #e6e8f0 !important;
	font-size: 14px;
	font-weight: 600;
}

/* Level 3 — the links themselves, indented one step further. */
.st-mm.is-mobile .st-mm-col-list {
	gap: 0;
	padding: 4px 0;
}

.st-mm.is-mobile .st-mm-link {
	padding: 11px 20px 11px 44px;
	border-radius: 0;
	align-items: flex-start;
}

.st-mm.is-mobile .st-mm-col.has-no-head .st-mm-link {
	padding-left: 32px; /* un-headed columns lose one level of indent. */
}

.st-mm.is-mobile .st-mm-link-title {
	color: #d6d9e3 !important;
	font-size: 14px;
}

.st-mm.is-mobile .st-mm-link.has-desc .st-mm-link-title {
	color: #ffffff !important;
	font-size: 14.5px;
}

.st-mm.is-mobile .st-mm-link-desc {
	color: #a9adc1 !important;
	font-size: 12.5px;
}

.st-mm.is-mobile .st-mm-link:hover .st-mm-link-title {
	color: #fd5b38 !important;
}

.st-mm.is-mobile .st-mm-panel-foot {
	margin: 6px 0 0;
	padding: 14px 20px 18px 32px;
}

.st-mm.is-mobile .st-mm-promo {
	width: auto !important;
	flex: 1 1 auto;
	margin: 12px 20px 16px 32px;
}

/* ============================================================== Motion. */

@media (prefers-reduced-motion: reduce) {
	.st-mm-panel,
	.st-mm-scrim,
	.st-mm-drawer,
	.st-mm-arrow,
	.st-mm-col-arrow,
	.st-mm-col-body,
	.st-mm-link,
	.st-mm-more,
	.st-mm-promo-btn,
	.st-mm-burger-box > span {
		transition: none !important;
	}

	.st-mm-promo-btn:hover .material-symbols-outlined {
		transform: none;
	}
}
