/* Nav Panels — self-contained styles. Override the variables below in your
 * theme's CSS to match your brand; everything else works unmodified. */
.np {
	--np-text: inherit;
	--np-accent: #e53935;
	--np-heading: #0f172a;
	--np-body: #1e293b;
	--np-muted: #64748b;
	--np-border: #f1f5f9;
	--np-panel-border: #e2e8f0;
	--np-panel-bg: #fff;
	--np-featured-bg: #f8fafc;
	--np-cta-bg: #0f172a;
	--np-cta-bg-hover: #1e293b;
	--np-secondary-bg: #e53935;
	--np-secondary-bg-hover: #c62828;
	--np-radius: 16px;
	--np-width: 1120px;
	--np-z: 99999;

	position: relative;
	display: inline-flex;
	align-items: center;
}

.np__trigger {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: none;
	padding: 4px 12px;
	font: inherit;
	text-decoration: none;
	color: var(--np-text);
	cursor: pointer;
	background: transparent;
	white-space: nowrap;
	transition: opacity 0.15s;
}
.np__trigger:hover { opacity: 0.75; text-decoration: none; }

.np__chevron {
	width: 10px;
	height: 6px;
	transition: transform 0.2s;
	flex-shrink: 0;
}
.np:hover .np__chevron,
.np:focus-within .np__chevron,
.np.is-open .np__chevron { transform: rotate(180deg); }

/* Invisible hover bridge — a no-JS fallback only. With JS enabled, position
 * and open/close timing are handled live by nav-panels.js, which is what
 * actually makes this stable regardless of header height. */
.np::after {
	content: '';
	display: block;
	position: absolute;
	top: 100%;
	left: -100px;
	right: -100px;
	height: 64px;
	background: transparent;
}

.np__dropdown {
	display: block;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	position: fixed;
	top: 88px; /* no-JS fallback estimate only; JS overrides this inline on open */
	left: 50%;
	transform: translateX(-50%);
	width: var(--np-width);
	max-width: 96vw;
	background: var(--np-panel-bg);
	border: 1px solid var(--np-panel-border);
	border-top: none;
	border-radius: 0 0 var(--np-radius) var(--np-radius);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.13);
	z-index: var(--np-z);
	overflow: hidden;
}
.np:hover .np__dropdown,
.np:focus-within .np__dropdown,
.np.is-open .np__dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Wins over the :hover/:focus-within fallback above, which would otherwise
 * keep the panel visually open for as long as the cursor hasn't moved after
 * a click — e.g. clicking a link that opens a JS modal instead of
 * navigating away. See nav-panels.js. */
.np.force-closed .np__dropdown {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.np__inner {
	display: grid;
}

.np__col {
	padding: 18px 24px 28px;
	border-right: 1px solid var(--np-border);
	display: flex;
	flex-direction: column;
}
.np__col:last-child { border-right: none; }

.np__heading {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--np-muted);
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--np-border);
}

.np__link {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 12px;
	margin: 0 0 4px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid transparent;
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--np-body);
	text-decoration: none;
	line-height: 1.3;
	transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.np__link:last-child { margin-bottom: 0; }
.np__link:hover {
	background: var(--np-featured-bg);
	border-color: var(--np-panel-border);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	text-decoration: none;
}
.np__link:hover .np__link-label { color: var(--np-accent); }

.np__link-icon { flex-shrink: 0; line-height: 1.3; }
.np__link-text { display: flex; flex-direction: column; min-width: 0; }
.np__link-label { display: block; font-weight: 600; transition: color 0.15s; }
.np__link--has-desc { padding-top: 11px; padding-bottom: 13px; }
.np__link-desc {
	display: block;
	font-size: 0.72rem;
	font-weight: 400;
	color: var(--np-muted);
	line-height: 1.4;
	margin-top: 2px;
}

.np__featured {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 16px 24px;
	border-bottom: 1px solid var(--np-panel-border);
}
.np__featured-copy { flex: 1; min-width: 0; }
.np__feature-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--np-heading);
	line-height: 1.3;
	margin: 0 0 2px;
}
.np__feature-text {
	font-size: 0.78rem;
	color: var(--np-muted);
	line-height: 1.45;
	margin: 0;
}
.np__featured-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}
.np__feature-cta,
.np__feature-secondary {
	display: inline-block;
	color: #fff !important;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 7px;
	text-decoration: none !important;
	text-align: center;
	white-space: nowrap;
	transition: background 0.15s;
}
.np__feature-cta { background: var(--np-cta-bg); }
.np__feature-cta:hover { background: var(--np-cta-bg-hover); }
.np__feature-secondary { background: var(--np-secondary-bg); }
.np__feature-secondary:hover { background: var(--np-secondary-bg-hover); }

.np__footer {
	border-top: 1px solid var(--np-panel-border);
	padding: 11px 24px;
	background: var(--np-featured-bg);
	text-align: right;
}
.np__footer a {
	font-size: 0.8rem;
	color: var(--np-muted);
	text-decoration: none;
	font-style: italic;
	transition: color 0.15s;
}
.np__footer a:hover { color: var(--np-accent); }

/* Mobile: flat, always-expanded, non-interactive trigger label.
 * 1024px matches this site's actual hamburger-overlay cutoff — see the
 * richmenu-nav-breakpoint mu-plugin, which extends WordPress core's default
 * 600px cutoff out to 1024px because this header has too many top-level
 * items to fit in one row between those two widths. If that breakpoint ever
 * changes, this number needs to move with it — otherwise there's a dead
 * zone where the surrounding nav is in one mode and this panel is in the
 * other.
 * Every override here is !important — this has to beat the host theme's own
 * mobile nav-overlay specificity, which is otherwise unpredictable per site. */
@media (max-width: 1024px) {
	.np {
		display: block !important;
		width: 100% !important;
		position: static !important;
	}
	.np::after { display: none !important; }
	.np__trigger {
		pointer-events: none !important;
		display: block !important;
		width: 100% !important;
		font-size: 0.7rem !important;
		font-weight: 700 !important;
		letter-spacing: 0.1em !important;
		text-transform: uppercase !important;
		color: var(--np-muted) !important;
		opacity: 1 !important;
		padding: 16px 0 2px !important;
	}
	.np__chevron { display: none !important; }
	.np__dropdown {
		position: static !important;
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		max-height: none !important;
		overflow: visible !important;
		transform: none !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		transition: none !important;
		background: transparent !important;
		z-index: auto !important;
	}
	.np__inner {
		display: flex !important;
		flex-direction: column !important;
		padding: 0 !important;
		grid-template-columns: none !important;
	}
	.np__col {
		padding: 0 0 4px 0 !important;
		border-right: none !important;
		border-bottom: none !important;
	}
	.np__heading {
		margin: 10px 0 2px !important;
		padding-bottom: 0 !important;
		border-bottom: none !important;
	}
	.np__link {
		display: flex !important;
		padding: 8px 0 !important;
		margin: 0 !important;
		font-size: 0.95rem !important;
		background: none !important;
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}
	.np__featured,
	.np__footer { display: none !important; }
}
