.stats-block {
    position: relative;
}

.stats-block .stats-inner {
    display: flex;
    gap: var(--vert-spacing-2) var(--hori-spacing-5);
}

.stats-block .stats-inner > * {
    flex: 1 1 50%;
    min-width: 0;
}

.stats-block .stats-inner.contentRight {
    flex-direction: row-reverse;
}

.stats-block .stats-grid {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--vert-spacing-2) var(--hori-spacing-2);
}

.stats-block .stat {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.stats-block .stat::before {
    display: none; /* in case the theme adds custom list bullets */
}

.stats-block .stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-block .stat-number * {
    font-family: 'Cabin';
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-weight: 600;
    line-height: 1;
    color: var(--color-blue);
    font-variant-numeric: tabular-nums; /* stops the width jittering while counting */
    white-space: nowrap;
    font-size: 1.65rem;
}

.stats-block .stat-number .stat-count {
    font-size: clamp(2rem, 4vw, 3rem);
}

.stats-block .stat-label {
    font-family: 'Cabin';
    font-size: 1.65rem;
    font-weight: 600;
    text-align: center;
    margin-top: .5rem;
    line-height: 1.3;
    color: var(--color-blue);
}

.stats-block .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Remove top padding when the section above has the same background */
.bg-white + .stats-block.bg-white > .container,
.bg-cyan + .stats-block.bg-cyan > .container,
.bg-azure + .stats-block.bg-azure > .container,
.bg-pink + .stats-block.bg-pink > .container {
    padding-top: 0 !important;
}

/* Hero style 1 (azure) followed by an azure Statistics block */
#hero:has(> .container.style1) + .stats-block.bg-azure > .container {
    padding-top: 0 !important;
}

@media (max-width: 945.98px) {
    .stats-block .stats-inner,
    .stats-block .stats-inner.contentRight {
        flex-direction: column;
        align-items: start;
    }

    .stats-block .stats-inner > * {
        width: 100%;
    }
	
	.stats-block .stats-content {
		text-align: center !important; 
	}
	
	.stats-block .stats-grid {
		display: flex !important;
		flex-wrap: wrap;
		justify-content: center;
		gap: 2rem clamp(2rem, 10vw, 4rem);
	}
}

@media (max-width: 575.98px) {
    .stats-block .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	.stats-block .stats-content {
		max-width: 40rem;
	}
}