/* Services nav: category list + flyout to the right */

.desktop-offcanvas-toggle {
	display: none;
}

.ella-services-menu {
	min-width: 15rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	background: #fff;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
	z-index: 50;
}

.ella-services-menu > li {
	position: relative;
}

.ella-services-menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 1.35rem;
	font-size: 0.875rem;
	line-height: 1.35;
	font-weight: 400;
	color: #4b5563;
	white-space: nowrap;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.ella-services-menu > li > a:hover,
.ella-services-menu > li.open > a,
.ella-services-menu > li:hover > a {
	color: var(--color-primary, #ceaf62);
	background: rgba(206, 175, 98, 0.08);
}

.ella-services-menu .ella-services-chevron {
	flex-shrink: 0;
	font-size: 0.65rem;
	opacity: 0.55;
}

.ella-services-flyout {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0.75rem 0;
	min-width: 16.5rem;
	max-width: 22rem;
	max-height: min(70vh, 28rem);
	overflow-y: auto;
	background: #fff;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	z-index: 60;
}

.ella-services-flyout a {
	display: block;
	padding: 0.5rem 1.35rem;
	font-size: 0.875rem;
	line-height: 1.35;
	font-weight: 400;
	color: #4b5563;
	white-space: normal;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.ella-services-flyout a:hover {
	color: var(--color-primary, #ceaf62);
	background: rgba(206, 175, 98, 0.08);
}

@media (min-width: 992px) {
	.desktop-offcanvas-toggle {
		display: inline-block;
	}

	.ella-services-menu {
		position: absolute;
		left: 0;
		top: 100%;
		display: block;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(0.6rem);
		transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	}

	.navbar-nav > li.ella-services-root:hover > .ella-services-menu,
	.navbar-nav > li.ella-services-root:focus-within > .ella-services-menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	.ella-services-flyout {
		display: block;
		position: absolute;
		left: 100%;
		top: 0;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateX(0.35rem);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	}

	.ella-services-menu > li:hover > .ella-services-flyout,
	.ella-services-menu > li:focus-within > .ella-services-flyout {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateX(0);
	}
}

@media (max-width: 991.98px) {
	.ella-services-menu {
		position: static;
		width: 100%;
		box-shadow: none;
		border-top: 1px solid #e5e7eb;
		display: none;
		padding: 0.5rem 0;
	}

	.ella-services-root.open > .ella-services-menu {
		display: block;
	}

	.ella-services-menu > li > a {
		white-space: normal;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}

	.ella-services-flyout {
		display: none;
		position: static;
		width: 100%;
		max-width: none;
		max-height: none;
		box-shadow: none;
		padding: 0.25rem 0 0.5rem 0.85rem;
		border-left: 2px solid rgba(206, 175, 98, 0.45);
		margin: 0.15rem 0 0.35rem 0.35rem;
	}

	.ella-services-menu > li.open > .ella-services-flyout {
		display: block;
	}

	.ella-services-chevron {
		transform: rotate(90deg);
		transition: transform 0.2s ease;
	}

	.ella-services-menu > li.open > a .ella-services-chevron {
		transform: rotate(-90deg);
	}
}
