/* ==========================================================================
   Hamburger Menu — structural styles.
   Fallback values here only apply if Elementor's Style-tab controls
   haven't set anything yet. Real values are injected live per-instance.
   ========================================================================== */

.hb-menu-wrap {
	position: relative;
	display: inline-block;
	--hb-thickness: 1px;
	--hb-gap: 8px;
	--hb-speed: 300ms;
}

/* ---------- Icon button (kept 1:1 square, never overflows) ---------- */
.hb-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	cursor: pointer;
	overflow: hidden; /* hard safety net: nothing can ever visually spill outside the box */
	z-index: 1000000; /* stays clickable above the full-screen panel when open */

	/* Hard reset so the host theme's default <button> chrome
	   (background, border, box-shadow, outline on any state)
	   can never show through. */
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.hb-toggle:hover,
.hb-toggle:focus,
.hb-toggle:active,
.hb-toggle:visited {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Still show a neutral, accessible focus ring for keyboard users
   — just not the theme's default color. */
.hb-toggle:focus-visible {
	outline: 2px solid rgba(20, 20, 20, 0.35);
	outline-offset: 4px;
}

.hb-line {
	position: absolute;
	left: 0;
	width: 100%;
	height: var(--hb-thickness);
	background-color: #141414;
	border-radius: 1px;
	transition: top var(--hb-speed) ease, transform var(--hb-speed) ease;

	/* The gap is capped so it can never push the lines past the box
	   edges, no matter how small the icon is set. */
	--hb-gap-safe: min(var(--hb-gap), calc(100% - 2 * var(--hb-thickness)));
}

/* Two lines centered symmetrically around the icon's midpoint,
   separated by the (safely capped) gap */
.hb-line1 { top: calc(50% - (var(--hb-gap-safe) / 2) - var(--hb-thickness)); }
.hb-line2 { top: calc(50% + (var(--hb-gap-safe) / 2)); }

/* Morph into an X: both lines collapse to center and rotate 45deg
   in opposite directions, forming a perfectly symmetric cross */
.hb-menu-wrap.is-open .hb-line1,
.hb-menu-wrap.is-open .hb-line2 {
	top: 50%;
}
.hb-menu-wrap.is-open .hb-line1 {
	transform: translateY(-50%) rotate(45deg);
}
.hb-menu-wrap.is-open .hb-line2 {
	transform: translateY(-50%) rotate(-45deg);
}

/* ---------- Full screen panel ---------- */
/* Fixed + inset:0 covers the entire viewport regardless of where the
   button lives in the page. z-index is set very high, and the JS moves
   this element to a direct child of <body> on the live site so no
   ancestor's stacking context can ever trap it below other content. */
.hb-panel {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	background-color: #ffffff;
	overflow-y: auto;
	visibility: hidden;
	transition-property: opacity, transform, visibility;
	transition-duration: var(--hb-panel-speed, 400ms);
	transition-timing-function: var(--hb-panel-easing, ease);
	z-index: 999999;
}

/* Closed state per animation type — the open state (below) resets all
   of these back to their natural opacity/position/scale. */
.hb-panel[data-anim="grow"] {
	opacity: 1;
	transform: scale(0);
}
.hb-panel[data-anim="fade"] {
	opacity: 0;
	transform: none;
}
.hb-panel[data-anim="fade-grow"] {
	opacity: 0;
	transform: scale(0);
}
.hb-panel[data-anim="slide-left"] {
	opacity: 1;
	transform: translateX(-100%);
}
.hb-panel[data-anim="slide-right"] {
	opacity: 1;
	transform: translateX(100%);
}
.hb-panel[data-anim="none"] {
	transition-duration: 0s;
	opacity: 1;
	transform: none;
}

.hb-panel.is-open {
	opacity: 1;
	transform: translateX(0) scale(1);
	visibility: visible;
}

/* ---------- Menu list ---------- */
/* Flex column so item margins never collapse into each other. Note this
   is NOT stretched to the panel's full width (see .hb-panel's
   align-items above) — that's what lets "Horizontal Align" actually
   move the block, and lets "Text Align" reposition shorter items
   against the width set by the longest one. */
.hb-nav {
	display: flex;
	flex-direction: column;
	list-style: none;
	margin: 0;
	padding: 1rem;
	text-align: left;
	max-width: 100%;
}

.hb-nav > li {
	margin: 0 0 8px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.hb-nav > li > a {
	flex: 1 1 auto;
}

.hb-nav .sub-menu {
	list-style: none;
	margin-left: 16px;
	margin-top: 8px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 0 100%; /* always wraps onto its own full-width row below the parent link */
}

.hb-nav a {
	display: inline-block;
	text-decoration: none;
	color: #141414;
	font-size: 16px;
	line-height: 1.2;
}

.hb-nav-empty {
	padding: 1rem;
	margin: 0;
	opacity: 0.6;
}

/* Hover / Click reveal modes — sub-menus stay collapsed until triggered
   by JS (which measures exact content height for a smooth, proportional
   animation instead of animating across an arbitrary large max-height).
   "Always Visible" needs no rule here since the plain HTML is already
   fully visible by default. */
.hb-nav[data-submenu-mode="hover"] .sub-menu,
.hb-nav[data-submenu-mode="click"] .sub-menu {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height var(--hb-submenu-speed, 300ms) var(--hb-submenu-easing, ease),
		opacity var(--hb-submenu-speed, 300ms) var(--hb-submenu-easing, ease);
}

.hb-nav li.hb-submenu-open > .sub-menu {
	opacity: 1;
}
