/* How It Works Section - Exact Figma Implementation */
.how-it-works-section {
    min-height: 100vh;
    background-color: #3A3A3A;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

/* Override global h2 styles */
.how-it-works-section h2 {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-align: inherit !important;
    margin: inherit !important;
}

.how-it-works-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Section Title */
.how-it-works-title {
    margin-bottom: 120px;
}

.how-it-works-section .how-it-works-subtitle {
    font-family: 'Montserrat', 'Arial Black', sans-serif !important;
    font-weight: 800 !important;
    font-size: 55.23px !important;
    font-style: normal !important;
    color: #8F8F8F !important;
    margin: 0 !important;
    line-height: normal !important;
    letter-spacing: 2px !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}

.how-it-works-section .how-it-works-main-title {
    font-family: 'Montserrat', 'Arial Black', sans-serif !important;
    font-weight: 800 !important;
    font-size: 93.73px !important;
    font-style: normal !important;
    color: #DAD3C7 !important;
    margin: 0 !important;
    line-height: normal !important;
    letter-spacing: 2px !important;
    text-align: center !important;
}

/* Steps Container */
.how-it-works-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    gap: 20px;
}

/* Continuous connection line across all steps */
.how-it-works-steps::before {
    content: '';
    position: absolute;
    top: 40px; /* Center of step-number (80px height / 2) */
    left: 50%; /* Start from center of first step */
    right: 50%; /* End at center of last step */
    height: 1px;
    background-color: #8F8F8F;
    z-index: 1;
    transform: translateX(-50%);
    width: calc(100% - 160px); /* Full width minus circle diameters */
}

/* Step Items */
.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 240px; /* زيادة الارتفاع لاستيعاب المسافة الإضافية */
}

.step-number {
    font-family: 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 800;
    font-size: 48px;
    color: #8F8F8F;
    background-color: #3A3A3A;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    border: 1px solid #8F8F8F;
    position: relative;
    z-index: 2;
}

.step-icon {
    margin-bottom: 40px; /* زيادة المسافة بين الأيقونة والنص */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px; /* ارتفاع ثابت للأيقونات */
}

.step-icon svg {
    width: 80px;
    height: auto;
}

.step-label {
    font-family: 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #8F8F8F;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    text-transform: uppercase;
    position: absolute;
    bottom: 0; /* وضع النص في أسفل العنصر */
    left: 50%;
    transform: translateX(-50%); /* توسيط النص أفقياً */
}

/* Responsive Design */
@media (max-width: 1200px) {
    .how-it-works-steps {
        max-width: 100%;
        gap: 15px;
    }

    .how-it-works-steps::before {
        top: 35px; /* Adjust for smaller circle */
        width: calc(100% - 140px); /* Adjust width for smaller circles */
    }

    .how-it-works-subtitle {
        font-size: 48px;
    }

    .how-it-works-main-title {
        font-size: 80px;
    }

    .step-number {
        width: 70px;
        height: 70px;
        font-size: 40px;
    }
}

@media (max-width: 992px) {
    .how-it-works-steps::before {
        top: 30px; /* Adjust for smaller circle */
        width: calc(100% - 120px); /* Adjust width for smaller circles */
    }

    .how-it-works-subtitle {
        font-size: 42px;
    }

    .how-it-works-main-title {
        font-size: 70px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .step-icon svg {
        width: 60px;
    }

    .step-label {
        font-size: 14px;
        white-space: nowrap;
    }
}@media (max-width: 768px) {
    .how-it-works-steps {
        flex-direction: column;
        gap: 60px;
        align-items: center;
    }

    /* Hide connection line on mobile */
    .how-it-works-steps::before {
        display: none;
    }

    .how-it-works-subtitle {
        font-size: 36px;
    }

    .how-it-works-main-title {
        font-size: 60px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .step-icon {
        height: 60px; /* ارتفاع ثابت للأيقونات في الموبايل */
        margin-bottom: 30px; /* مسافة أكبر في الموبايل */
    }

    .step-icon svg {
        width: 60px;
    }

    .step-item {
        min-height: 200px; /* زيادة الارتفاع لاستيعاب المسافة الإضافية */
    }

    .step-label {
        font-size: 16px;
        white-space: nowrap;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .how-it-works-title {
        margin-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .how-it-works-subtitle {
        font-size: 24px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    .how-it-works-main-title {
        font-size: 38px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    .how-it-works-container {
        padding: 40px 15px;
    }

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

    .step-item {
        min-height: 180px;
    }

    .step-icon {
        margin-bottom: 25px;
    }

    .step-label {
        font-size: 12px;
        white-space: normal;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        line-height: 1.2;
    }

    .how-it-works-steps {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .how-it-works-subtitle {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }

    .how-it-works-main-title {
        font-size: 32px !important;
        line-height: 1.4 !important;
    }
}
