/* ============================================================
   Dev Mega Nav
   Desktop: full-width mega panels under a sticky bar.
   Mobile: full-screen overlay with accordion.
   Most colours/typography/spacing are driven by Elementor controls.
   ============================================================ */

.dmn {
	position: relative;
	z-index: 1000;
	font-family: inherit;
}

.dmn *,
.dmn *::before,
.dmn *::after {
	box-sizing: border-box;
}

/* ---------- Bar ---------- */
.dmn__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 0 28px;
	min-height: 72px;
	position: relative;
	z-index: 1002;
	transition: background-color .25s ease;
}

.dmn__logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	font-weight: 700;
	color: inherit;
}

.dmn__logo img {
	max-height: 40px;
	width: auto;
}

/* Logo swap for transparent state.
   Visibility is controlled here and must win over any width/height
   sizing rules, so the hide rules are forced. */
.dmn__logo-default { display: block; }
.dmn__logo-top { display: none !important; }

.dmn--has-transparent.is-at-top .dmn__logo-default { display: none !important; }
.dmn--has-transparent.is-at-top .dmn__logo-top { display: block !important; }

/* ---------- Top-level list ---------- */
.dmn__menu-wrap {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.dmn__list {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dmn__item {
	position: static; /* panel spans full width of .dmn */
}

.dmn__trigger,
.dmn__toplink {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 500;
	padding: 10px 14px;
	text-decoration: none;
	color: inherit;
	line-height: 1;
	transition: color .2s ease;
}

/* Chevron — icon or default triangle */
.dmn__caret {
	display: inline-flex;
	align-items: center;
	transition: transform .2s ease;
	line-height: 0;
}
.dmn__caret svg { width: 12px; height: 12px; display: block; }
.dmn__caret i { font-size: 12px; line-height: 1; }

.dmn__caret--default {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}

.dmn__item--has-panel.is-open .dmn__caret {
	transform: rotate(180deg);
}

/* ---------- Actions ---------- */
.dmn__actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.dmn__cta {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 4px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* ---------- Desktop mega panel ---------- */
.dmn__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	width: 100%;
	background: #fff;
	box-shadow: 0 24px 48px rgba(0,0,0,.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
	z-index: 1001;
}

.dmn__item--has-panel.is-open > .dmn__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dmn__panel-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 44px 28px 52px;
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 48px;
}

.dmn__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 36px 40px;
	align-content: start;
}

.dmn__col-head {
	display: block;
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 14px;
	text-decoration: none;
}
a.dmn__col-head:hover { text-decoration: underline; }

.dmn__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.dmn__subitem a {
	text-decoration: none;
	font-size: 14px;
	transition: color .15s ease;
}

.dmn__featured:empty { display: none; }
.dmn__featured { align-self: start; }
.dmn__panel-inner:has(.dmn__featured:empty) { grid-template-columns: 1fr; }

/* ---------- Backdrop ---------- */
.dmn__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.35);
	opacity: 0;
	visibility: hidden;
	transition: opacity .22s ease, visibility .22s;
	z-index: 1000;
}
.dmn.is-panel-open .dmn__backdrop {
	opacity: 1;
	visibility: visible;
}

/* ---------- Toggle buttons ---------- */
.dmn__burger,
.dmn__close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0;
	color: inherit;
}
.dmn__burger { display: none; }

.dmn__burger-bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 24px;
}
.dmn__burger-bars span {
	display: block;
	height: 2px;
	width: 100%;
	background: currentColor;
	transition: transform .25s ease, opacity .2s ease;
}

.dmn__close {
	position: absolute;
	top: 22px;
	right: 20px;
	z-index: 5;
}
.dmn__close-x {
	position: relative;
	width: 22px;
	height: 22px;
	display: block;
}
.dmn__close-x::before,
.dmn__close-x::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}
.dmn__close-x::before { transform: rotate(45deg); }
.dmn__close-x::after { transform: rotate(-45deg); }

.dmn__notice {
	padding: 16px;
	border: 1px dashed #bbb;
	color: #888;
	text-align: center;
	font-size: 14px;
}

/* ============================================================
   MOBILE  (<= 1024px)
   ============================================================ */
@media (max-width: 1024px) {

	.dmn__menu-wrap {
		position: fixed;
		inset: 0;
		background: var(--dmn-mobile-bg, #fff);
		display: block;
		padding: 88px 0 40px;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .3s ease;
		z-index: 1001;
		visibility: hidden;
	}

	.dmn.is-mobile-open .dmn__menu-wrap {
		transform: translateX(0);
		visibility: visible;
	}

	.dmn__burger { display: flex; }

	/* Close button visible only inside the open overlay */
	.dmn__close { display: none; }
	.dmn.is-mobile-open .dmn__close { display: flex; }

	/* If no custom close icon, animate the hamburger into an X instead */
	.dmn.is-mobile-open .dmn__burger-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.dmn.is-mobile-open .dmn__burger-bars span:nth-child(2) { opacity: 0; }
	.dmn.is-mobile-open .dmn__burger-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	.dmn__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0 20px;
	}

	.dmn__item { border-bottom: 1px solid rgba(0,0,0,.08); }

	.dmn__trigger,
	.dmn__toplink {
		width: 100%;
		justify-content: space-between;
		padding: 18px 4px;
		font-size: 17px;
		font-weight: 600;
	}

	.dmn__panel {
		position: static;
		width: auto;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		max-height: 0;
		overflow: hidden;
		transition: max-height .3s ease;
		background: transparent;
	}
	.dmn__item--has-panel.is-open > .dmn__panel { max-height: 1600px; }

	.dmn__panel-inner { display: block; padding: 0 0 18px; max-width: none; }
	.dmn__cols { display: block; }
	.dmn__col { margin-bottom: 18px; }
	.dmn__col-head { font-size: 14px; margin-bottom: 8px; }
	.dmn__sublist { padding-left: 12px; }

	.dmn__featured { display: none; }

	/* The bar may be transparent at the top of the page on mobile (logo +
	   hamburger over a hero). But once the full-screen overlay is open it is
	   solid, so its links must never use the transparent (white) colour. The JS
	   removes is-at-top the moment the overlay opens; this rule is a
	   belt-and-braces guard so links are readable even mid-transition. */
	.dmn.is-mobile-open .dmn__trigger,
	.dmn.is-mobile-open .dmn__toplink,
	.dmn.is-mobile-open .dmn__caret svg,
	.dmn.is-mobile-open .dmn__caret i {
		color: inherit;
	}
	.dmn__caret--default { border-top-color: currentColor; }
}
