/* =========================================================
   Company Home - Stats Bar Section Styles (مستقل عن باقي السكاشن)
   ========================================================= */

:root {
    --ch-main: #222168;
    --ch-second: #6bbdcd;
    --ch-white: #ffffff;
    --ch-font: 'Plus Jakarta Sans', sans-serif;
}

.ch-stats * {
    box-sizing: border-box;
}

.ch-stats {
    direction: ltr;
    font-family: var(--ch-font);
    padding: 40px 32px;
    background: #eef2f6;

    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.ch-stats.ch-in-view {
    opacity: 1;
    transform: translateY(0);
}

.ch-stats__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.ch-stats__item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 200px;
}

.ch-stats__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--ch-main);
    flex-shrink: 0;
}

.ch-stats__icon svg {
    width: 100%;
    height: 100%;
}

.ch-stats__label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ch-main);
    line-height: 1.4;
    max-width: 140px;
}

.ch-stats__divider {
    width: 1px;
    height: 40px;
    background: rgba(34, 33, 104, 0.12);
    flex-shrink: 0;
}

/* ---------- الموبايل: مربعات كارت بدل صف واحد، 2 في الصف ---------- */
@media (max-width: 767px) {
    .ch-stats {
        padding: 32px 16px;
    }

    .ch-stats__divider {
        display: none;
    }

    .ch-stats__inner {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .ch-stats__item {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 14px;
        min-width: unset;
        min-height: 150px;
        background: var(--ch-white);
        border: 1px solid rgba(34, 33, 104, 0.08);
        border-radius: 20px;
        padding: 18px 12px;
        box-shadow: 0 10px 26px rgba(34, 33, 104, 0.08);

        opacity: 0;
        transform: translateY(16px) scale(0.96);
        transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
    }

    .ch-stats.ch-in-view .ch-stats__item {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* تدرّج بسيط في ظهور كل كارت بعد التاني
       بنستخدم nth-of-type لأن عناصر الـ divider (span) بتتحط بينهم في الـ DOM
       فلو استخدمنا nth-child هيبوظ الترقيم */
    .ch-stats.ch-in-view .ch-stats__item:nth-of-type(1) { transition-delay: 0.05s; }
    .ch-stats.ch-in-view .ch-stats__item:nth-of-type(2) { transition-delay: 0.15s; }
    .ch-stats.ch-in-view .ch-stats__item:nth-of-type(3) { transition-delay: 0.25s; }
    .ch-stats.ch-in-view .ch-stats__item:nth-of-type(4) { transition-delay: 0.35s; }

    .ch-stats__item:active {
        transform: scale(0.97);
        box-shadow: 0 4px 14px rgba(34, 33, 104, 0.1);
    }

    .ch-stats__icon {
        width: 44px;
        height: 44px;
        background: rgba(107, 189, 205, 0.14);
        border-radius: 50%;
        padding: 10px;
    }

    .ch-stats__label {
        max-width: 100%;
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ch-stats__item {
        border-radius: 16px;
        padding: 14px 10px;
    }

    .ch-stats__icon {
        width: 38px;
        height: 38px;
    }

    .ch-stats__label {
        font-size: 11.5px;
    }
}