/* =========================================================
   HCP CATÁLOGO DE VÍDEOS
   Carrusel horizontal limpio y sin efectos de movimiento
   ========================================================= */


/* Evita desbordamientos por padding y bordes */
.hcp-video-catalogo,
.hcp-video-catalogo *,
.hcp-video-catalogo *::before,
.hcp-video-catalogo *::after {
	box-sizing: border-box;
}


/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

.hcp-video-catalogo {
	--hcp-color-principal: #C481B2;
	--hcp-color-principal-hover: #AF6D9D;
	--hcp-color-titulo: #263342;
	--hcp-color-texto: #555555;
	--hcp-color-borde: #e2e2e2;
	--hcp-color-fondo: #ffffff;
	--hcp-radio-tarjeta: 14px;
	--hcp-separacion: 26px;

	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}


/* =========================================================
   SECCIÓN DE CADA CATEGORÍA
   ========================================================= */

.hcp-video-section {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 0 55px;
	padding: 0 0 45px;
	border-bottom: 1px solid var(--hcp-color-borde);
	overflow: hidden;
}

.hcp-video-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}


/* =========================================================
   CABECERA DE CATEGORÍA
   ========================================================= */

.hcp-video-section__cabecera {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 25px;

	width: 100%;
	max-width: 100%;
	min-width: 0;

	margin: 0 0 24px;
	padding: 0;
}

.hcp-video-section__cabecera-texto {
	flex: 1 1 auto;
	min-width: 0;
}

.hcp-video-section__titulo {
	margin: 0;
	padding: 0;

	color: var(--hcp-color-titulo);

	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.04em;
	text-transform: uppercase;

	overflow-wrap: anywhere;
}

.hcp-video-section__descripcion {
	max-width: 850px;
	margin-top: 10px;

	color: #666666;

	font-size: 1rem;
	line-height: 1.6;
}

.hcp-video-section__descripcion p {
	margin: 0;
}


/* =========================================================
   BOTÓN VER TODOS
   Sin movimiento ni sombra
   ========================================================= */

.hcp-video-section__ver-todos {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;

	margin: 0;
	padding: 11px 20px;

	color: #ffffff;
	background: var(--hcp-color-principal);

	border: 0;
	border-radius: 10px;
	box-shadow: none;

	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;

	transform: none;
	transition: none;
}

.hcp-video-section__ver-todos:hover,
.hcp-video-section__ver-todos:focus {
	color: #ffffff;
	background: var(--hcp-color-principal-hover);
	text-decoration: none;

	box-shadow: none;
	transform: none;
}

.hcp-video-section__ver-todos:focus-visible {
	outline: 2px solid var(--hcp-color-principal);
	outline-offset: 3px;
}


/* =========================================================
   CARRUSEL
   Flecha | vídeos | flecha
   ========================================================= */

.hcp-video-carousel {
	position: relative;

	display: grid;
	grid-template-columns: 46px minmax(0, 1fr) 46px;
	align-items: center;
	column-gap: 16px;

	width: 100%;
	max-width: 100%;
	min-width: 0;

	margin: 0;
	padding: 0;

	overflow: hidden;
}


/* =========================================================
   ZONA DESPLAZABLE
   ========================================================= */

.hcp-video-carousel__viewport {
	grid-column: 2;

	display: block;

	width: 100%;
	max-width: 100%;
	min-width: 0;

	margin: 0;
	padding: 4px 0 8px;

	overflow-x: auto;
	overflow-y: hidden;

	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;

	scrollbar-width: none;
	-ms-overflow-style: none;
}

.hcp-video-carousel__viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}


/* =========================================================
   FILA HORIZONTAL
   Tres vídeos visibles en escritorio
   ========================================================= */

.hcp-video-grid {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 52px) / 3);
	grid-template-rows: minmax(0, 1fr);
	gap: 26px;

	width: 100%;
	min-width: 100%;
	max-width: none;

	margin: 0;
	padding: 0;
}


/* =========================================================
   TARJETA DE VÍDEO
   Sin movimientos ni sombras
   ========================================================= */

.hcp-video-card {
	display: flex;
	flex-direction: column;

	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: 100%;

	margin: 0;
	padding: 0;

	overflow: hidden;

	background: var(--hcp-color-fondo);
	border: 1px solid var(--hcp-color-borde);
	border-radius: var(--hcp-radio-tarjeta);
	box-shadow: none;

	scroll-snap-align: start;
	scroll-snap-stop: always;

	transform: none;
	transition: none;
}

.hcp-video-card:hover {
	border-color: var(--hcp-color-borde);
	box-shadow: none;
	transform: none;
}


/* =========================================================
   IMAGEN
   Sin zoom ni movimientos
   ========================================================= */

.hcp-video-card__imagen {
	position: relative;

	display: block;

	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;

	overflow: hidden;

	background: #eeeeee;
	text-decoration: none;

	box-shadow: none;
	transform: none;
	transition: none;
}

.hcp-video-card__thumbnail {
	display: block;

	width: 100%;
	max-width: 100%;
	height: 100%;

	object-fit: cover;

	box-shadow: none;
	transform: none;
	transition: none;
}

.hcp-video-card:hover .hcp-video-card__thumbnail {
	box-shadow: none;
	transform: none;
}


/* =========================================================
   TARJETA SIN IMAGEN
   ========================================================= */

.hcp-video-card__sin-imagen {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;

	background:
		linear-gradient(
			135deg,
			#eeeeee 0%,
			#dddddd 100%
		);
}

.hcp-video-card__play {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 58px;
	height: 58px;
	padding-left: 4px;

	color: #ffffff;
	background: var(--hcp-color-principal);

	border-radius: 50%;
	box-shadow: none;

	font-size: 22px;
	line-height: 1;

	transform: none;
	transition: none;
}


/* =========================================================
   CONTENIDO DE TARJETA
   ========================================================= */

.hcp-video-card__contenido {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;

	width: 100%;
	min-width: 0;

	padding: 20px;
}

.hcp-video-card__titulo {
	width: 100%;
	min-width: 0;

	margin: 0 0 18px;

	color: var(--hcp-color-titulo);

	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;

	overflow-wrap: anywhere;
}

.hcp-video-card__titulo a {
	color: inherit;
	text-decoration: none;
	transition: none;
}

.hcp-video-card__titulo a:hover,
.hcp-video-card__titulo a:focus {
	color: var(--hcp-color-principal);
	text-decoration: none;
}


/* =========================================================
   BOTÓN VER VÍDEO
   Sin movimiento ni sombra
   ========================================================= */

.hcp-video-card__boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	margin-top: auto;
	padding: 10px 17px;

	color: #ffffff;
	background: var(--hcp-color-principal);

	border: 0;
	border-radius: 9px;
	box-shadow: none;

	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;

	transform: none;
	transition: none;
}

.hcp-video-card__boton:hover,
.hcp-video-card__boton:focus {
	color: #ffffff;
	background: var(--hcp-color-principal-hover);
	text-decoration: none;

	box-shadow: none;
	transform: none;
}

.hcp-video-card__boton:focus-visible {
	outline: 2px solid var(--hcp-color-principal);
	outline-offset: 3px;
}


/* =========================================================
   FLECHAS
   Separadas de las tarjetas
   ========================================================= */

.hcp-video-carousel__arrow {
	position: static;

	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;

	width: 46px;
	height: 46px;

	margin: 0;
	padding: 0;

	color: #ffffff;
	background: var(--hcp-color-principal);

	border: 0;
	border-radius: 50%;
	box-shadow: none;

	cursor: pointer;

	transform: none;
	transition: none;
}

.hcp-video-carousel__arrow--prev {
	grid-column: 1;
}

.hcp-video-carousel__arrow--next {
	grid-column: 3;
}

.hcp-video-carousel__arrow span {
	display: block;

	margin: -3px 0 0;

	font-family: Arial, Helvetica, sans-serif;
	font-size: 38px;
	font-weight: 400;
	line-height: 1;
}

.hcp-video-carousel__arrow:hover:not(:disabled),
.hcp-video-carousel__arrow:focus:not(:disabled) {
	color: #ffffff;
	background: var(--hcp-color-principal-hover);

	box-shadow: none;
	transform: none;
}

.hcp-video-carousel__arrow:focus-visible {
	outline: 2px solid var(--hcp-color-principal);
	outline-offset: 3px;
}

.hcp-video-carousel__arrow:disabled {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}


/* =========================================================
   SIN DESPLAZAMIENTO
   El viewport ocupa todo el ancho
   ========================================================= */

.hcp-video-carousel--sin-desplazamiento {
	grid-template-columns: minmax(0, 1fr);
	column-gap: 0;
}

.hcp-video-carousel--sin-desplazamiento
.hcp-video-carousel__viewport {
	grid-column: 1;
}

.hcp-video-carousel--sin-desplazamiento
.hcp-video-carousel__arrow {
	display: none;
}


/* =========================================================
   CATEGORÍA VACÍA
   ========================================================= */

.hcp-video-section__vacia {
	width: 100%;

	margin: 0;
	padding: 18px 20px;

	color: #777777;
	background: #f7f7f7;

	border: 1px solid var(--hcp-color-borde);
	border-radius: 10px;
}


/* =========================================================
   TABLET
   Dos vídeos visibles
   ========================================================= */

@media (max-width: 1024px) {

	.hcp-video-section {
		margin-bottom: 45px;
		padding-bottom: 38px;
	}

	.hcp-video-carousel {
		grid-template-columns: 44px minmax(0, 1fr) 44px;
		column-gap: 12px;
	}

	.hcp-video-grid {
		grid-auto-columns: calc((100% - 20px) / 2);
		gap: 20px;
	}

	.hcp-video-carousel__arrow {
		width: 44px;
		height: 44px;
	}

	.hcp-video-carousel__arrow span {
		font-size: 36px;
	}

	.hcp-video-carousel--sin-desplazamiento {
		grid-template-columns: minmax(0, 1fr);
	}
}


/* =========================================================
   MÓVIL
   Carrusel a todo el ancho, sin flechas
   ========================================================= */

@media (max-width: 600px) {

	/*
	 * Permite colocar:
	 * 1. título
	 * 2. vídeos
	 * 3. botón Ver todos
	 */
	.hcp-video-section {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		margin-bottom: 38px;
		padding-bottom: 32px;
		overflow: hidden;
	}

	/*
	 * Liberamos los elementos de la cabecera para poder
	 * colocar el botón después del carrusel.
	 */
	.hcp-video-section__cabecera {
		display: contents;
	}

	/* Título de la categoría */
	.hcp-video-section__cabecera-texto {
		order: 1;
		width: 100%;
		margin: 0 0 20px;
		text-align: center;
	}

	.hcp-video-section__titulo {
		width: 100%;
		margin: 0;
		font-size: 1.45rem;
		line-height: 1.2;
		text-align: center;
	}

	.hcp-video-section__descripcion {
		width: 100%;
		margin: 10px auto 0;
		text-align: center;
	}

	/*
	 * Carrusel debajo del título y ocupando todo el ancho.
	 */
	.hcp-video-carousel {
		order: 2;
		display: block;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0;
		overflow: hidden;
	}

	/*
	 * En móvil ocultamos completamente las flechas.
	 */
	.hcp-video-carousel__arrow {
		display: none !important;
	}

	/* Zona desplazable táctil */
	.hcp-video-carousel__viewport {
		display: block;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 4px 0 8px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.hcp-video-carousel__viewport::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	/*
	 * Una tarjeta completa por pantalla.
	 * El desplazamiento sigue funcionando con el dedo.
	 */
	.hcp-video-grid {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 100%;
		grid-template-rows: minmax(0, 1fr);
		gap: 16px;
		width: 100%;
		min-width: 100%;
		margin: 0;
		padding: 0;
	}

	.hcp-video-card {
		width: 100%;
		max-width: 100%;
	}

	/* Contenido y títulos de los vídeos centrados */
	.hcp-video-card__contenido {
		align-items: center;
		width: 100%;
		padding: 17px;
		text-align: center;
	}

	.hcp-video-card__titulo {
		width: 100%;
		margin: 0 0 16px;
		font-size: 1.08rem;
		text-align: center;
	}

	/*
	 * Botón Ver todos debajo del carrusel.
	 */
	.hcp-video-section__ver-todos {
		order: 3;
		align-self: center;
		margin: 18px auto 0;
		padding: 10px 20px;
		text-align: center;
	}

	/* Por si JavaScript añade esta clase */
	.hcp-video-carousel--sin-desplazamiento {
		display: block;
		width: 100%;
	}

	.hcp-video-carousel--sin-desplazamiento
	.hcp-video-carousel__viewport {
		width: 100%;
	}
}

/* =========================================================
   CARRUSEL SIN FLECHAS EN NINGÚN DISPOSITIVO
   ========================================================= */

.hcp-video-carousel,
.hcp-video-carousel--sin-desplazamiento {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

/* Ocultar flechas siempre */
.hcp-video-carousel__arrow,
.hcp-video-carousel__arrow--prev,
.hcp-video-carousel__arrow--next {
	display: none !important;
}

/* El carrusel ocupa todo el ancho */
.hcp-video-carousel__viewport,
.hcp-video-carousel--sin-desplazamiento
.hcp-video-carousel__viewport {
	display: block;
	grid-column: auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 4px 0 8px;
	overflow-x: auto;
	overflow-y: hidden;

	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;

	scrollbar-width: none;
	-ms-overflow-style: none;
}

.hcp-video-carousel__viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}