/* Container */
.epf-flow-wrapper {
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.epf-flow-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

/* Individual Node (Card + Label + Connecting Arrow) */
.epf-step-node {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex: 1 1 0;
    min-width: 0;
}

.epf-step-node:last-child {
    flex: 0 1 auto;
}

/* Step Item Column (Card + Title) */
.epf-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

/* Rounded Square Card */
.epf-step-card {
    width: 105px;
    height: 105px;
    border-radius: 22px;
    background-color: #bfbfbf;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.epf-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.epf-step-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Step Label Below Card */
.epf-step-label {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
}

/* Connecting Arrow */
.epf-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 42px; /* Aligned vertically with card center */
    padding: 0 6px;
    flex-shrink: 0;
    color: #111111;
}

.epf-step-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
    transition: transform 0.2s ease;
}

/* ===================================================
   TABLET RESPONSIVENESS (max-width: 1024px)
=================================================== */
@media screen and (max-width: 1024px) {
    .epf-flow-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px 8px;
        overflow-x: visible;
    }

    .epf-step-node {
        flex: 0 0 calc(25% - 10px);
        margin-bottom: 15px;
    }

    .epf-step-arrow {
        display: none; /* Hide linear horizontal arrows when items wrap in multiple rows */
    }

    .epf-step-card {
        width: 90px;
        height: 90px;
        border-radius: 18px;
    }

    .epf-step-label {
        font-size: 12px;
    }
}

/* ===================================================
   MOBILE RESPONSIVENESS (max-width: 600px)
=================================================== */
@media screen and (max-width: 600px) {
    .epf-flow-container {
        gap: 20px 8px;
    }

    .epf-step-node {
        flex: 0 0 calc(33.333% - 8px);
    }

    .epf-step-card {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }

    .epf-step-label {
        font-size: 11.5px;
        margin-top: 10px;
    }
}

/* Small Screen Phones (max-width: 400px) */
@media screen and (max-width: 400px) {
    .epf-step-node {
        flex: 0 0 calc(50% - 8px);
    }

    .epf-step-card {
        width: 75px;
        height: 75px;
    }
}