﻿/* قسم "الخبير بالأرقام" (Shared/KhabeerStats.razor) */

.sh-kh-stats-section {
    direction: rtl;
    position: relative;
    overflow: hidden;
    width: min(var(--default-spacing), var(--default-max-spacing));
    margin-inline: auto;
    margin-top: 40px;
    padding: 70px 60px;
    background-color: var(--sec-color);
    border-radius: 20px;
    isolation: isolate;
}

/* نقش الشبكة الخفيف متل الفوتر وصفحة "غير موجود" */
.sh-kh-stats-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/pictures/GridPattern.png") center / cover no-repeat;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.sh-kh-stats-head {
    text-align: center;
    margin-bottom: 44px;
}

.sh-kh-stats-title {
    font-family: var(--kh-bold);
    font-weight: normal;
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    line-height: 1.35;
    color: #fff;
}

.sh-kh-stats-title span {
    color: var(--pr-color);
}

.sh-kh-stats-subtitle {
    font-family: var(--kh-reg);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    margin-top: 12px;
}

.sh-kh-stats-grid {
    display: grid;
    /* كل كرت عمود بنفس العرض، فبيضلّوا بصف واحد سواء كانوا 3 أو 4 */
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 24px;
}

.sh-kh-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 24px 32px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(91, 225, 30, 0.18);
    border-radius: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.sh-kh-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 225, 30, 0.5);
    background-color: rgba(91, 225, 30, 0.06);
}

.sh-kh-stat-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--pr-color);
    background-color: rgba(91, 225, 30, 0.1);
    border: 1px solid rgba(91, 225, 30, 0.35);
    margin-bottom: 20px;
}

.sh-kh-stat-icon svg {
    width: 30px;
    height: 30px;
}

.sh-kh-stat-number {
    font-family: var(--kh-bold);
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    line-height: 1;
    color: var(--pr-color);
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.sh-kh-stat-label {
    font-family: var(--kh-reg);
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 12px;
}

/* تابلت */
@media(max-width: 880px) {
    .sh-kh-stats-section {
        padding: 56px 28px;
    }

    .sh-kh-stats-grid {
        gap: 14px;
    }

    .sh-kh-stat-card {
        padding: 28px 12px 24px;
    }

    .sh-kh-stat-label {
        font-size: 1rem;
    }
}

/* موبايل: الكروت تحت بعض، والأيقونة جنب الرقم مشان ما ياخد القسم طول كبير */
@media(max-width: 600px) {
    .sh-kh-stats-section {
        padding: 44px 18px;
    }

    .sh-kh-stats-head {
        margin-bottom: 28px;
    }

    .sh-kh-stats-grid {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sh-kh-stat-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas: "icon number" "icon label";
        column-gap: 18px;
        align-items: center;
        text-align: right;
        padding: 20px;
    }

    .sh-kh-stat-icon {
        grid-area: icon;
        width: 56px;
        height: 56px;
        margin-bottom: 0;
    }

    .sh-kh-stat-number {
        grid-area: number;
        font-size: 2.3rem;
        direction: rtl;
    }

    .sh-kh-stat-label {
        grid-area: label;
        font-size: 1rem;
        margin-top: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-kh-stat-card {
        transition: none;
    }

    .sh-kh-stat-card:hover {
        transform: none;
    }
}
