/* ==========================================
   HOW IT WORKS SECTION
   Base styles from global-sections-patterns.css
   Section-specific styles only
========================================== */

.how-it-works {
    padding: 80px 0;
    background: var(--color-white, #FFFFFF);
    position: relative;
}

/* 
   NOTE: The following are NOT duplicated from global-sections-patterns.css:
   - .section-header, .section-eyebrow, .section-title, .section-text
   - These are already defined globally and will work automatically
*/

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    margin-bottom: 48px;
}

/* Step Card - Darker grey to stand out from white background */
.step-card {
    text-align: center;
    position: relative;
    padding: 32px 24px;
    background: #F5F7FA;  /* Changed from var(--color-background) to darker grey */
    border-radius: 24px;
    transition: all var(--transition-normal, 0.3s ease);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.step-card:hover {
    transform: translateY(-5px);
    background: #EEF2F7;  /* Even darker on hover */
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    border-color: transparent;
}

/* Step Number */
.step-number {
    position: absolute;
    top: -15px;
    left: 24px;
    font-size: var(--font-2xl, 1.75rem);
    font-weight: var(--font-weight-bold, 700);
    color: rgba(77, 106, 255, 0.15);
    line-height: 1;
}

/* Step Icon */
.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--color-primary-light, #7B93FF) 0%, var(--color-primary, #4D6AFF) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal, 0.3s ease);
    box-shadow: 0 10px 25px -8px rgba(77, 106, 255, 0.3);
}

.step-card:hover .step-icon {
    transform: scale(1.05);
    box-shadow: 0 15px 30px -8px rgba(77, 106, 255, 0.4);
}

.step-icon i {
    font-size: 36px;
    color: var(--color-white, #FFFFFF);
}

/* Step Title */
.step-title {
    font-size: var(--font-lg, 1.125rem);
    font-weight: var(--font-weight-bold, 700);
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--color-black, #111111);
}

/* Step Description */
.step-description {
    font-size: var(--font-sm, 0.875rem);
    line-height: var(--line-relaxed, 1.65);
    color: var(--color-text-light, #4A4A4A);
    margin-bottom: 0;
}

/* Step Connector Line (between steps) */
.step-connector {
    display: none;
}

/* Steps Footer */
.steps-footer {
    text-align: center;
}

.steps-footer .btn-lg {
    min-height: 52px;
    padding: 14px 36px;
    font-size: var(--font-base, 1rem);
    margin-bottom: 16px;
}

.steps-note {
    font-size: var(--font-xs, 0.75rem);
    color: var(--color-text-lighter, #8A8A8A);
    margin-bottom: 0;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
========================================== */

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .how-it-works {
        padding: 60px 0;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 24px;
    }
    
    .step-card {
        padding: 28px 20px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
    }
    
    .step-icon i {
        font-size: 32px;
    }
    
    .step-title {
        font-size: var(--font-base, 1rem);
    }
    
    .step-description {
        font-size: var(--font-xs, 0.75rem);
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .how-it-works {
        padding: 48px 0;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step-card {
        padding: 24px 20px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 20px;
    }
    
    .step-number {
        position: static;
        font-size: var(--font-xl, 1.5rem);
        flex-shrink: 0;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .step-icon i {
        font-size: 28px;
    }
    
    .step-content {
        flex: 1;
    }
    
    .step-title {
        font-size: var(--font-base, 1rem);
        margin-bottom: 6px;
    }
    
    .step-description {
        font-size: var(--font-xs, 0.75rem);
        margin-bottom: 0;
    }
    
    /* Hide connector on mobile */
    .step-connector {
        display: none !important;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .how-it-works {
        padding: 40px 0;
    }
    
    .step-card {
        padding: 16px;
        gap: 12px;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
    }
    
    .step-icon i {
        font-size: 22px;
    }
    
    .step-number {
        font-size: var(--font-lg, 1.125rem);
    }
    
    .step-title {
        font-size: var(--font-sm, 0.875rem);
    }
    
    .step-description {
        font-size: 0.6875rem;
    }
    
    .steps-footer .btn-lg {
        min-height: 46px;
        padding: 12px 28px;
        font-size: var(--font-sm, 0.875rem);
    }
}

/* Desktop connector line (visible only on desktop) */
@media (min-width: 992px) {
    .step-connector {
        display: block;
        position: absolute;
        top: 110px;
        right: -30px;
        width: 30px;
        height: 2px;
        background: linear-gradient(90deg, var(--color-primary, #4D6AFF), rgba(77, 106, 255, 0.2));
    }
    
    .step-card:last-child .step-connector {
        display: none;
    }
}