/* Accordion Menu for Elementor — frontend styles
 * D4 Webdesign
 */

.eam-accordion-menu {
	width: 100%;
	box-sizing: border-box;
}

.eam-accordion-menu * {
	box-sizing: border-box;
}

/* Hard reset list styling so themes cannot reintroduce bullets/indentation. */
.d4ca-accordion-menu ul,
.d4ca-accordion-menu li,
.d4ca-accordion-menu .eam-accordion-menu-list,
.d4ca-accordion-menu .eam-submenu {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.d4ca-accordion-menu li::marker {
	content: "";
}

.eam-menu-title {
	font-weight: 600;
}

/* Item row */
.eam-item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	cursor: pointer;
}

.eam-item-link {
	flex: 1 1 auto;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

/* Toggle icon */
.eam-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	order: 2;
}

.eam-icon-position-start .eam-item-row {
	flex-direction: row;
}

.eam-icon-position-start .eam-toggle {
	order: -1;
}

.eam-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	width: 25px;
	height: 25px;
	font-size: 25px;
	transition: transform 0.2s ease;
}

.eam-icon svg {
	width: 25px;
	height: 25px;
}

.eam-icon-expanded {
	display: none !important;
}

/* One clean submenu chevron: right when closed, down when open.
 * The default library icon is chevron-down, so rotate it -90deg at rest. */
.eam-icon-collapsed {
	display: inline-flex;
	transform: rotate(-90deg);
	transition: transform 0.3s cubic-bezier(.22,1,.36,1);
}

.eam-item.eam-open > .eam-item-row .eam-icon-collapsed {
	transform: rotate(0deg);
}

/* Submenus start collapsed; JS drives explicit pixel height for reliable
 * slide animation inside Elementor Saved Templates and Off Canvas. */
.eam-submenu {
	height: 0;
	max-height: none;
	overflow: hidden;
	transition-property: height;
	transition-duration: 0.3s;
	transition-timing-function: cubic-bezier(.22,1,.36,1);
}

.eam-item.eam-open > .eam-submenu {
	max-height: none;
}

/* No-JS fallback: keep everything visible if the script fails to load. */
.eam-accordion-menu.eam-no-js .eam-submenu {
	max-height: none;
	overflow: visible;
}

.eam-placeholder {
	padding: 20px;
	border: 1px dashed #c3c4c7;
	color: #6b6b6b;
	text-align: center;
}
.eam-toggle{appearance:none;-webkit-appearance:none;border:0;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer}


/* Staggered top-level entrance/exit animation — intentionally Off Canvas only.
 * Standalone accordion menus never animate on page load. The closed Off Canvas
 * state holds items off-screen/invisible; adding .is-open starts the stagger,
 * so the effect replays each time the panel is opened. Closing adds a temporary
 * .is-closing state (see offcanvas.js) so items can mirror the entrance back out
 * in the same direction, instead of just vanishing instantly.
 *
 * NOTE: this base reset rule is deliberately kept at LOWER selector specificity
 * (4 classes) than the direction-specific rules below (5 classes each, e.g.
 * ".d4ca-offcanvas .d4ca-accordion-menu.eam-entrance-fade-right > ..."). Adding
 * back the "[class*=eam-entrance-]:not(.eam-entrance-none)" filter here would
 * make this MORE specific than the direction rules and silently override them
 * back to 0 regardless of source order — that was the previous bug where every
 * item faded in place with no visible slide. */
.d4ca-offcanvas .d4ca-accordion-menu > .eam-accordion-menu-list > .eam-item {
	--eam-enter-x: 0px;
	--eam-enter-y: 0px;
}

.d4ca-offcanvas .d4ca-accordion-menu.eam-entrance-fade-up > .eam-accordion-menu-list > .eam-item {
	--eam-enter-y: calc(var(--eam-entrance-distance, 14px) * 1);
}

.d4ca-offcanvas .d4ca-accordion-menu.eam-entrance-fade-left > .eam-accordion-menu-list > .eam-item {
	--eam-enter-x: calc(var(--eam-entrance-distance, 28px) * -1);
}

.d4ca-offcanvas .d4ca-accordion-menu.eam-entrance-fade-right > .eam-accordion-menu-list > .eam-item {
	--eam-enter-x: calc(var(--eam-entrance-distance, 34px) * 1);
}

.d4ca-offcanvas:not(.is-open):not(.is-closing) .d4ca-accordion-menu[class*="eam-entrance-"]:not(.eam-entrance-none) > .eam-accordion-menu-list > .eam-item {
	opacity: 0;
	transform: translate3d(var(--eam-enter-x), var(--eam-enter-y), 0);
	animation: none;
}

.d4ca-offcanvas.is-open .d4ca-accordion-menu[class*="eam-entrance-"]:not(.eam-entrance-none) > .eam-accordion-menu-list > .eam-item {
	opacity: 0;
	transform: translate3d(var(--eam-enter-x), var(--eam-enter-y), 0);
	animation: eam-menu-item-enter var(--eam-entrance-duration, 450ms) cubic-bezier(.22,1,.36,1) forwards;
	animation-delay: calc(var(--eam-entrance-delay, 200ms) + (var(--eam-item-index, 0) * var(--eam-entrance-stagger, 200ms)));
	will-change: opacity, transform;
}

.d4ca-offcanvas.is-closing .d4ca-accordion-menu[class*="eam-entrance-"]:not(.eam-entrance-none) > .eam-accordion-menu-list > .eam-item {
	opacity: 0;
	transform: translate3d(var(--eam-enter-x), var(--eam-enter-y), 0);
	animation: eam-menu-item-leave var(--eam-entrance-duration, 450ms) cubic-bezier(.22,.61,.36,1) forwards;
	will-change: opacity, transform;
}

@keyframes eam-menu-item-enter {
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@keyframes eam-menu-item-leave {
	from {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.d4ca-offcanvas .d4ca-accordion-menu[class*="eam-entrance-"]:not(.eam-entrance-none) > .eam-accordion-menu-list > .eam-item {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}
