/* Stats/counters rows on the program portals (Dubai Way, Nanny, Safari Driver home and about pages).
   Column counts come from the page as custom properties — see Helpers/StatsGrid.cs — so the row always
   splits into equal-width columns for however many counters the admin configured (at most 5 per row).

   Each portal keeps its own look (gaps, padding, fonts, dividers); this file only decides the columns.
   The doubled class out-ranks the portals' single-class grid rules at every breakpoint. */
.stats-grid.stats-grid {
    display: grid;
    grid-template-columns: repeat(var(--stats-cols-lg, 4), minmax(0, 1fr));
}

.stats-grid > * {
    min-width: 0;
}

@media (max-width: 1100px) {
    .stats-grid.stats-grid {
        grid-template-columns: repeat(var(--stats-cols-md, 3), minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .stats-grid.stats-grid {
        grid-template-columns: repeat(var(--stats-cols-sm, 2), minmax(0, 1fr));
    }
}

/* Small phones: the portals' large stat numbers need the full width. */
@media (max-width: 480px) {
    .stats-grid.stats-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
