/* =========================================================
 * NationVoice — Impact Stats Widget
 * Fully isolated under .nv-stats-wrapper
 * ========================================================= */

.nv-stats-wrapper {
	--nv-primary: #3c4d8c;
	--nv-accent: #ff6716;
	--nv-heading-alt: #264653;
	--nv-heading: #202428;
	--nv-text: #5e5e5e;
	--nv-bg: #ffffff;
	--nv-bg-soft: #f7f7f9;

	--nv-radius-sm: 8px;
	--nv-radius-md: 16px;
	--nv-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
	--nv-shadow-md: 0 8px 24px rgba(0,0,0,0.08);

	--nv-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--nv-trans: 0.35s var(--nv-ease);

	--nv-font-body: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nv-font-heading: Georgia, 'Times New Roman', serif;

	font-family: var(--nv-font-body);
	color: var(--nv-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.nv-stats-wrapper *,
.nv-stats-wrapper *::before,
.nv-stats-wrapper *::after {
	box-sizing: border-box;
}

.elementor-page .nv-stats-wrapper,
.e-con .nv-stats-wrapper,
.elementor-widget-container .nv-stats-wrapper {
	color: var(--nv-text) !important;
	font-family: var(--nv-font-body) !important;
}

/* =========================================================
 * SECTION FRAME
 * ========================================================= */
.nv-stats-wrapper .nv-stats {
	width: 100%;
	background-color: var(--nv-bg);
	position: relative;
	overflow: hidden;
}

.nv-stats-wrapper .nv-stats__container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 96px 32px;
}

.nv-stats-wrapper .nv-stats__inner {
	display: flex;
	flex-direction: column;
	gap: 56px;
	align-items: center;
}

/* =========================================================
 * HEADER
 * ========================================================= */
.nv-stats-wrapper .nv-stats__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
	max-width: 720px;
	margin: 0 auto;
}

.nv-stats-wrapper .nv-stats__heading {
	margin: 0;
	font-family: var(--nv-font-heading) !important;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--nv-heading-alt) !important;
}

.nv-stats-wrapper .nv-stats__subheading {
	margin: 0;
	font-family: var(--nv-font-body) !important;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--nv-text) !important;
	max-width: 60ch;
}

.nv-stats-wrapper .nv-stats__divider {
	display: block;
	width: 60px;
	height: 3px;
	background-color: var(--nv-heading-alt);
	border-radius: 2px;
	margin-top: 12px;
}

/* =========================================================
 * STATS GRID
 * ========================================================= */
.nv-stats-wrapper .nv-stats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	width: 100%;
	align-items: stretch;
}

/* Manual column counts */
.nv-stats-wrapper .nv-stats__grid--cols-1 { grid-template-columns: 1fr; }
.nv-stats-wrapper .nv-stats__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nv-stats-wrapper .nv-stats__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nv-stats-wrapper .nv-stats__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.nv-stats-wrapper .nv-stats__grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.nv-stats-wrapper .nv-stats__grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

.nv-stats-wrapper .nv-stats__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 24px 16px;
	text-align: center;
	transition: transform var(--nv-trans);
}

.nv-stats-wrapper .nv-stats--hover-lift .nv-stats__item:hover {
	transform: translateY(-6px);
}

/* Vertical divider between items */
.nv-stats-wrapper .nv-stats--vdivider .nv-stats__item:not(:last-child)::after {
	content: "";
	position: absolute;
	right: calc(var(--nv-grid-gap, 32px) * -0.5);
	top: 20%;
	bottom: 20%;
	width: 1px;
	background-color: rgba(0, 0, 0, 0.10);
}

/* Icon */
.nv-stats-wrapper .nv-stats__icon {
	font-size: 40px;
	line-height: 1;
	color: var(--nv-primary) !important;
	margin-bottom: 4px;
}

/* Number wrap (prefix + num + suffix) */
.nv-stats-wrapper .nv-stats__num-wrap {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	line-height: 1;
}

.nv-stats-wrapper .nv-stats__num {
	font-family: var(--nv-font-heading) !important;
	font-weight: 700;
	font-size: 96px;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--nv-heading-alt) !important;
	font-variant-numeric: tabular-nums;
	display: inline-block;
}

.nv-stats-wrapper .nv-stats__prefix,
.nv-stats-wrapper .nv-stats__suffix {
	font-family: var(--nv-font-heading) !important;
	font-weight: 700;
	font-size: 60px;
	line-height: 1;
	color: var(--nv-heading-alt) !important;
	letter-spacing: -0.02em;
}

.nv-stats-wrapper .nv-stats__label {
	font-family: var(--nv-font-body) !important;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.2px;
	color: var(--nv-text) !important;
	max-width: 28ch;
	margin-top: 8px;
}

/* =========================================================
 * STAGGER FADE-UP ENTRANCE (CSS-only, autoplays on render)
 * ========================================================= */
.nv-stats-wrapper .nv-stats__anim {
	opacity: 0;
	transform: translateY(20px);
	animation: nv-stats-fade-up 0.7s var(--nv-ease) forwards;
	animation-delay: calc(var(--nv-anim-order, 0) * 100ms);
}

@keyframes nv-stats-fade-up {
	to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
@media (max-width: 1024px) {
	.nv-stats-wrapper .nv-stats__container {
		padding: 72px 24px;
	}
	.nv-stats-wrapper .nv-stats__heading { font-size: 32px; }
	.nv-stats-wrapper .nv-stats__num { font-size: 72px; }
	.nv-stats-wrapper .nv-stats__prefix,
	.nv-stats-wrapper .nv-stats__suffix { font-size: 44px; }
	.nv-stats-wrapper .nv-stats__icon { font-size: 32px; }
	.nv-stats-wrapper .nv-stats__inner { gap: 48px; }
}

@media (max-width: 768px) {
	.nv-stats-wrapper .nv-stats__container {
		padding: 56px 16px;
	}
	.nv-stats-wrapper .nv-stats__inner { gap: 40px; }
	.nv-stats-wrapper .nv-stats__heading { font-size: 26px; }
	.nv-stats-wrapper .nv-stats__subheading { font-size: 15px; }

	.nv-stats-wrapper .nv-stats__grid {
		grid-template-columns: 1fr !important;
		gap: 24px;
	}

	.nv-stats-wrapper .nv-stats__item {
		padding: 16px 12px;
	}

	.nv-stats-wrapper .nv-stats__num { font-size: 56px; }
	.nv-stats-wrapper .nv-stats__prefix,
	.nv-stats-wrapper .nv-stats__suffix { font-size: 36px; }
	.nv-stats-wrapper .nv-stats__label { font-size: 14px; }

	/* Hide vertical dividers on mobile (stack) */
	.nv-stats-wrapper .nv-stats--vdivider .nv-stats__item:not(:last-child)::after {
		display: none;
	}

	/* On mobile, replace with a horizontal divider below each */
	.nv-stats-wrapper .nv-stats--vdivider .nv-stats__item:not(:last-child) {
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
		padding-bottom: 28px;
	}
}

@media (max-width: 480px) {
	.nv-stats-wrapper .nv-stats__num { font-size: 48px; }
	.nv-stats-wrapper .nv-stats__heading { font-size: 22px; }
}

/* =========================================================
 * REDUCED MOTION
 * ========================================================= */
@media (prefers-reduced-motion: reduce) {
	.nv-stats-wrapper *,
	.nv-stats-wrapper *::before,
	.nv-stats-wrapper *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
	.nv-stats-wrapper .nv-stats__anim {
		opacity: 1 !important;
		transform: none !important;
	}
}
