.how-kowork-works {
    padding: 0px 64px 32px 32px;
    text-align: center;
    color: var(--color-white);
}

.how-title {
    font-size: 24px;
    margin-bottom: 48px;
    opacity: 50%;
}

/* === Grid برای چیدمان step ها === */
.steps {
    display: grid;
    /* تا جایی که جا شود در یک ردیف؛ بعد ستون‌بندی با ردیف‌های مساوی */
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 15px;
    justify-content: center;   /* یک ستونِ نهایی را وسط‌چین می‌کند */
    align-items: stretch;       /* ارتفاع آیتم‌ها در هر ردیف برابر می‌شود */
}

/* کارت‌های step با ارتفاع برابر در هر ردیف */
.step {
    /* اندازه منعطف برابر با سلول‌های گرید */
    height: 100%;
    width: 100%;

    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* چیدمان داخلی کارت */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    position: relative;
    padding: 4rem 1rem 1rem;
    gap: 1rem;
}

.step-icon {
    font-size: 40px;
    margin-bottom: 16px;
    position: absolute;
    top: -13%;
    right: 0%;
}

.step-title {
    font-size: 20px;
    margin-bottom: unset;
    font-weight: bold;
    white-space: nowrap;
}

.step-desc {
    font-size: 18px;
    color: var(--color-white);
    line-height: 24px;
    font-weight: 700;
    text-align: right;
    margin: unset;
    opacity: 70%;
}

.step-button {
    margin-top: 16px;
    background: linear-gradient(90deg, #2390E6 0%, #1280E2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 32px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step a{
    margin: 0 auto;
}

.step-button:hover {
    background: linear-gradient(90deg, #1280E2 0%, #2390E6 100%);
}

/* این گوشه‌دهی‌ها در Grid الزاماً به اولین/آخرین ستون بصری نمی‌خورند،
   اما در صورت نیاز نگه داشته شده‌اند */
.steps .step:first-child{
    -moz-border-radius-topright: 30px;
    border-top-right-radius:30px;
    -moz-border-radius-bottomright: 30px;
    border-bottom-right-radius:30px;
}
.steps .step:last-child{
    -moz-border-radius-topleft: 30px;
    border-top-left-radius:30px;
    -moz-border-radius-bottomleft: 30px;
    border-bottom-left-radius:30px;
}


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

    .steps .step:first-child{
        -moz-border-radius-topright: 10px;
        border-top-right-radius:10px;
        -moz-border-radius-bottomright: 10px;
        border-bottom-right-radius:10px;
    }
    .steps .step:last-child{
        -moz-border-radius-topleft: 10px;
        border-top-left-radius:10px;
        -moz-border-radius-bottomleft: 10px;
        border-bottom-left-radius:10px;
    }
}

@media (max-width: 767px) {
    .steps{
        grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    }

    .steps {
        grid-template-columns: 1fr;  /* یک ستون */
        justify-items: center;        /* ستون تکی را وسط می‌آورد */
    }
    .step {
        background: transparent;
        border: 0;
        max-width: 360px;             /* برای وسط‌چینِ زیباتر در موبایل */
        width: 100%;
    }

    .step-icon{
        width: 100%;
    }

    .how-title {
        font-size: 20px;
    }

    .step-title{
        width: 100%;
        font-size: 30px;
        white-space: unset;
    }

    .step-desc{
        width: 100%;
        text-align: center;
        font-weight: 600;
        font-size: 18px;
    }
}
