/* Visual Accordion for Elementor — frontend + editor styles */

.vae-accordion {
	--vae-accent: #F5C518;
	--vae-green: #4CAF50;
	--vae-title-color: #ffffff;
	--vae-desc-color: #e5e5e5;
	--vae-overlay-color: #000000;
	--vae-overlay-opacity: 0.55;
	--vae-filter-color: #000000;
	--vae-filter-opacity: 0.25;
	--vae-border-width: 2px;

	display: flex;
	align-items: stretch;
	width: 100%;
	height: var(--vae-height, 480px);
	gap: 10px;
	box-sizing: border-box;
}

.vae-accordion * {
	box-sizing: border-box;
}

.vae-card {
	position: relative;
	flex: 0 0 var(--vae-collapsed, 80px);
	min-width: 0;
	-webkit-tap-highlight-color: transparent;
	overflow: hidden;
	border-radius: 0;
	cursor: pointer;
	outline: none;
	background-color: #111;
	transition: flex-basis 0.55s cubic-bezier(0.22, 1, 0.36, 1), flex-grow 0.55s cubic-bezier(0.22, 1, 0.36, 1), height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.vae-card.vae-active {
	flex: 1 1 var(--vae-active, 40%);
}

.vae-card:focus-visible {
	box-shadow: 0 0 0 3px var(--vae-accent);
}

.vae-card-image {
	position: absolute;
	inset: 0;
	/* max-width/max-height overrides guard against common theme resets like
	   `img { max-width: 100%; height: auto; }`, which would otherwise stop
	   the image from filling the card (on both active and collapsed cards
	   alike — this rule applies to every card, not just the active one). */
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.6s ease;
}

.vae-card.vae-active .vae-card-image {
	transform: scale(1.02);
}

.vae-filter {
	position: absolute;
	inset: 0;
	/* Flat dark filter over the whole image. */
	background: var(--vae-filter-color, #000000);
	opacity: var(--vae-filter-opacity, 0.25);
	pointer-events: none;
}

.vae-overlay {
	position: absolute;
	inset: 0;
	/* Gradient layer: solid colour on the starting side, fading out. */
	background: linear-gradient(
		var(--vae-grad-dir, to top),
		var(--vae-overlay-color, #000000) 0%,
		var(--vae-overlay-color, #000000) var(--vae-grad-solid, 32%),
		var(--vae-grad-end, rgba(0, 0, 0, 0)) var(--vae-grad-fade, 85%)
	);
	opacity: var(--vae-overlay-opacity, 0.55);
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.vae-no-filter .vae-filter,
.vae-no-gradient .vae-overlay {
	display: none;
}

.vae-left-border {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--vae-border-width, 3px);
	background: var(--vae-green);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.vae-card:not(.vae-active) .vae-left-border {
	opacity: 1;
}

.vae-number {
	position: absolute;
	top: 16px;
	left: 16px;
	color: var(--vae-accent);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.05em;
	z-index: 2;
	opacity: 1;
	transition: opacity 0.3s ease;
}

/* The number is folded into the "NN / Category" eyebrow once a card is
   active, so the standalone top-left badge is hidden to avoid repeating it. */
.vae-card.vae-active .vae-number {
	opacity: 0;
}

.vae-vertical-title {
	position: absolute;
	left: 50%;
	bottom: 40px;
	transform: translateX(-50%) rotate(180deg);
	writing-mode: vertical-rl;
	color: var(--vae-title-color);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	z-index: 2;
	opacity: 1;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.vae-card.vae-active .vae-vertical-title {
	opacity: 0;
}

/* Vertical title position (horizontal layout). Set from the widget's
   "Vertical Title Position" control via a class on the wrapper. */
.vae-vt-top .vae-vertical-title {
	top: 56px;
	bottom: auto;
}

.vae-vt-middle .vae-vertical-title {
	top: 50%;
	bottom: auto;
	transform: translate(-50%, -50%) rotate(180deg);
}

.vae-vt-bottom .vae-vertical-title {
	top: auto;
	bottom: 40px;
}

.vae-hide-number .vae-number,
.vae-hide-dot .vae-green-dot {
	display: none;
}

.vae-green-dot {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--vae-green);
	z-index: 2;
	opacity: 1;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.vae-card.vae-active .vae-green-dot {
	opacity: 0;
}

.vae-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 32px;
	z-index: 2;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
	pointer-events: none;
	max-width: 640px;
}

.vae-card.vae-active .vae-content {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.vae-eyebrow {
	color: var(--vae-accent);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.vae-title {
	color: var(--vae-title-color);
	font-size: 32px;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.15;
	margin-bottom: 12px;
	overflow-wrap: break-word;
}

.vae-description {
	color: var(--vae-desc-color);
	font-size: 15px;
	line-height: 1.5;
	margin-bottom: 18px;
	max-width: 480px;
}

.vae-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--vae-green);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.vae-button:hover,
.vae-button:focus-visible {
	border-color: var(--vae-green);
	transform: translateX(2px);
}

.vae-arrow {
	transition: transform 0.25s ease;
	display: inline-block;
}

.vae-button:hover .vae-arrow {
	transform: translateX(3px);
}

/* Tablet: stays horizontal; widths come from the (responsive) Elementor
   controls via CSS variables, so only text/padding is tuned here. */
@media (max-width: 1024px) {
	.vae-title {
		font-size: 26px;
	}

	.vae-content {
		padding: 24px;
	}
}

/* Mobile: vertical accordion. Sizing uses CSS variables (not Elementor's
   desktop width/height rules) so nothing from the horizontal layout leaks in. */
@media (max-width: 767px) {
	.vae-accordion {
		flex-direction: column;
		height: auto;
	}

	.vae-card,
	.vae-card.vae-active {
		width: 100%;
		flex-grow: 0;
		flex-shrink: 0;
	}

	.vae-card {
		flex-basis: var(--vae-m-collapsed, 64px);
		height: var(--vae-m-collapsed, 64px);
	}

	.vae-card.vae-active {
		flex-basis: var(--vae-m-active, 340px);
		height: var(--vae-m-active, 340px);
	}

	.vae-left-border {
		top: 0;
		left: 0;
		right: 0;
		bottom: auto;
		width: auto;
		height: var(--vae-border-width, 3px);
	}

	/* Collapsed row: number | title ........ dot, vertically centred. */
	.vae-number {
		top: 50%;
		left: 16px;
		transform: translateY(-50%);
	}

	.vae-accordion .vae-vertical-title {
		writing-mode: horizontal-tb;
		left: 52px;
		right: 48px;
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.vae-green-dot {
		bottom: auto;
		top: 50%;
		right: 20px;
		left: auto;
		transform: translateY(-50%);
	}

	/* Keep long text inside the card instead of spilling out of the top. */
	.vae-content {
		padding: 18px 20px;
		max-width: 100%;
		max-height: 100%;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.vae-title {
		font-size: 22px;
	}

	.vae-description {
		font-size: 14px;
		max-width: 100%;
	}
}
