/* ============ Z Pasos Animados ============ */

.z-steps {
    --z-circle: 130px;
    --z-line-color: #f0a7c6;
    --z-dot: 4px;
    --z-gap: 16px;
    --z-speed: 0.8s;
    --z-line-min: 80px;

    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
}

.z-step {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- Círculo e icono --- */
.z-step-circle-wrap {
    position: relative;
}

.z-step-circle {
    width: var(--z-circle);
    height: var(--z-circle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.z-step-circle i {
    line-height: 1;
}

.z-step-circle svg,
.z-step-circle img {
    display: block;
}

/* --- Número --- */
.z-step-num {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* --- Línea punteada --- */
.z-steps-connector {
    flex: 1 1 var(--z-line-min);
    min-width: var(--z-line-min);
    max-width: 220px;
    height: var(--z-dot);
    margin-top: calc(var(--z-circle) / 2 - var(--z-dot) / 2);
    background-image: radial-gradient(
        circle at calc(var(--z-dot) / 2) 50%,
        var(--z-line-color) calc(var(--z-dot) / 2),
        transparent calc(var(--z-dot) / 2 + 0.5px)
    );
    background-size: var(--z-gap) var(--z-dot);
    background-repeat: repeat-x;
    background-position: 0 50%;
}

.z-line-animated .z-steps-connector {
    animation: z-dots-move var(--z-speed) linear infinite;
}

@keyframes z-dots-move {
    to {
        background-position-x: var(--z-gap);
    }
}

/* --- Texto --- */
.z-step-text {
    margin-top: 28px;
    max-width: 240px;
    line-height: 1.5;
}

.z-step-text p {
    margin: 0;
}

.z-step-text b,
.z-step-text strong {
    font-weight: 700;
}

/* --- Efectos hover --- */
.z-hover-lift .z-step:hover .z-step-circle {
    transform: translateY(-8px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.z-hover-scale .z-step:hover .z-step-circle {
    transform: scale(1.08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

.z-hover-pulse .z-step:hover .z-step-num {
    animation: z-pulse 0.9s ease-out infinite;
}

@keyframes z-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(229, 57, 122, 0.45); }
    100% { box-shadow: 0 0 0 14px rgba(229, 57, 122, 0); }
}

/* --- Animaciones de entrada (activadas por JS al hacer scroll) --- */
.z-anim-up .z-step,
.z-anim-zoom .z-step,
.z-anim-pop .z-step,
.z-anim-up .z-steps-connector,
.z-anim-zoom .z-steps-connector,
.z-anim-pop .z-steps-connector {
    opacity: 0;
}

.z-anim-up .z-step          { transform: translateY(36px); }
.z-anim-zoom .z-step        { transform: scale(0.75); }
.z-anim-pop .z-step         { transform: scale(0.4); }

.z-anim-up .z-step,
.z-anim-zoom .z-step {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.z-anim-pop .z-step {
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.7, 0.5, 1);
}

.z-anim-up .z-steps-connector,
.z-anim-zoom .z-steps-connector,
.z-anim-pop .z-steps-connector {
    transition: opacity 0.6s ease;
}

.z-steps.z-in .z-step,
.z-steps.z-in .z-steps-connector {
    opacity: 1;
    transform: none;
}

/* En el editor de Elementor, mostrar todo sin esperar al scroll */
.elementor-editor-active .z-steps .z-step,
.elementor-editor-active .z-steps .z-steps-connector {
    opacity: 1 !important;
    transform: none !important;
}

/* --- Responsive: apilar en vertical --- */
@media (max-width: 767px) {
    .z-steps {
        flex-direction: column;
        align-items: center;
    }

    .z-steps-connector {
        flex: 0 0 auto;
        width: var(--z-dot);
        min-width: 0;
        height: 50px;
        min-height: 50px;
        margin: 18px 0;
        background-image: radial-gradient(
            circle at 50% calc(var(--z-dot) / 2),
            var(--z-line-color) calc(var(--z-dot) / 2),
            transparent calc(var(--z-dot) / 2 + 0.5px)
        );
        background-size: var(--z-dot) var(--z-gap);
        background-repeat: repeat-y;
        background-position: 50% 0;
    }

    .z-line-animated .z-steps-connector {
        animation: z-dots-move-v var(--z-speed) linear infinite;
    }

    @keyframes z-dots-move-v {
        to {
            background-position-y: var(--z-gap);
        }
    }
}
