/* =========================================================
   PROCESO EN 4 PASOS
   ========================================================= */

.process-section {
    padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 24px);
    background: #ffffff;
}

.process-container {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
}

.process-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6ea89f;
}

.process-title {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    color: #0f2a43;
    line-height: 1.2;
}

.process-subtitle {
    max-width: 640px;
    margin: 16px auto 0;
    color: #5b6b7c;
    font-size: 16px;
    line-height: 1.6;
}

/* ---------------------------------------------------------
   Pasos
--------------------------------------------------------- */
.process-steps {
    position: relative;
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* línea conectora horizontal, detrás de los íconos */
.process-steps::before {
    content: "";
    position: absolute;
    top: 36px;
    left: calc(12.5% - 2px);
    right: calc(12.5% - 2px);
    height: 2px;
    background: #cfeef2;
    z-index: 0;
}

.process-steps::after {
    content: "";
    position: absolute;
    top: 36px;
    left: calc(12.5% - 2px);
    width: 0%;
    height: 2px;
    background: #6ea89f;
    z-index: 0;
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.process-steps.is-visible::after {
    width: calc(75% + 4px);
}

.process-step {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-steps.is-visible .process-step {
    opacity: 1;
    transform: translateY(0);
}

.process-steps.is-visible .process-step:nth-child(1) {
    transition-delay: 0.05s;
}

.process-steps.is-visible .process-step:nth-child(2) {
    transition-delay: 0.25s;
}

.process-steps.is-visible .process-step:nth-child(3) {
    transition-delay: 0.45s;
}

.process-steps.is-visible .process-step:nth-child(4) {
    transition-delay: 0.65s;
}

.process-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}

.process-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #223746;
    border: 2px solid #bfe9ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(20, 184, 198, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* solo en dispositivos con mouse real, para no dejar el hover
   "pegado" al tocar en celular */
@media (hover: hover) and (pointer: fine) {
    .process-step:hover .process-icon {
        border-color: #6ea89f;
        box-shadow: 0 10px 24px -8px rgba(20, 184, 198, 0.5);
        transform: translateY(-3px);
    }
}

.process-number {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6ea89f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px #fff;
}

.process-step h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f2a43;
}

.process-step p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7a89;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 860px) {
    .process-steps {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    /* la línea pasa a ser vertical, detrás de los íconos */
    .process-steps::before,
    .process-steps::after {
        top: 36px;
        bottom: 36px;
        left: 35px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .process-steps::after {
        width: 2px;
        height: 0%;
        transition: height 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
    }

    .process-steps.is-visible::after {
        height: calc(100% - 72px);
        width: 2px;
    }

    .process-step {
        display: grid;
        grid-template-columns: 72px 1fr;
        grid-template-areas:
            "icon title"
            "icon text";
        column-gap: 20px;
        row-gap: 6px;
        align-items: start;
        text-align: left;
        transform: translateX(-16px);
    }

    .process-steps.is-visible .process-step {
        transform: translateX(0);
    }

    /* esto es lo que faltaba: sin esto, el grid autocolocaba el
     <p> en la columna angosta del ícono (por eso se veía una
     palabra por línea) */
    .process-icon-wrap {
        grid-area: icon;
        margin: 0;
    }

    .process-step h3 {
        grid-area: title;
        padding-top: 4px;
    }

    .process-step p {
        grid-area: text;
    }
}

/* pantallas muy angostas: íconos un poco más chicos para que
   el texto a la derecha tenga más aire */
@media (max-width: 380px) {
    .process-icon-wrap {
        width: 56px;
        height: 56px;
    }

    .process-step {
        grid-template-columns: 56px 1fr;
        column-gap: 14px;
    }

    .process-steps::before,
    .process-steps::after {
        left: 27px;
        top: 28px;
    }

    .process-steps.is-visible::after {
        height: calc(100% - 56px);
    }

    .process-number {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .process-step h3 {
        font-size: 15px;
    }

    .process-step p {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .process-step,
    .process-steps::after,
    .process-icon {
        transition: none !important;
    }

    .process-steps.is-visible .process-step {
        opacity: 1;
        transform: none;
    }

    .process-steps.is-visible::after {
        width: calc(75% + 4px);
    }

    @media (max-width: 860px) {
        .process-steps.is-visible::after {
            height: calc(100% - 72px);
        }
    }
}