/* =========================================================
   Elementor Custom Widget Addon — Interactive Image Showcase
   ========================================================= */

.ecwa-showcase {
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #000;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

/* ------------------ Background images ------------------ */
.ecwa-showcase__bg-wrap {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ecwa-showcase__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	transition-property: opacity;
	transition-duration: 600ms;
	transition-timing-function: ease;
	will-change: opacity;
}

.ecwa-showcase__bg.is-active {
	opacity: 1;
}

.ecwa-showcase__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* ---------------------- Items row ---------------------- */
.ecwa-showcase__items {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: stretch;
	gap: 24px;
	padding: 0 60px 0 60px;
	width: 100%;
}

.ecwa-showcase__item {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	background-color: transparent;
	transition: background-color 0.35s ease;
}

/* Description hidden unless active (desktop) */
.ecwa-showcase__description {
	display: none;
	margin-top: 14px;
	font-size: 14px;
	line-height: 1.55;
}

.ecwa-showcase__item.is-active .ecwa-showcase__description {
	display: block;
}

.ecwa-showcase__number {
	display: block;
	font-size: 15px;
	line-height: 1;
	margin-bottom: 8px;
	transition: color 0.35s ease;
}

.ecwa-showcase__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 500;
	transition: color 0.35s ease;
}

/* -------------------- Progress bars -------------------- */
.ecwa-showcase__progress {
	position: relative;
	display: block;
	width: 100%;
	height: 4px;
	background-color: rgba(255, 255, 255, 0.35);
	overflow: hidden;
	border-radius: 2px;
}

.ecwa-showcase__progress--desktop {
	margin-top: auto;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
}

.ecwa-showcase__progress-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background-color: #fff;
}

/* Completed items keep a full bar */
.ecwa-showcase__item.is-done .ecwa-showcase__progress-fill,
.ecwa-showcase__progress--mobile.is-done .ecwa-showcase__progress-fill {
	width: 100%;
}

/* Mobile progress strip (hidden on desktop) */
.ecwa-showcase__mobile-progress {
	display: none;
}

/* ------------------ Editor placeholder ------------------ */
.elementor-editor-active .ecwa-showcase__item {
	cursor: pointer;
}

/* =========================================================
   MOBILE  (Elementor mobile breakpoint <= 767px)
   ========================================================= */
@media (max-width: 767px) {

	.ecwa-showcase {
		height: auto !important;
		min-height: 420px;
		justify-content: flex-start;
	}

	/* Image becomes a top banner */
	.ecwa-showcase__bg-wrap {
		position: relative;
		inset: auto;
		width: 100%;
		height: 220px;
	}

	/* Progress bars strip over the bottom of the image */
	.ecwa-showcase__mobile-progress {
		display: flex;
		gap: 8px;
		position: absolute;
		left: 16px;
		right: 16px;
		bottom: 14px;
		z-index: 3;
	}

	.ecwa-showcase__progress--mobile {
		flex: 1 1 0;
	}

	/* Items area: stacked, only active item visible */
	.ecwa-showcase__items {
		flex-direction: column;
		gap: 0;
		padding: 20px 16px 30px 16px;
	}

	.ecwa-showcase__item {
		display: none;
		background-color: transparent !important;
		padding: 0 !important;
	}

	.ecwa-showcase__item.is-active {
		display: block;
	}

	/* Hide number + per-item bar on mobile (bars live over the image) */
	.ecwa-showcase__number,
	.ecwa-showcase__progress--desktop {
		display: none;
	}

	.ecwa-showcase__item .ecwa-showcase__description {
		display: block;
	}
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.ecwa-showcase__bg {
		transition-duration: 0ms !important;
	}
}
