/* ============================================================
   DevWerk Booking Flow — 3-step process showcase
   Desktop: horizontal cards with connector
   Mobile: vertical timeline with glowing markers
   ============================================================ */

.booking-flow-section {
    position: relative;
    overflow: hidden;
}

.booking-flow-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    counter-reset: bf-step;
}

/* Horizontal connector line behind cards on desktop */
.booking-flow-track::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 16.6%;
    right: 16.6%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(241, 85, 3, 0) 0%,
        rgba(241, 85, 3, 0.35) 20%,
        rgba(241, 85, 3, 0.55) 50%,
        rgba(241, 85, 3, 0.35) 80%,
        rgba(241, 85, 3, 0) 100%
    );
    z-index: 0;
}

/* --- Step --- */
.bf-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    z-index: 1;
}

/* Step marker (the numbered orb on the line) */
.bf-step-marker {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(241, 85, 3, 0.12);
    border: 2px solid rgba(241, 85, 3, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px rgba(11, 11, 13, 0.95), 0 8px 28px rgba(241, 85, 3, 0.18);
    z-index: 2;
}

.bf-step-num {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f15503;
    z-index: 2;
}

.bf-step-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(241, 85, 3, 0.4);
    animation: bfPulse 2.4s ease-out infinite;
    pointer-events: none;
}

.bf-step:nth-child(2) .bf-step-pulse { animation-delay: 0.4s; }
.bf-step:nth-child(3) .bf-step-pulse { animation-delay: 0.8s; }

@keyframes bfPulse {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Card */
.bf-step-card {
    position: relative;
    flex: 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 26px 24px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    isolation: isolate;
}

.bf-step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(241, 85, 3, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.bf-step-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 85, 3, 0.22) 0%, transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}

.bf-step-card:hover .bf-step-glow {
    opacity: 0.85;
}

.bf-step-icon,
.bf-step-title,
.bf-step-desc {
    position: relative;
    z-index: 1;
}

.bf-step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f15503;
    transition: transform 0.4s ease, border-color 0.3s ease;
}

.bf-step-card:hover .bf-step-icon {
    transform: scale(1.08);
    border-color: rgba(241, 85, 3, 0.4);
}

.bf-step-icon i {
    font-size: 22px;
    line-height: 1;
}

.bf-step-title {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.bf-step-desc {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    margin: 0;
}

/* --- Mobile / tablet: vertical timeline --- */
@media (max-width: 767px) {
    .booking-flow-track {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-left: 0;
    }

    /* Hide horizontal connector */
    .booking-flow-track::before {
        display: none;
    }

    .bf-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 18px;
        position: relative;
        padding-bottom: 28px;
    }

    /* Vertical connector line between steps */
    .bf-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 56px;
        left: 22px;
        bottom: -4px;
        width: 2px;
        background: linear-gradient(
            180deg,
            rgba(241, 85, 3, 0.5) 0%,
            rgba(241, 85, 3, 0.15) 100%
        );
        z-index: 0;
    }

    .bf-step-marker {
        width: 46px;
        height: 46px;
        margin-top: 4px;
        box-shadow: 0 0 0 4px rgba(11, 11, 13, 0.95), 0 6px 20px rgba(241, 85, 3, 0.2);
    }

    .bf-step-num {
        font-size: 12px;
    }

    .bf-step-card {
        flex: 1;
        text-align: left;
        padding: 20px 20px;
        border-radius: 14px;
    }

    .bf-step-icon {
        width: 36px;
        height: 36px;
        margin: 0 0 12px 0;
        border-radius: 10px;
    }

    .bf-step-icon i {
        font-size: 18px;
    }

    .bf-step-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .bf-step-desc {
        font-size: 13.5px;
        line-height: 1.55;
    }
}

/* Tablet: 1 column with timeline (between mobile and desktop) */
@media (min-width: 768px) and (max-width: 991px) {
    .booking-flow-track {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 620px;
        margin: 0 auto;
    }

    .booking-flow-track::before {
        display: none;
    }

    .bf-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 22px;
    }

    .bf-step-card {
        flex: 1;
        text-align: left;
    }

    .bf-step-icon {
        margin: 0 0 14px 0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bf-step-pulse,
    .bf-step-card,
    .bf-step-icon,
    .bf-step-glow {
        animation: none !important;
        transition: none;
    }
    .bf-step-card:hover {
        transform: none;
    }
}
