/* How It Works Section */
.how-it-works-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: transparent;
}

.how-it-works-header {
    text-align: center;
    margin-bottom: 5rem;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
    z-index: 2;
}

/* Connecting Line */
.step-connection-line {
    position: absolute;
    top: 80px;
    /* Align with icon centers */
    left: 10%;
    width: 80%;
    height: 4px;
    background: rgba(59, 130, 246, 0.2);
    z-index: 0;
}

.step-connection-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 60%;
    /* Default visible length */
    background: var(--secondary-gradient);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transition: width 1.5s ease-out;
}

.how-step-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    transition: all 0.5s var(--ease-out);
    z-index: 1;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.how-step-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(59, 130, 246, 0.1);
}

/* Spotlight Effect Overlay */
.how-step-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(59, 130, 246, 0.08),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.how-step-card:hover::after {
    opacity: 1;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border: 2px solid var(--accent-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-main);
    z-index: 2;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.0));
    width: 80px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    border: 1px solid var(--card-border);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.step-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Animations */
.how-it-works-section.visible .step-connection-progress {
    width: 100%;
}

@media (max-width: 900px) {
    .step-grid {
        grid-template-columns: 1fr;
    }

    .step-connection-line {
        display: none;
    }

    .step-number {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin: 0 auto 1rem auto;
    }
}