/* ═══════════════════════════════════════════════════════════
   مراحل کار - پیشوند ps-
   ═══════════════════════════════════════════════════════════ */

.ps-section {
    padding: 80px 20px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.ps-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ═══════════ Header وسط‌چین ═══════════ */
.ps-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
}

.ps-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--rw-primary, #2563EB);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.ps-badge i { font-size: 14px; line-height: 1; }

.ps-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 34px;
    color: #1E3A8A;
    margin: 0 0 10px;
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

.ps-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin: 0;
    line-height: 1.8;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

/* ═══════════ Timeline ═══════════ */
.ps-timeline {
    position: relative;
    padding: 20px 0;
}

/* خط عمودی وسط */
.ps-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 3px;
    background: linear-gradient(180deg,
        var(--rw-primary, #2563EB) 0%,
        var(--rw-secondary, #1E3A8A) 50%,
        var(--rw-primary, #2563EB) 100%);
    transform: translateX(50%);
    opacity: 0.25;
    border-radius: 3px;
}

/* ═══ هر مرحله ═══ */
.ps-step {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.ps-step:last-child { margin-bottom: 0; }

/* ═══ دایره شماره ═══ */
.ps-num {
    grid-column: 2;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35),
                0 0 0 8px #fff,
                0 0 0 12px rgba(37, 99, 235, 0.08);
}

.ps-num-text {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 26px;
    color: #fff;
    line-height: 1;
}

/* ═══ کارت مرحله ═══ */
.ps-card {
    grid-column: 1;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    background: #F8FAFC;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

/* حالت زوج: کارت سمت چپ می‌رود */
.ps-step:nth-child(odd) .ps-card {
    grid-column: 3;
    order: 3;
}

.ps-step:nth-child(odd) .ps-num {
    order: 2;
}

.ps-step:nth-child(even) .ps-card {
    grid-column: 1;
    order: 2;
    text-align: right;
}

.ps-step:nth-child(even) .ps-num {
    order: 3;
}

.ps-card:hover {
    background: #fff;
    border-color: var(--rw-primary, #2563EB);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
    transform: translateY(-4px);
}

/* ═══ آیکون کارت ═══ */
.ps-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    border-radius: 14px;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.ps-icon i { color: #fff; line-height: 1; }

/* ═══ محتوا ═══ */
.ps-content { flex: 1; min-width: 0; }

.ps-card-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 17px;
    color: #1E3A8A;
    margin: 0 0 6px;
    line-height: 1.4;
}

.ps-desc {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.9;
    margin: 0;
}

/* ═══ Empty ═══ */
.ps-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
    font-size: 15px;
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 900px) {
    .ps-section { padding: 60px 16px; }
    .ps-title { font-size: 26px; }
    .ps-subtitle { font-size: 13px; }
    .ps-header { margin-bottom: 40px; }

    /* تبدیل تایم‌لاین دو طرفه به یک طرفه (فقط سمت راست) */
    .ps-timeline::before {
        right: 30px;
        transform: translateX(50%);
    }

    .ps-step {
        grid-template-columns: 60px 1fr;
        gap: 16px;
        margin-bottom: 28px;
    }

    .ps-num {
        grid-column: 1 !important;
        order: 1 !important;
        width: 60px;
        height: 60px;
        box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3),
                    0 0 0 5px #fff;
    }

    .ps-num-text { font-size: 20px; }

    .ps-card,
    .ps-step:nth-child(odd) .ps-card,
    .ps-step:nth-child(even) .ps-card {
        grid-column: 2 !important;
        order: 2 !important;
        padding: 16px 18px;
        text-align: right;
    }
}

@media (max-width: 500px) {
    .ps-section { padding: 50px 14px; }
    .ps-title { font-size: 22px; }
    .ps-card { gap: 12px; padding: 14px; }
    .ps-icon { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
    .ps-card-title { font-size: 15px; }
    .ps-desc { font-size: 12px; line-height: 1.8; }
}