/**
 * hero.css — Banner principal de la portada + barra de estadísticas.
 * Se carga solo en la página de inicio.
 * Autor: Cusco Creativos.
 */

:root {
	--mtn-red: #d61f47;
	--mtn-red-dark: #b81639;
	--mtn-dark: #2b2b2b;
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */
.hero {
	position: relative;
	overflow: visible;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(560px, 72vh, 760px);
	padding-top: 40px;
	background-color: #14612f;
	background-image: linear-gradient(135deg, #14612f 0%, #1a7a3c 55%, #2a9d5a 100%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hero-video-wrap {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.hero-video-wrap iframe,
.hero-video-wrap #hero-yt-player,
.hero-video-iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100vw;
	height: 56.25vw;
	min-height: 100%;
	min-width: 177.78vh;
	border: 0;
	pointer-events: none;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(to right, rgba(3, 20, 10, 0.70) 0%, rgba(3, 20, 10, 0.30) 55%, rgba(3, 20, 10, 0.45) 100%),
		linear-gradient(to bottom, rgba(3, 20, 10, 0.15), rgba(3, 20, 10, 0.45));
}

.hero-container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--mtn-header-max, 1600px);
	margin-inline: auto;
	padding-inline: clamp(16px, 3vw, 40px);
}

.hero-content {
	max-width: 640px;
	padding-block: 40px 130px;
	color: #fff;
}

.hero-title {
	margin: 0 0 18px;
	color: #fff;
	font-family: var(--mtn-font-heading);
	font-weight: 700;
	font-size: clamp(2.2rem, 4.6vw, 4rem);
	line-height: 1.08;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
	margin: 0 0 28px;
	max-width: 30em;
	color: rgba(255, 255, 255, 0.95);
	font-family: var(--mtn-font-heading);
	font-style: italic;
	font-weight: 300;
	font-size: clamp(1rem, 1.5vw, 1.2rem);
	line-height: 1.6;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

/* Botones */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 30px;
	border-radius: 999px;
	font-family: var(--mtn-font-heading);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	border: 0;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
	background: var(--mtn-red);
	color: #fff;
	box-shadow: 0 8px 20px rgba(214, 31, 71, 0.35);
}

.btn-primary:hover {
	background: var(--mtn-red-dark);
	transform: translateY(-1px);
}

.btn-dark {
	background: var(--mtn-dark);
	color: #fff;
}

.btn-dark:hover {
	background: #000;
	transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
 * Barra de estadísticas (superpuesta al borde inferior del hero)
 * ---------------------------------------------------------------------- */
.hero-stats-wrap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	transform: translateY(50%);
	padding-inline: clamp(16px, 3vw, 40px);
}

.hero-stats {
	display: flex;
	max-width: 1280px;
	margin-inline: auto;
	background: var(--mtn-bg-card, #fbfbf8);
	border: 1px solid var(--mtn-border, #e7e9e7);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
	padding: 26px 12px;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-stat {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	text-align: center;
}

.hero-stat + .hero-stat {
	border-left: 1px solid var(--mtn-border, #e7e9e7);
	transition: border-color 0.3s ease;
}

.stat-accent {
	width: 34px;
	height: 3px;
	margin-bottom: 6px;
	border-radius: 2px;
	background: var(--mtn-red);
}

.stat-number {
	font-family: var(--mtn-font-heading);
	font-weight: 700;
	font-size: clamp(1.7rem, 2.6vw, 2.5rem);
	line-height: 1;
	color: var(--mtn-green, #1a7a3c);
	transition: color 0.3s ease;
}

.stat-label {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--mtn-muted, #6b7280);
	transition: color 0.3s ease;
}

/* Modo oscuro para hero stats */
[data-theme="dark"] .hero-stats,
.dark-mode .hero-stats {
	background: #16211a;
	border-color: #27392c;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .hero-stat + .hero-stat,
.dark-mode .hero-stat + .hero-stat {
	border-left-color: #27392c;
}

[data-theme="dark"] .hero-stat:nth-child(even),
.dark-mode .hero-stat:nth-child(even) {
	border-left-color: #27392c;
}

[data-theme="dark"] .hero-stat:nth-child(n + 3),
.dark-mode .hero-stat:nth-child(n + 3) {
	border-top-color: #27392c;
}

[data-theme="dark"] .stat-number,
.dark-mode .stat-number {
	color: #4ade80;
}

[data-theme="dark"] .stat-label,
.dark-mode .stat-label {
	color: #9aa99c;
}

/* Compensa la mitad de la tarjeta que sobresale hacia el contenido inferior */
.site-main.home {
	padding-top: 90px;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */
@media (max-width: 860px) {
	.hero-content {
		padding-block: 30px 90px;
	}

	.hero-stats {
		flex-wrap: wrap;
		padding: 10px;
	}

	.hero-stat {
		flex: 1 1 45%;
		padding: 16px;
	}

	/* En 2 columnas, los bordes internos se gestionan por posición */
	.hero-stat + .hero-stat {
		border-left: 0;
	}

	.hero-stat:nth-child(even) {
		border-left: 1px solid #e7e9e7;
	}

	.hero-stat:nth-child(n + 3) {
		border-top: 1px solid #e7e9e7;
	}
}

@media (max-width: 600px) {
	/* Sin superposición: la barra pasa a flujo normal */
	.hero-stats-wrap {
		position: static;
		transform: none;
		margin-top: 0;
		padding-inline: 16px;
		margin-top: 24px;
	}

	.site-main.home {
		padding-top: 40px;
	}

	.hero {
		padding-bottom: 40px;
	}

	.hero-stat {
		flex-basis: 50%;
	}

	.hero-actions .btn {
		flex: 1 1 auto;
	}
}
