/* ===== How It Works Section ===== */
.how-it-works-section {
    background: var(--white);
    position: relative;
}


/* ===== Workflow Grid ===== */
.workflow-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    align-items: stretch; /* Добавлено - колонки растягиваются на одинаковую высоту */
}

/* ===== Workflow Columns ===== */
.workflow-column {
    background: var(--white);
    padding: 32px 24px;
    height: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    display: flex; /* Добавлено */
    flex-direction: column; /* Добавлено */
}

.workflow-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.charity-column::before {
    background: var(--accent);
}

.charity-column .column-title {
    color: var(--accent);
}

.charity-column .step-title {
    color: var(--white);
}

.charity-column .step-description {
    color: var(--bg-light);
}

/* ===== Column Headers ===== */
.column-header {
    margin-bottom: 40px;
}

.column-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(14px, 3vw, 16px);
    color: var(--dark);
    margin: 0;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .column-title {
        font-size: clamp(12px, 3vw, 16px);
        padding: 0;
    }
}

/* ===== Workflow Steps ===== */
.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
    height: 100%; /* Добавлено */
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    flex: 1; /* Добавлено - каждый шаг занимает равную высоту */
    min-height: 80px; /* Добавлено - минимальная высота для мобильных */
}

.workflow-step:not(.final-step)::after {
    content: '';
    position: absolute;
    left: 40px;
    top: 64px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(44, 194, 149, 0.2) 100%);
}

.charity-column {
    background: var(--accent-dark);
}

/* ===== Step Icons ===== */
.step-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(44, 194, 149, 0.25);
}

.step-icon img {
    filter: brightness(0) invert(1);
}

/* ===== Step Content ===== */
.step-content {
    flex: 1;
    padding-top: 8px;
}

.step-title {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.step-description {
    font-size: 15px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ===== Step Arrows ===== */
.step-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(44, 194, 149, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    color: var(--accent);
}

/* ===== Column Actions ===== */
.column-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* ===== Desktop Layout ===== */
@media (min-width: 900px) {

    .workflow-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: flex-start;
    }

    .workflow-column {
        padding: 40px 32px;
    }

    .column-header {
        margin-bottom: 48px;
    }

    .workflow-steps {
        margin-bottom: 40px;
        gap: 32px;
    }

    .workflow-step {
        min-height: 100px; /* Увеличена минимальная высота для десктопа */
    }

    .workflow-step:not(.final-step)::after {
        left: 52px;
        top: 64px;
        bottom: -48px;
    }

    .step-icon {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .step-content {
        padding-top: 12px;
    }

    .step-title {
        font-size: 19px;
    }

    .step-description {
        font-size: 16px;
    }

    .step-arrow {
        margin-top: 20px;
    }
}

@media (min-width: 1200px) {
    .workflow-grid {
        gap: 24px;
    }

    .workflow-column {
        padding: 48px 40px;
    }

    .workflow-steps {
        gap: 36px;
    }

    .workflow-step {
        min-height: 120px; /* Еще больше для больших экранов */
    }

    .step-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .step-icon img {
        width: 36px;
        height: 36px;
    }
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 480px) {
    .workflow-column {
        padding: 24px 20px;
    }

    .column-header {
        margin-bottom: 32px;
    }

    .workflow-steps {
        gap: 20px;
        margin-bottom: 28px;
    }

    .workflow-step {
        min-height: 70px; /* Меньше для мобильных */
    }

    .workflow-step:not(.final-step)::after {
        left: 32px;
        top: 56px;
        bottom: -20px;
    }

    .step-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .step-icon img {
        width: 28px;
        height: 28px;
    }

    .step-title {
        font-size: 16px;
    }

    .step-description {
        font-size: 14px;
    }

    .step-arrow {
        width: 28px;
        height: 28px;
        margin-top: 12px;
    }
}
