/* How It Works Section */
.how-it-works {
    margin-top: 5rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(7, 125, 109, 0.03) 0%, rgba(7, 125, 109, 0.01) 100%);
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(7, 125, 109, 0.1);
}

.how-it-works h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.step-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--rcash-primary);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--rcash-primary) 0%, var(--rcash-primary-light) 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(7, 125, 109, 0.4);
}

.step-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(7, 125, 109, 0.1) 0%, rgba(7, 125, 109, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1.5rem;
    border: 2px solid rgba(7, 125, 109, 0.2);
}

.step-icon i {
    font-size: 2rem;
    color: var(--rcash-primary);
}

.step-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Money Grid Enhancement */
.mobile-money-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .mobile-money-grid {
        grid-template-columns: 1fr;
    }
}

.country-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.country-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.country-flag {
    font-size: 3rem;
    line-height: 1;
}

.country-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-money-services {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.service-card:hover {
    background: var(--bg-primary);
    border-color: var(--rcash-primary);
    transform: translateX(5px);
}

.service-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: white;
}

.service-card.mpesa .service-logo {
    background: linear-gradient(135deg, #00a65a 0%, #00d168 100%);
}

.service-card.zaad .service-logo {
    background: linear-gradient(135deg, #e74c3c 0%, #ff6b6b 100%);
}

.service-card.sahal .service-logo {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.service-card.evc .service-logo {
    background: linear-gradient(135deg, #9b59b6 0%, #bb8fce 100%);
}

.service-card.banks .service-logo {
    background: linear-gradient(135deg, #f39c12 0%, #f8c471 100%);
}

.service-info {
    flex: 1;
}

.service-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-info p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-features span {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    background: rgba(7, 125, 109, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(7, 125, 109, 0.2);
}

/* Integration Stats */
.integration-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--rcash-primary);
}

.stat-card i {
    font-size: 3rem;
    color: var(--rcash-primary);
    margin-bottom: 1rem;
}

.stat-card h4 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .how-it-works {
        padding: 2rem 1.5rem;
    }
    
    .how-it-works h3 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .step-card {
        padding: 2rem 1.5rem;
    }
    
    .country-header {
        flex-direction: column;
        text-align: center;
    }
    
    .integration-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .service-card {
        flex-direction: column;
        text-align: center;
    }
    
    .service-logo {
        margin: 0 auto;
    }
    
    .service-features {
        justify-content: center;
    }
    
    .integration-stats {
        grid-template-columns: 1fr;
    }
}

/* Dark Theme */
[data-theme="dark"] .country-section {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .service-card {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .step-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .how-it-works {
    background: linear-gradient(135deg, rgba(7, 125, 109, 0.1) 0%, rgba(7, 125, 109, 0.05) 100%);
    border-color: rgba(7, 125, 109, 0.3);
}

[data-theme="dark"] .step-icon {
    background: linear-gradient(135deg, rgba(7, 125, 109, 0.2) 0%, rgba(7, 125, 109, 0.1) 100%);
    border-color: rgba(7, 125, 109, 0.3);
}
