/* HB Stats Counter — HBrand Studio */

.hbsc {
	--hbsc-gap: 16px;
	--hbsc-cols: 4;
	--hbsc-grid-width: 900px;
	--hbsc-icon: 36px;
	--hbsc-align: center;
	--hbsc-text-align: center;
	--hbsc-divider: rgba(255, 255, 255, 0.25);
	--hbsc-accent: var(--color-secundario, #77C5BB);
	--hbsc-white: var(--color-blanco, #FFFFFF);

	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 100px 24px;
	background-color: var(--color-oscuro, #0A2F4D);
	text-align: var(--hbsc-text-align);
	box-sizing: border-box;
}

.hbsc *,
.hbsc *::before,
.hbsc *::after {
	box-sizing: border-box;
}

.hbsc__bg,
.hbsc__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.hbsc__bg {
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.hbsc--fixed .hbsc__bg {
	background-attachment: fixed;
}

@media (hover: none), (max-width: 1024px) {
	.hbsc--fixed .hbsc__bg {
		background-attachment: scroll;
	}
}

.hbsc__overlay {
	background-color: rgba(10, 47, 77, 0.62);
}

.hbsc__inner {
	position: relative;
	width: 100%;
	max-width: 1200px;
	display: flex;
	flex-direction: column;
	align-items: var(--hbsc-align);
	gap: var(--hbsc-gap);
}

/* Encabezado */
.hbsc__line {
	display: block;
	width: 48px;
	height: 3px;
	background-color: var(--hbsc-accent);
}

.hbsc .hbsc__title {
	margin: 0;
	font-family: var(--fuente-titulos, "Playfair Display", Georgia, serif);
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	color: var(--hbsc-white);
}

.hbsc .hbsc__subtitle {
	margin: 0;
	max-width: 620px;
	font-family: var(--fuente-cuerpo, "Open Sans", Arial, sans-serif);
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
}

/* Cifras */
.hbsc__grid {
	display: grid;
	grid-template-columns: repeat(var(--hbsc-cols), minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 32px;
	width: 100%;
	max-width: var(--hbsc-grid-width);
	margin-top: 24px;
}

.hbsc__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: var(--hbsc-align);
	gap: 6px;
	min-width: 0;
}

.hbsc--dividers .hbsc__item + .hbsc__item::before {
	content: "";
	position: absolute;
	top: 10%;
	bottom: 10%;
	left: -12px;
	border-left: 1px solid var(--hbsc-divider);
}

.hbsc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--hbsc-icon);
	line-height: 1;
	color: var(--hbsc-accent);
	margin-bottom: 6px;
}

.hbsc__icon svg {
	width: var(--hbsc-icon);
	height: var(--hbsc-icon);
	fill: var(--hbsc-accent);
}

.hbsc .hbsc__number {
	margin: 0;
	font-family: var(--fuente-titulos, "Playfair Display", Georgia, serif);
	font-weight: 700;
	font-size: 52px;
	line-height: 1;
	color: var(--hbsc-white);
	white-space: nowrap;
}

.hbsc__visual {
	display: inline-flex;
	align-items: baseline;
}

.hbsc__value {
	display: inline-block;
	text-align: center;
}

.hbsc__prefix,
.hbsc__suffix {
	font-size: 0.7em;
}

/* Texto para lectores de pantalla */
.hbsc .hbsc__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hbsc .hbsc__label {
	margin: 0;
	font-family: var(--fuente-cuerpo, "Open Sans", Arial, sans-serif);
	font-weight: 600;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}

/* Aparición suave (la activa el JS al entrar en pantalla) */
.hbsc--fade.hbsc--ready .hbsc__item {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
	transition-delay: calc(var(--hbsc-i, 0) * var(--hbsc-stagger, 150ms));
}

.hbsc--fade.hbsc--ready.is-inview .hbsc__item {
	opacity: 1;
	transform: none;
}

/* Móvil */
@media (max-width: 767px) {
	.hbsc {
		padding: 64px 16px;
		--hbsc-cols: 2;
	}

	.hbsc .hbsc__title {
		font-size: 30px;
	}

	.hbsc .hbsc__number {
		font-size: 42px;
	}

	.hbsc--dividers .hbsc__item::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hbsc--fade.hbsc--ready .hbsc__item {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
