/* ===================================================================
   PROFESSIONAL WORKFLOW SECTION - INSTITUTIONAL GRADE
   Structured, engineered, fintech-professional
   =================================================================== */

.how-it-works {
    padding: 90px 0;
    background: var(--surface-0);
    position: relative;
}

/* Section Header - Refined */
.how-it-works .section-header {
    text-align: center;
    margin-bottom: 70px;
}

.how-it-works .section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    color: var(--text-primary);
}

.how-it-works .section-subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-secondary);
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* Workflow Timeline Container */
.workflow-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    position: relative;
    margin-bottom: 60px;
    padding: 0 20px;
}

/* Connector Line */
.workflow-timeline::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(to right, 
        var(--color-primary) 0%, 
        var(--color-primary) 25%,
        var(--border-color) 25%,
        var(--border-color) 50%,
        var(--border-color) 50%,
        var(--border-color) 75%,
        var(--border-color) 75%,
        var(--border-color) 100%);
    z-index: 0;
}

/* Individual Workflow Step */
.workflow-step {
    position: relative;
    z-index: 1;
}

/* Step Number Badge - Circle with Icon */
.step-number {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.3s ease;
}

.workflow-step:nth-child(1) .step-number {
    background: linear-gradient(135deg, var(--color-primary), #3b82f6);
    border-color: var(--color-primary);
}

.step-number span {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.workflow-step:not(:first-child) .step-number {
    background: var(--surface-card);
    border-color: var(--border-color);
}

.workflow-step:not(:first-child) .step-number span {
    color: var(--text-secondary);
}

/* Step Icon - Minimal Professional SVG */
.step-icon-svg {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-icon-svg svg {
    width: 16px;
    height: 16px;
    fill: var(--color-primary);
}

/* Step Content */
.step-content {
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-primary);
}

.step-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 280px;
    margin: 0 auto;
    opacity: 0.85;
}

/* Remove old step-icon styling */
.step-icon {
    display: none;
}

/* Hover Effect - Subtle */
.workflow-step:hover .step-number {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

/* Transparency Note - Refined */
.workflow-note {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px;
    background: var(--surface-1);
    border-left: 3px solid var(--color-primary);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    align-items: start;
}

.note-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-top: 2px;
}

.note-icon i {
    font-size: 1.125rem;
}

.workflow-note p {
    font-size: 0.9375rem;
    line-height: 1.65;
    margin: 0;
    color: var(--text-secondary);
}

.workflow-note strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Dark Mode Refinements */
body[data-theme="dark"] .how-it-works {
    background: #0f172a;
}

body[data-theme="dark"] .step-number {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
}

body[data-theme="dark"] .workflow-step:first-child .step-number {
    background: linear-gradient(135deg, var(--color-primary), #3b82f6);
    border-color: var(--color-primary);
}

body[data-theme="dark"] .step-icon-svg {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .workflow-note {
    background: rgba(30, 41, 59, 0.5);
    border-left-color: var(--color-primary);
}

/* Tablet Responsive */
@media (max-width: 968px) {
    .workflow-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 60px 32px;
    }
    
    .workflow-timeline::before {
        display: none;
    }
    
    .step-number {
        width: 64px;
        height: 64px;
    }
    
    .step-number span {
        font-size: 1.25rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .how-it-works {
        padding: 70px 0 !important;
    }
    
    .how-it-works .section-header {
        margin-bottom: 50px !important;
    }
    
    .how-it-works .section-header h2 {
        font-size: 1.75rem !important;
    }
    
    .workflow-timeline {
        grid-template-columns: 1fr !important;
        gap: 48px !important;
        padding: 0 10px !important;
        position: relative;
    }
    
    /* Vertical Connector Line */
    .workflow-timeline::before {
        display: block !important;
        top: 36px;
        bottom: 36px;
        left: 36px;
        right: auto;
        width: 2px;
        height: auto;
        background: var(--border-color) !important;
    }
    
    .workflow-step {
        display: flex;
        gap: 20px;
        text-align: left;
    }
    
    .step-number {
        flex-shrink: 0;
        width: 56px !important;
        height: 56px !important;
        margin: 0 !important;
    }
    
    .step-number span {
        font-size: 1.125rem !important;
    }
    
    .step-icon-svg {
        width: 24px !important;
        height: 24px !important;
        top: -8px !important;
        right: -8px !important;
    }
    
    .step-icon-svg svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .step-content {
        flex: 1;
        text-align: left !important;
        padding-top: 8px !important;
    }
    
    .step-title {
        font-size: 1.0625rem !important;
        margin-bottom: 8px !important;
    }
    
    .step-description {
        font-size: 0.9375rem !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .workflow-note {
        padding: 18px 20px !important;
        gap: 14px !important;
    }
    
    .workflow-note p {
        font-size: 0.875rem !important;
    }
}
