/* ========================================
   HOW IT WORKS SECTION
   ======================================== */

.how-it-works-section {
    background: #f5f5f5;
    padding: 20px 20px;
    position: relative;
}

.how-it-works-container {
    max-width: 1200px;
    margin: 0 auto;
}

.how-it-works-header {
    margin-bottom: 60px;
}

.how-it-works-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.how-it-works-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.how-it-works-title .highlight {
    color: #dc3545;
}

.how-it-works-description {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    line-height: 1.6;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

/* Connecting Lines */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 95px;
    left: 12.5%;
    right: 12.5%;
    height: 5px;
    background: radial-gradient(#dc3545, transparent);
    z-index: 0;
}

/* Step Card */
.step-card {
    padding: 40px 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Step Number Circle */
.step-number {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: #dc3545;
    margin: 0 auto 25px;
    position: relative;
    z-index: 2;
}

.step-card:nth-child(2) .step-number,
.step-card:nth-child(3) .step-number,
.step-card:nth-child(4) .step-number {
    background: #ffffff;
    border-color: #ddd;
    color: #999;
}

/* Step Title */
.step-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Step Description */
.step-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Mid-width: 4 columns too narrow — use 2×2 */
@media (min-width: 993px) and (max-width: 1299px) {
    .how-it-works-container {
        padding: 0 clamp(12px, 2vw, 20px);
    }

    .how-it-works-title {
        font-size: clamp(1.75rem, 3vw, 2.625rem);
    }

    .how-it-works-description {
        font-size: clamp(16px, 1.4vw, 18px);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 32px;
    }

    .steps-grid::before {
        display: none;
    }

    .step-number {
        width: clamp(88px, 11vw, 120px);
        height: clamp(88px, 11vw, 120px);
        font-size: clamp(34px, 4.5vw, 48px);
    }

    .step-card {
        padding: clamp(28px, 3vw, 40px) clamp(18px, 2vw, 25px);
    }

    .step-title {
        font-size: clamp(17px, 1.45vw, 20px);
    }

    .step-description {
        font-size: clamp(14px, 1.2vw, 15px);
    }
}

@media (min-width: 1300px) and (max-width: 1499px) {
    .how-it-works-container {
        padding: 0 clamp(14px, 2vw, 24px);
    }

    .steps-grid {
        gap: clamp(18px, 2vw, 30px);
    }

    .step-card {
        padding: clamp(30px, 2.8vw, 40px) clamp(18px, 1.8vw, 25px);
    }

    .step-title {
        font-size: clamp(17px, 1.35vw, 20px);
    }

    .step-number {
        width: clamp(100px, 9vw, 120px);
        height: clamp(100px, 9vw, 120px);
        font-size: clamp(40px, 3.8vw, 48px);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .steps-grid::before {
        display: none;
    }
    
    .how-it-works-title {
        font-size: 36px;
    }

    .step-card {
        overflow: hidden;
        min-height: 220px;
    }

    .step-number {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: clamp(96px, 12vw, 128px);
        height: clamp(96px, 12vw, 128px);
        margin: 0;
        border: 2px solid rgba(220, 53, 69, 0.16);
        border-radius: 50%;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: clamp(64px, 9vw, 96px);
        color: rgba(220, 53, 69, 0.12);
        z-index: 0;
        pointer-events: none;
        line-height: 1;
    }

    .step-card:nth-child(2) .step-number,
    .step-card:nth-child(3) .step-number,
    .step-card:nth-child(4) .step-number {
        background: transparent;
        border: 2px solid rgba(220, 53, 69, 0.16);
        color: rgba(220, 53, 69, 0.12);
    }

    .step-title,
    .step-description {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 768px) {
    .how-it-works-section {
        padding: 60px 15px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .how-it-works-title {
        font-size: 32px;
    }
    
    .how-it-works-description {
        font-size: 16px;
    }
    
    .step-number {
        font-size: clamp(56px, 18vw, 88px);
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .how-it-works-title {
        font-size: 28px;
    }
    
    .step-number {
        font-size: clamp(48px, 20vw, 72px);
    }
}
