/**
 * Kings Corner Step Flow Widget
 */

.kc-step-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 15px;
	width: 100%;
}

.kc-step-item {
	display: flex;
	align-items: center;
	gap: 15px;
	opacity: 0; /* Hidden initially for animation */
}

/* Entrance Animation: triggered by IntersectionObserver (.is-visible) or in editor */
.elementor-element-editable .kc-step-item,
.kc-step-animate .kc-step-item.is-visible {
	animation: kcStepsFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.kc-step-pill {
	display: inline-block;
	border: 2px solid #0b1e4a;
	color: #0b1e4a;
	background-color: transparent;
	font-weight: 700;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
	position: relative;
	overflow: hidden;
	z-index: 1;
}

/* Premium Hover Effect: Filling background */
.kc-step-pill::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #0b1e4a; /* Matches border color by default */
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: -1;
}

.kc-step-pill:hover::before {
	transform: scaleX(1);
	transform-origin: left;
}

.kc-step-pill:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(11, 30, 74, 0.15);
	color: #ffffff !important;
}

.kc-step-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	transition: transform 0.4s ease;
}

.kc-step-item:hover .kc-step-arrow {
	transform: translateX(5px);
}

.kc-step-arrow svg {
	width: 16px;
	height: auto;
	display: block;
}

@keyframes kcStepsFadeIn {
	from {
		opacity: 0;
		transform: translateY(15px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── SPECIAL STYLES ──────────────────────────────────────────────────────── */

/* GLASSMORPHISM */
.kc-step-style-glass .kc-step-pill {
	background: rgba(255, 255, 255, 0.1) !important;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.kc-step-style-glass .kc-step-pill:hover {
	background: rgba(255, 255, 255, 0.2) !important;
	border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* NEON GLOW */
.kc-step-style-neon .kc-step-pill {
	border-color: #00ffcc !important;
	color: #00ffcc !important;
	text-shadow: 0 0 5px rgba(0, 255, 204, 0.5);
	box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

.kc-step-style-neon .kc-step-pill:hover {
	box-shadow: 0 0 20px rgba(0, 255, 204, 0.6), inset 0 0 10px rgba(0, 255, 204, 0.4);
	background: #00ffcc !important;
	color: #0b1e4a !important;
}

/* OUTLINE (FILL ON HOVER) */
.kc-step-style-outline .kc-step-pill {
	background: transparent !important;
}

.kc-step-style-outline .kc-step-pill::before {
	transform-origin: center;
}

.kc-step-style-outline .kc-step-pill:hover::before {
	transform: scale(1);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	/* Columna vertical en mobile */
	.kc-step-flow {
		flex-direction: column;
		align-items: center;
	}

	.kc-step-item {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
	}

	.kc-step-pill {
		font-size: 0.85rem;
		padding: 10px 18px !important;
		text-align: center;
		width: 90%;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* Flecha apunta hacia abajo */
	.kc-step-arrow {
		transform: rotate(90deg);
	}

	/* Hover: mantiene rotación y desplaza hacia abajo */
	.kc-step-item:hover .kc-step-arrow {
		transform: rotate(90deg) translateX(5px);
	}

	/* En mobile el IO dispara cada paso individualmente al hacer scroll,
	   así que no necesitamos el stagger delay acumulado de PHP */
	.kc-step-animate .kc-step-item {
		animation-delay: 0ms !important;
	}
}


