/**
 * Mirrihue — Clientes / confianza.
 *
 * Componente independiente.
 * No modifica estilos existentes de Hero, Soluciones,
 * Diferencial, Entornos ni Productos destacados.
 */


/* =========================================================
   SECTION
   ========================================================= */

.mh-clients {
	overflow: hidden;

	background: #fff;
}


.mh-clients__header {
	max-width: 820px;
	margin: 0 auto 28px;
	text-align: center;
}

.mh-clients__eyebrow {
	margin: 0 0 8px;
	color: var(--mh-color-primary, #df2f2f);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mh-clients__title {
	margin: 0;
	color: var(--mh-color-text, #171717);
	font-size: clamp(2rem, 3vw, 3rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.mh-clients__intro {
	max-width: 720px;
	margin: 14px auto 0;
	color: var(--mh-color-muted, #666);
	font-size: 1rem;
	line-height: 1.6;
}


/* =========================================================
   MARQUEE
   ========================================================= */

.mh-clients__viewport {
	position: relative;

	width: 100%;

	overflow: hidden;

	/*
	 * Fade suave en los extremos.
	 * Si un navegador no soporta mask, simplemente
	 * muestra el carrusel completo sin afectar funcionalidad.
	 */
	-webkit-mask-image:
		linear-gradient(
			to right,
			transparent 0,
			#000 6%,
			#000 94%,
			transparent 100%
		);
	mask-image:
		linear-gradient(
			to right,
			transparent 0,
			#000 6%,
			#000 94%,
			transparent 100%
		);
}


.mh-clients__track {
	display: flex;

	width: max-content;

	animation:
		mh-clients-scroll
		32s
		linear
		infinite;

	will-change: transform;
}


.mh-clients__viewport:hover .mh-clients__track,
.mh-clients__viewport:focus-within .mh-clients__track {
	animation-play-state: paused;
}


.mh-clients__group {
	display: flex;
	align-items: center;
	flex-shrink: 0;

	gap: clamp(28px, 4vw, 64px);

	padding-right: clamp(28px, 4vw, 64px);
}


@keyframes mh-clients-scroll {

	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}

}


/* =========================================================
   LOGO OPTICAL BOX
   ========================================================= */

.mh-client-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 240px;

	width: 240px;
	height: 210px;

	padding: 10px 14px;
}

.mh-client-logo img {
	display: block;

	width: auto;
	height: auto;

	max-width: 210px;
	max-height: 190px;

	object-fit: contain;
}

/* Logos horizontales */

.mh-client-logo--wide img {
	max-width: 220px;
	max-height: 182px;
}

/* Logos verticales */

.mh-client-logo--vertical img {
	max-width: 190px;
	max-height: 190px;
}

/* Logos más compactos */

.mh-client-logo--compact img {
	max-width: 150px;
	max-height: 98px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

	.mh-clients__header {
		margin-bottom: 24px;
	}

	.mh-clients__title {
		font-size: clamp(1.7rem, 7vw, 2.25rem);
	}

	.mh-clients__intro {
		font-size: 0.95rem;
		line-height: 1.55;
	}

	.mh-clients__viewport {
		-webkit-mask-image:
			linear-gradient(
				to right,
				transparent 0,
				#000 3%,
				#000 97%,
				transparent 100%
			);
		mask-image:
			linear-gradient(
				to right,
				transparent 0,
				#000 3%,
				#000 97%,
				transparent 100%
			);
	}

	.mh-clients__track {
		animation-duration: 24s;
	}

	.mh-clients__group {
		gap: 18px;
		padding-right: 18px;
	}

	/* Caja visual móvil más grande */

	.mh-client-logo {
		flex: 0 0 210px;

		width: 210px;
		height: 170px;

		padding: 8px 10px;
	}

	.mh-client-logo img {
		max-width: 185px;
		max-height: 150px;
	}

	.mh-client-logo--wide img {
		max-width: 195px;
		max-height: 138px;
	}

	.mh-client-logo--vertical img {
		max-width: 160px;
		max-height: 160px;
	}

	.mh-client-logo--compact img {
		max-width: 140px;
		max-height: 110px;
	}

}


/* =========================================================
   ACCESSIBILITY — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.mh-clients__viewport {
		overflow-x: auto;

		-webkit-mask-image: none;
		mask-image: none;

		scrollbar-width: thin;
	}


	.mh-clients__track {
		width: auto;

		animation: none;
	}


	.mh-clients__group {
		flex-wrap: wrap;
		justify-content: center;

		width: 100%;

		padding-right: 0;
	}


	.mh-clients__group[aria-hidden="true"] {
		display: none;
	}

}
