/**
 * Animated Process Steps Widget Styles
 */

.sellio-animated-process-steps {
	width: 100%;
	height: 350px;
	position: relative;
	contain: strict;
	overflow: visible;
}

.sellio-process-steps-container {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	height: 100%;
	position: relative;
	contain: layout style;
}

.sellio-process-step-card {
	position: relative;
	flex: 1;
	min-width: 200px;
	max-width: 300px;
	background: rgba(30, 30, 50, 0.8);
	border-radius: 12px;
	padding: 30px 25px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	align-content: flex-start;
	will-change: height;
	backface-visibility: hidden;
	transform: translateZ(0);
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
	contain: layout style paint;
	box-sizing: border-box;
	isolation: isolate;
	transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
				background-color 0.5s ease,
				box-shadow 0.5s ease,
				border 0.5s ease,
				opacity 0.3s ease;
}

/* Ensure justify-content works within Elementor structure */
.elementor-element .sellio-process-step-card {
	justify-content: flex-start !important;
}

.sellio-process-step-card > *:first-child {
	margin-top: 0;
}

/* Height variations based on position */
/* Cards 1 and 5 (outermost) - shortest */
.sellio-process-step-card[data-step-index="0"],
.sellio-process-step-card[data-step-index="4"] {
	height: 200px;
}

/* Cards 2 and 4 (mid) - bigger height */
.sellio-process-step-card[data-step-index="1"],
.sellio-process-step-card[data-step-index="3"] {
	height: 280px;
}

/* Card 3 (middle) - base height */
.sellio-process-step-card[data-step-index="2"] {
	height: 250px;
}

/* Active step styling - always tallest */
.sellio-process-step-card.sellio-step-active {
	height: 350px;
	background: rgba(50, 50, 80, 0.95);
	transform: translateZ(0);
	z-index: 10;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Hover state - set all content opacity to 1 */
.sellio-process-step-card:hover {
	opacity: 1 !important;
}

.sellio-process-step-card:hover * {
	opacity: 1 !important;
	transition: opacity 0.3s ease;
}

.sellio-process-step-card:hover .sellio-step-number {
	opacity: 1 !important;
}

.sellio-process-step-card:hover .sellio-step-title {
	opacity: 1 !important;
}

.sellio-process-step-card:hover .sellio-step-description {
	opacity: 1 !important;
}

/* When card 1 or 5 becomes active, they get tallest height */
.sellio-process-step-card[data-step-index="0"].sellio-step-active,
.sellio-process-step-card[data-step-index="4"].sellio-step-active {
	height: 350px;
}

/* When card 2 or 4 becomes active, they get tallest height */
.sellio-process-step-card[data-step-index="1"].sellio-step-active,
.sellio-process-step-card[data-step-index="3"].sellio-step-active {
	height: 350px;
}

/* Loading Line Styles */
.sellio-process-step-card {
	position: relative;
}

.sellio-step-loading-line {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: 3px;
	background-color: rgba(255, 255, 255, 0.1);
	overflow: hidden;
	z-index: 20;
}

.sellio-step-loading-progress {
	height: 100%;
	width: 0%;
	background-color: #ffffff;
	transition: width 0.1s linear;
	transform-origin: left;
}

.sellio-process-step-card:not(.sellio-step-active) .sellio-step-loading-progress {
	width: 0% !important;
}

.sellio-step-number {
	font-size: 72px;
	font-weight: 300;
	line-height: 1;
	color: rgba(255, 255, 255, 0.2);
	margin-top: 0;
	margin-bottom: 15px;
	transition: all 0.5s ease;
}

.sellio-process-step-card.sellio-step-active .sellio-step-number {
	color: rgba(255, 255, 255, 0.4);
	font-size: 80px;
}

.sellio-step-title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	margin: 0 0 15px 0;
	padding: 0;
	transition: all 0.5s ease;
}

.sellio-process-step-card.sellio-step-active .sellio-step-title {
	font-size: 22px;
	font-weight: 700;
}

.sellio-step-description {
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
	padding: 0;
	transition: all 0.5s ease;
}

.sellio-process-step-card.sellio-step-active .sellio-step-description {
	color: rgba(255, 255, 255, 0.9);
	font-size: 15px;
}

/* Smooth transitions for all properties - optimized to prevent flickering and scrollbar jumps */
/* Note: Card transitions are defined above in .sellio-process-step-card */

/* Prevent layout shifts from affecting parent containers */
.sellio-animated-process-steps * {
	transform-style: preserve-3d;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.sellio-animated-process-steps {
		height: 300px;
	}

	.sellio-process-steps-container {
		gap: 15px;
	}

	.sellio-process-step-card {
		min-width: 180px;
		max-width: 250px;
		padding: 25px 20px;
	}

	.sellio-process-step-card[data-step-index="0"],
	.sellio-process-step-card[data-step-index="4"] {
		height: 180px;
	}

	.sellio-process-step-card[data-step-index="1"],
	.sellio-process-step-card[data-step-index="3"] {
		height: 250px;
	}

	.sellio-process-step-card[data-step-index="2"] {
		height: 220px;
	}

	.sellio-process-step-card.sellio-step-active {
		height: 300px;
	}
}

@media (max-width: 768px) {
	.sellio-animated-process-steps {
		height: auto;
		min-height: 200px;
	}

	.sellio-process-steps-container {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
		height: auto;
	}

	.sellio-process-step-card {
		min-width: 100%;
		max-width: 100%;
		padding: 25px 20px;
		height: auto !important;
		transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
					background-color 0.4s ease,
					box-shadow 0.4s ease,
					border 0.4s ease;
	}

	.sellio-process-step-card.sellio-step-active {
		transform: translateZ(0);
	}

	.sellio-step-number {
		font-size: 56px;
	}

	.sellio-process-step-card.sellio-step-active .sellio-step-number {
		font-size: 64px;
	}

	.sellio-step-title {
		font-size: 18px;
	}

	.sellio-process-step-card.sellio-step-active .sellio-step-title {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.sellio-process-step-card {
		padding: 20px 15px;
	}

	.sellio-step-number {
		font-size: 48px;
	}

	.sellio-process-step-card.sellio-step-active .sellio-step-number {
		font-size: 56px;
	}

	.sellio-step-title {
		font-size: 16px;
	}

	.sellio-process-step-card.sellio-step-active .sellio-step-title {
		font-size: 18px;
	}

	.sellio-step-description {
		font-size: 13px;
	}
}
