/* ===============================================
   HOW IT WORKS (CHIC REDESIGN)
   =============================================== */

.how-it-works {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
    overflow: hidden;
}

/* Background Decoration */
.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 20%);
    pointer-events: none;
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Connector Line (behind steps) */
.steps-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(37, 99, 235, 0.1),
            rgba(37, 99, 235, 0.3),
            rgba(37, 99, 235, 0.1));
    transform: translateY(-50%);
    z-index: 0;
    border-radius: 99px;
    display: none;
    /* Using explicit arrows instead for now */
}

/* Step Card */
.step {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 2px 4px -1px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.step:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow:
        0 20px 40px -12px rgba(37, 99, 235, 0.1),
        0 10px 20px -12px rgba(37, 99, 235, 0.05);
}

/* Step Number (Badge) */
.step-number {
    position: absolute;
    top: -15px;
    left: 2rem;
    right: auto;
    font-size: 1.25rem;
    font-weight: 800;
    color: #7858f9;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    border: 1px solid #e5e7eb;
    font-family: 'Inter', sans-serif;
    z-index: 10;
    line-height: 1;
    opacity: 1;
}

.step:hover .step-number {
    transform: translateY(-2px);
    background: #7858f9;
    color: white;
    border-color: #5e3fd9;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

/* Step Icon */
.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #7858f9;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f3f4f6;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #7858f9, #402f82);
    color: white;
    border-color: transparent;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.2);
}

/* Step Content */
.step h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.step p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Arrow Connector */
.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.5rem;
    animation: pulseArrow 2s infinite;
}

@keyframes pulseArrow {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 500px;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: -1rem 0;
        animation: pulseArrowVertical 2s infinite;
    }

    @keyframes pulseArrowVertical {

        0%,
        100% {
            transform: rotate(90deg) translateY(0);
            opacity: 0.5;
        }

        50% {
            transform: rotate(90deg) translateY(-5px);
            opacity: 1;
        }
    }
}

@media (max-width: 576px) {
    .step {
        padding: 2rem 1.5rem;
    }

    .step-number {
        font-size: 3rem;
        top: 0.5rem;
        right: 1rem;
    }
}