/* ==========================================================================
   Valident Basic — Mobile Slide-Out Menu
   ========================================================================== */

/* Overlay */
.mobile-menu__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 998;
}

body.is-menu-open .mobile-menu__overlay {
	opacity: 1;
	visibility: visible;
}

/* Slide-out panel */
.mobile-menu__panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 300px;
	height: 100vh;
	height: 100dvh;
	background: var(--vb-color-header-bg);
	color: var(--vb-color-header-fg);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 999;
	overflow-y: auto;
	padding: 24px;
}

body.is-menu-open .mobile-menu__panel {
	transform: translateX(0);
}

/* Prevent body scroll when menu is open */
body.is-menu-open {
	overflow: hidden;
}

/* Close button */
.mobile-menu__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-left: auto;
	margin-bottom: 16px;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--vb-color-header-fg);
	background: none;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.mobile-menu__close:hover {
	background-color: rgba(0, 0, 0, 0.06);
}

/* Menu list */
.mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-menu__list li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-menu__list li:last-child {
	border-bottom: none;
}

.mobile-menu__list a {
	display: block;
	padding: 14px 0;
	font-family: var(--vb-font-nav);
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--vb-color-header-fg);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.mobile-menu__list a:hover {
	opacity: 0.7;
	text-decoration: none;
}

.mobile-menu__list .current-menu-item > a {
	font-weight: 700;
}

/* Sub-menu (depth 2) */
.mobile-menu__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 16px;
}

.mobile-menu__list .sub-menu a {
	font-size: 0.9375rem;
	padding: 10px 0;
}

/* Hide mobile menu elements on desktop */
@media (min-width: 769px) {
	.mobile-menu {
		display: none;
	}
}
