/* ============================================================
   FOOTER STATISTICS ROW  —  [bes_footer_stats]
   Up to 5 items: roomy default layout.
   6 items ("is-compact"): tighter spacing + smaller type so the
   whole row still fits on a single line.
   ============================================================ */

.bes-footer-stats {
    /* Tunable knobs. The compact variant only changes these. */
    --bes-stat-scale: 1;      /* multiplier applied to both font sizes */
    --bes-stat-gap: 34px;     /* space on each side of a divider       */
    --bes-stat-icon: 46px;    /* icon box size                          */

    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.bes-footer-stat {
    flex: 1 1 0;
    min-width: 0;                 /* lets items shrink instead of overflowing */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 var(--bes-stat-gap);
    box-sizing: border-box;
}

/* Thin divider between items (not before the first one) */
.bes-footer-stat + .bes-footer-stat {
    border-left: 1px solid rgba(255, 255, 255, .22);
}

.bes-footer-stat__icon {
    width: var(--bes-stat-icon);
    height: var(--bes-stat-icon);
    object-fit: contain;
    display: block;
    margin-bottom: 12px;
}

.bes-footer-stat__num {
    display: block;
    font-size: calc(var(--bes-stat-num-size, 22px) * var(--bes-stat-scale));
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 4px;
}

.bes-footer-stat__desc {
    display: block;
    font-size: calc(var(--bes-stat-desc-size, 13px) * var(--bes-stat-scale));
    line-height: 1.35;
    opacity: .85;
    /* Allow long labels like "Projects Completed" to break instead of
       pushing the row wider than the container. */
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ---------- 6 items: shrink everything down ---------- */
.bes-footer-stats.is-compact {
    --bes-stat-scale: .82;
    --bes-stat-gap: 18px;
    --bes-stat-icon: 36px;
}

.bes-footer-stats.is-compact .bes-footer-stat__icon { margin-bottom: 8px; }

/* Extra squeeze on mid-size screens before wrapping is needed */
@media (max-width: 1200px) {
    .bes-footer-stats            { --bes-stat-gap: 20px; --bes-stat-icon: 40px; }
    .bes-footer-stats.is-compact { --bes-stat-scale: .74; --bes-stat-gap: 12px; --bes-stat-icon: 32px; }
}

/* ---------- Tablet: two rows ---------- */
@media (max-width: 900px) {
    .bes-footer-stats {
        flex-wrap: wrap;
        --bes-stat-scale: 1;
        --bes-stat-gap: 16px;
        --bes-stat-icon: 40px;
        row-gap: 28px;
    }
    .bes-footer-stats.is-compact { --bes-stat-scale: 1; }
    .bes-footer-stat {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    /* Dividers only inside a row, not at the start of a new one */
    .bes-footer-stat + .bes-footer-stat { border-left: 1px solid rgba(255, 255, 255, .22); }
    .bes-footer-stat:nth-child(3n + 1)  { border-left: 0; }
}

/* ---------- Mobile: two per row ---------- */
@media (max-width: 560px) {
    .bes-footer-stats { row-gap: 24px; }
    .bes-footer-stat {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .bes-footer-stat:nth-child(3n + 1) { border-left: 1px solid rgba(255, 255, 255, .22); }
    .bes-footer-stat:nth-child(2n + 1) { border-left: 0; }
}
