/* Scoped to the rental process; retain the original border's layout space. */
#arrendamiento-process .product-steps article {
    position: relative;
    border-top-color: transparent;
    --step-delay: 0.25s;
    --line-delay: 0.15s;
    transition: transform 0.25s ease;
}

#arrendamiento-process .product-steps article:nth-child(2) {
    --step-delay: 0.45s;
    --line-delay: 0.30s;
}

#arrendamiento-process .product-steps article:nth-child(3) {
    --step-delay: 0.65s;
    --line-delay: 0.45s;
}

#arrendamiento-process .product-steps article:nth-child(4) {
    --step-delay: 0.85s;
    --line-delay: 0.60s;
}

#arrendamiento-process .product-steps article::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--dark);
    transform-origin: left;
    transition: background-color 0.25s ease;
}

#arrendamiento-process .step-icon {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#arrendamiento-process.process-animate:not(.process-ready) .product-section-heading {
    animation: rental-heading-reveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both paused;
}

/* Animate the contents together so the upper line can draw independently. */
#arrendamiento-process.process-animate:not(.process-ready) .product-steps article > * {
    animation: rental-step-reveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--step-delay) both paused;
}

#arrendamiento-process.process-animate:not(.process-ready) .product-steps article > span {
    animation-name: rental-number-reveal;
}

#arrendamiento-process.process-animate:not(.process-ready) .product-steps article > h3,
#arrendamiento-process.process-animate:not(.process-ready) .product-steps article > p {
    animation-delay: calc(var(--step-delay) + 0.06s);
}

#arrendamiento-process.process-animate:not(.process-ready) .product-steps .step-icon {
    animation-name: rental-icon-reveal;
    animation-duration: 0.4s;
    animation-delay: calc(var(--step-delay) + 0.06s);
}

#arrendamiento-process.process-animate:not(.process-ready) .product-steps article::before {
    animation: rental-line-reveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--line-delay) both paused;
}

#arrendamiento-process.process-animate.process-visible .product-section-heading,
#arrendamiento-process.process-animate.process-visible .product-steps article > *,
#arrendamiento-process.process-animate.process-visible .product-steps article::before {
    animation-play-state: running;
}

@keyframes rental-heading-reveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rental-step-reveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rental-number-reveal {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rental-icon-reveal {
    from { opacity: 0; transform: scale(0.88) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes rental-line-reveal {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (hover: hover) and (pointer: fine) {
    #arrendamiento-process.process-ready .product-steps article:hover {
        transform: translateY(-4px);
    }

    #arrendamiento-process.process-ready .product-steps article:hover::before {
        background-color: var(--primary);
    }

    #arrendamiento-process.process-ready .product-steps article:hover .step-icon {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 0 14px rgba(21, 174, 176, 0.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    #arrendamiento-process .product-section-heading,
    #arrendamiento-process .product-steps article,
    #arrendamiento-process .product-steps article > *,
    #arrendamiento-process .product-steps article::before {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    #arrendamiento-process .product-steps article:hover::before {
        background-color: var(--primary);
    }
}
