.pw-workflow {
	--pw-workflow-columns: 5;
}

.pw-workflow__header {
	text-align: center;
	margin-bottom: 40px;
}

.pw-workflow__subtitle {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.pw-workflow__title {
	margin: 0 0 12px;
	font-weight: 700;
	line-height: 1.2;
}

.pw-workflow__description {
	margin: 0 auto;
	max-width: 640px;
	line-height: 1.6;
}

/* -------------------------------------------------- */
/* Nodo (icono + número)                               */
/* -------------------------------------------------- */

.pw-workflow__node {
	position: relative;
	display: flex;
	flex-shrink: 0;
}

.pw-workflow__node-circle {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid #4A90E2;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	overflow: hidden;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.pw-workflow__node-circle i,
.pw-workflow__node-circle svg {
	transition: color 0.3s ease, fill 0.3s ease;
}

.pw-workflow__step:hover .pw-workflow__node-circle {
	transform: translateY(-3px);
}

.pw-workflow__node-circle img,
.pw-workflow__node-circle svg {
	max-width: 60%;
	max-height: 60%;
	object-fit: contain;
}

.pw-workflow__number {
	position: absolute;
	top: -4px;
	right: -4px;
	z-index: 3;
	min-width: 22px;
	height: 22px;
	padding: 0 4px;
	border-radius: 50%;
	background: #1a1a1a;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* -------------------------------------------------- */
/* Texto de cada paso                                  */
/* -------------------------------------------------- */

.pw-workflow__content {
	text-decoration: none;
	color: inherit;
	display: block;
}

.pw-workflow__step-title {
	margin: 0 0 6px;
	font-weight: 700;
}

.pw-workflow__step-description {
	margin: 0;
	line-height: 1.6;
}

/* -------------------------------------------------- */
/* Estados                                             */
/* -------------------------------------------------- */

.pw-workflow__step.is-state-active .pw-workflow__node-circle {
	border-color: var(--pw-workflow-step-color, #4A90E2);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--pw-workflow-step-color, #4A90E2) 20%, transparent);
}

.pw-workflow__step.is-state-highlight .pw-workflow__node-circle {
	background: var(--pw-workflow-step-color, #4A90E2);
	border-color: var(--pw-workflow-step-color, #4A90E2);
}

.pw-workflow__step.is-state-highlight .pw-workflow__node-circle i,
.pw-workflow__step.is-state-highlight .pw-workflow__node-circle svg {
	color: #ffffff;
	fill: #ffffff;
}

.pw-workflow__step[style*="--pw-workflow-step-color"] .pw-workflow__node-circle {
	border-color: var(--pw-workflow-step-color);
}

/* -------------------------------------------------- */
/* Iconos en gris que se colorean al hacer scroll      */
/* :where() se usa para que estas reglas no compitan   */
/* en especificidad con el efecto hover.                */
/* -------------------------------------------------- */

:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-workflow__node-circle {
	border-color: var(--pw-workflow-icon-pending, #c7c7c7);
}

:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-workflow__node-circle i,
:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-workflow__node-circle svg {
	color: var(--pw-workflow-icon-pending, #c7c7c7);
	fill: var(--pw-workflow-icon-pending, #c7c7c7);
}

:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-is-visible .pw-workflow__node-circle {
	border-color: var(--pw-workflow-node-border, #4A90E2);
}

:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-is-visible .pw-workflow__node-circle i,
:where(.pw-workflow__timeline[data-animate-icons="yes"]) .pw-is-visible .pw-workflow__node-circle svg {
	color: var(--pw-workflow-icon-color, #4A90E2);
	fill: var(--pw-workflow-icon-color, #4A90E2);
}

/* -------------------------------------------------- */
/* Layout VERTICAL                                     */
/* -------------------------------------------------- */

.pw-workflow__timeline--vertical {
	display: flex;
	flex-direction: column;
}

.pw-workflow__timeline--vertical .pw-workflow__step {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.pw-workflow__timeline--vertical .pw-workflow__node-column {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
}

.pw-workflow__timeline--vertical .pw-workflow__node {
	flex-direction: column;
	align-items: center;
}

.pw-workflow__timeline--vertical.pw-workflow__timeline--connected .pw-workflow__step:not(:last-child) {
	padding-bottom: 0;
}

.pw-workflow__timeline--vertical .pw-workflow__connector {
	display: block;
	width: 4px;
	flex: 1;
	min-height: 40px;
	margin: 6px 0;
	position: relative;
	align-self: center;
	border-radius: 4px;
	overflow: hidden;
}

.pw-workflow__timeline--vertical .pw-workflow__connector-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0;
	transition: height 1s ease;
}

.pw-workflow__timeline--vertical .pw-workflow__content {
	padding-top: 10px;
	padding-bottom: 24px;
}

/* -------------------------------------------------- */
/* Layout HORIZONTAL                                   */
/* -------------------------------------------------- */

.pw-workflow__timeline--horizontal {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--pw-workflow-columns), 1fr);
	align-items: start;
}

.pw-workflow__timeline--horizontal .pw-workflow__step {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.pw-workflow__timeline--horizontal .pw-workflow__node {
	position: relative;
	width: 100%;
	justify-content: center;
}

.pw-workflow__connector--horizontal-line {
	display: block;
	position: absolute;
	top: 28px;
	left: calc(50% / var(--pw-workflow-columns));
	right: calc(50% / var(--pw-workflow-columns));
	height: 4px;
	border-radius: 4px;
	background: #e0e0e0;
	overflow: hidden;
	z-index: 0;
}

.pw-workflow__connector--horizontal-line .pw-workflow__connector-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0;
	transition: width 1.2s ease;
}

.pw-workflow__timeline--horizontal .pw-workflow__content {
	margin-top: 16px;
}

/* -------------------------------------------------- */
/* Animación al hacer scroll                           */
/* -------------------------------------------------- */

.pw-workflow__timeline[data-animation] .pw-workflow__step {
	opacity: 0;
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.pw-workflow__timeline[data-animation="fade"] .pw-workflow__step {
	transform: none;
}

.pw-workflow__timeline--vertical[data-animation="slide"] .pw-workflow__step {
	transform: translateX(-20px);
}

.pw-workflow__timeline--horizontal[data-animation="slide"] .pw-workflow__step {
	transform: translateY(20px);
}

.pw-workflow__timeline[data-animation] .pw-workflow__step.pw-is-visible {
	opacity: 1;
	transform: none;
}

.pw-workflow__timeline[data-animation="draw-line"] .pw-workflow__step {
	opacity: 1;
	transform: none;
}

/* -------------------------------------------------- */
/* Responsive: horizontal se apila en móvil            */
/* -------------------------------------------------- */

@media (max-width: 767px) {
	.pw-workflow__timeline--horizontal {
		display: flex !important;
		flex-direction: column;
	}

	.pw-workflow__timeline--horizontal .pw-workflow__step {
		flex-direction: row;
		align-items: flex-start;
		text-align: left;
		width: 100%;
	}

	.pw-workflow__timeline--horizontal .pw-workflow__node {
		width: auto;
	}

	.pw-workflow__connector--horizontal-line {
		display: none;
	}

	.pw-workflow__timeline--horizontal .pw-workflow__content {
		margin-top: 0;
		padding-left: 20px;
		padding-bottom: 20px;
	}
}
