/*
 * Franjas de programa de la página de la sección Entretenimiento
 * (parts/htv-entretenimiento-franjas.php). Cada franja trae su color en
 * --htv-prog (nombre del programa) y --htv-filete (filete de la cabecera),
 * sacados del mapa de mu-plugins/antigravity-category-colors.php.
 */
.htv-ent-franjas {
	width: 100%;
	margin: 0 0 30px;
	font-family: Roboto, sans-serif;
}

.htv-ent-franja {
	margin: 0 0 26px;
}

.htv-ent-franja:last-child {
	margin-bottom: 0;
}

.htv-ent-cab {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 12px;
	padding: 0 0 8px;
	border-bottom: 3px solid var(--htv-filete, #000);
}

.htv-ent-franjas .htv-ent-nombre {
	margin: 0;
	font-family: Roboto, sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.2;
	color: #000;
}

.htv-ent-franjas .htv-ent-nombre a {
	color: inherit;
	text-decoration: none;
}

.htv-ent-franjas .htv-ent-mas {
	margin-left: auto;
	font-size: .8rem;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	color: var(--htv-prog, #000);
}

.htv-ent-franjas .htv-ent-nombre a:hover,
.htv-ent-franjas .htv-ent-mas:hover {
	text-decoration: underline;
}

.htv-ent-cortes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.htv-ent-franjas .htv-ent-corte {
	display: block;
	min-width: 0;
	color: #222;
	text-decoration: none;
}

.htv-ent-img {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #eee;
}

.htv-ent-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.htv-ent-corte:hover .htv-ent-img img {
	transform: scale(1.03);
}

.htv-ent-prog {
	display: block;
	margin: 8px 0 4px;
	font-size: .6rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--htv-prog, #000);
}

.htv-ent-franjas .htv-ent-corte h3 {
	margin: 0;
	font-family: Roboto, sans-serif;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.3;
	color: #222;
}

.htv-ent-corte:hover h3 {
	text-decoration: underline;
}

.htv-ent-fecha {
	display: block;
	margin-top: 4px;
	font-size: .7rem;
	color: #888;
}

@media (prefers-reduced-motion: reduce) {
	.htv-ent-img img {
		transition: none;
	}
	.htv-ent-corte:hover .htv-ent-img img {
		transform: none;
	}
}

/*
 * En el móvil las tres tarjetas se deslizan en horizontal, con la cuarta
 * parte de la siguiente asomando, en vez de apilarse: seis programas
 * apilados serían dieciocho tarjetas antes del listado.
 */
@media screen and (max-width: 767px) {
	.htv-ent-cab {
		flex-wrap: wrap;
		row-gap: 4px;
	}
	.htv-ent-cortes {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.htv-ent-cortes::-webkit-scrollbar {
		display: none;
	}
	.htv-ent-franjas .htv-ent-corte {
		scroll-snap-align: start;
	}
}

/*
 * Página de un corte de programa (body.htv-corte-pagina, ver single.php):
 * la de una noticia, mismo orden, como ficha de programa. Diseño «Ficha de
 * programa», elegido el 28-nov-2026 (antes se probaron «Firmado por
 * el programa» y «Pantalla de A la Carta»): fondo gris teñido del color del
 * programa y la página en dos fichas blancas; la de arriba con una banda del
 * programa, la etiqueta como texto en su color y el titular en Oswald; el
 * vídeo con esquinas y sombra, el texto en Roboto y los botones de compartir
 * en el color del programa. --htv-prog y --htv-filete llegan en línea desde
 * single.php.
 */
body.htv-corte-pagina #mvp-post-content {
	box-sizing: border-box;
	padding: 16px;
	/* Se probaron el negro de A la Carta solo en el artículo y en toda la
	 * página, y se descartaron por agresivos (28-nov-2026). */
	background: #f4f2f5;
	background: color-mix(in srgb, var(--htv-prog, #000) 5%, #f4f4f4);
}

body.htv-corte-pagina #mvp-post-head {
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 0;
	padding: 16px 18px 14px;
	background: #fff;
	border-top: 6px solid var(--htv-filete, #000);
}

/* El mapa de colores pinta la etiqueta en línea: hace falta !important. */
body.htv-corte-pagina #mvp-post-head span.mvp-post-cat {
	padding: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--htv-prog, #000) !important;
	letter-spacing: .06em;
}

body.htv-corte-pagina h1.mvp-post-title {
	font-family: Oswald, sans-serif;
	font-weight: 700;
	font-size: clamp(26px, 2.2vw + 14px, 36px);
	line-height: 1.15;
	color: #222;
}

/* El autor y la fecha van al final del artículo, tras las etiquetas
 * (parts/post-single.php, filtro htv_autor_abajo); la cabecera acaba en la
 * entradilla. */
body.htv-corte-pagina #mvp-content-bot .mvp-author-info-wrap {
	box-sizing: border-box;
	width: 100%;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}

body.htv-corte-pagina #mvp-content-wrap {
	box-sizing: border-box;
	width: 100%;
	padding: 16px 18px;
	background: #fff;
}

body.htv-corte-pagina #mvp-content-main figure.wp-block-video:first-child {
	margin-bottom: 20px;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(74, 18, 87, .25);
	box-shadow: 0 6px 18px color-mix(in srgb, var(--htv-prog, #000) 30%, transparent);
}

body.htv-corte-pagina #mvp-content-main figure.wp-block-video:first-child video {
	display: block;
	width: 100%;
}

body.htv-corte-pagina #mvp-content-main p {
	font-family: Roboto, sans-serif;
}

body.htv-corte-pagina .mvp-post-soc-list li {
	background: var(--htv-prog, #000) !important;
}

/* El tema da a #mvp-content-main width:100% más 25 px de relleno y 1 px de
 * raya (en pantalla grande): en una noticia sobresale hacia el margen sin que
 * se note, pero dentro de la ficha blanca el vídeo se sale del relleno. Aquí
 * cuenta dentro del ancho, y la columna de compartir y los rellenos se
 * estrechan un poco para que el texto no quede apretado. */
body.htv-corte-pagina #mvp-content-main {
	box-sizing: border-box;
}

@media screen and (min-width: 768px) {
	body.htv-corte-pagina #mvp-post-content {
		padding: 12px;
	}
	body.htv-corte-pagina #mvp-post-head {
		padding: 16px 16px 14px;
	}
	body.htv-corte-pagina #mvp-content-wrap {
		padding: 16px;
	}
}

/* La columna de compartir solo existe desde 1004 px y la raya con relleno,
 * desde 1024 (media-queries.css y el CSS en línea del tema). */
@media screen and (min-width: 1004px) {
	body.htv-corte-pagina .mvp-post-soc-out {
		margin-left: -60px;
	}
	body.htv-corte-pagina .mvp-post-soc-in {
		margin-left: 60px;
	}
	body.htv-corte-pagina .mvp-post-soc-wrap {
		margin-right: 18px;
	}
}

@media screen and (min-width: 1024px) {
	body.htv-corte-pagina #mvp-content-main {
		padding-left: 18px;
	}
}

/* Sin barra lateral (prueba del 28-nov-2026): el artículo ocupa la página,
 * centrado y con un ancho máximo para que las líneas de texto no se hagan
 * eternas. Antes se probó acercar la barra a la columna (24 px). La barra
 * lleva publicidad (mvp_ad_widget-12): en los cortes deja de verse. */
body.htv-corte-pagina #mvp-side-wrap {
	display: none;
}

@media screen and (min-width: 900px) {
	body.htv-corte-pagina .mvp-post-main-out {
		margin-right: 0;
	}
	body.htv-corte-pagina .mvp-post-main-in {
		margin-right: 0;
	}
	body.htv-corte-pagina #mvp-post-content {
		float: none;
		width: 100%;
		max-width: 960px;
		margin: 0 auto;
	}
}

/* En el móvil la web ya deja margen a los lados: menos gris y menos relleno. */
@media screen and (max-width: 767px) {
	body.htv-corte-pagina #mvp-post-content {
		padding: 8px;
	}
	body.htv-corte-pagina #mvp-post-head {
		padding: 14px 14px 12px;
	}
	body.htv-corte-pagina #mvp-content-wrap {
		padding: 14px;
	}
}

/* Lo que aporta cada programa (diseño «B. Sello», 28-nov-2026; antes se
 * probó «A. Banda»; datos en htv_programa_ficha()). Se quedan la raya de
 * 6 px y la etiqueta; el logotipo va en un sello de su color a la derecha
 * del titular y la próxima emisión, en una línea bajo la entradilla.
 * --htv-banda llega en línea desde single.php (el color del programa, o el
 * morado de noche en La Bombonera, cuyo logotipo es amarillo). */
body.htv-corte-con-sello #mvp-post-head {
	position: relative;
}

body.htv-corte-con-sello #mvp-post-head h3.mvp-post-cat,
body.htv-corte-con-sello #mvp-post-head h1.mvp-post-title,
body.htv-corte-con-sello #mvp-post-head span.mvp-post-excerpt {
	box-sizing: border-box;
	padding-right: 118px;
}

.htv-corte-sello {
	position: absolute;
	top: 16px;
	right: 16px;
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 96px;
	height: 96px;
	padding: 10px;
	border-radius: 6px;
	background: var(--htv-banda, #000);
	box-shadow: inset 0 -4px 0 var(--htv-filete, #000);
}

.htv-corte-sello img {
	display: block;
	max-width: 100%;
	max-height: 70px;
	width: auto;
	height: auto;
}

#mvp-post-head p.htv-corte-emision {
	float: left;
	clear: both;
	margin: 12px 0 0;
	padding: 6px 12px 6px 10px;
	border-left: 3px solid var(--htv-filete, #000);
	border-radius: 3px;
	background: color-mix(in srgb, var(--htv-banda, #000) 8%, #fff);
	font: 400 13px/1.35 Roboto, sans-serif;
	color: #333;
}

#mvp-post-head p.htv-corte-emision b {
	color: var(--htv-prog, #000);
}

/* Logotipo apaisado (htv_programa_logo_ancho()): sello más ancho que alto. */
body.htv-corte-sello-ancho .htv-corte-sello {
	width: 210px;
	height: 72px;
	padding: 10px 14px;
}

body.htv-corte-sello-ancho .htv-corte-sello img {
	max-height: 48px;
}

body.htv-corte-sello-ancho #mvp-post-head h3.mvp-post-cat,
body.htv-corte-sello-ancho #mvp-post-head h1.mvp-post-title {
	padding-right: 232px;
}

body.htv-corte-sello-ancho #mvp-post-head span.mvp-post-excerpt {
	padding-right: 0;
}

@media screen and (max-width: 767px) {
	.htv-corte-sello {
		top: 14px;
		right: 14px;
		width: 64px;
		height: 64px;
		padding: 7px;
	}
	.htv-corte-sello img {
		max-height: 46px;
	}
	body.htv-corte-con-sello #mvp-post-head h3.mvp-post-cat,
	body.htv-corte-con-sello #mvp-post-head h1.mvp-post-title {
		padding-right: 76px;
	}
	body.htv-corte-con-sello #mvp-post-head span.mvp-post-excerpt {
		padding-right: 0;
	}
	/* En el móvil el sello apaisado va encima de la etiqueta, no al lado. */
	body.htv-corte-sello-ancho .htv-corte-sello {
		position: static;
		float: left;
		width: auto;
		max-width: 100%;
		height: 52px;
		margin: 0 0 12px;
		padding: 8px 14px;
	}
	body.htv-corte-sello-ancho .htv-corte-sello img {
		max-height: 36px;
	}
	body.htv-corte-sello-ancho #mvp-post-head h3.mvp-post-cat {
		clear: both;
	}
	body.htv-corte-sello-ancho #mvp-post-head h3.mvp-post-cat,
	body.htv-corte-sello-ancho #mvp-post-head h1.mvp-post-title {
		padding-right: 0;
	}
}

/* Promo de cabecera del programa (htv_programa_ficha()['banner']), en lo
 * alto de la ficha en lugar del sello y de la raya: ya lleva el logotipo.
 * Prueba del 28-nov-2026. */
body.htv-corte-con-banner #mvp-post-head {
	border-top: 0;
	padding-top: 0;
}

.htv-corte-banner {
	display: block;
	width: calc(100% + 36px);
	margin: 0 -18px 14px;
}

.htv-corte-banner img {
	display: block;
	width: 100%;
	height: auto;
}

@media screen and (min-width: 768px) {
	.htv-corte-banner {
		width: calc(100% + 32px);
		margin: 0 -16px 14px;
	}
}

@media screen and (max-width: 767px) {
	.htv-corte-banner {
		width: calc(100% + 28px);
		margin: 0 -14px 12px;
	}
}

/* Al final: el logotipo del programa sobre su color con «Un corte de…»
 * (se probó la cara de quien lo presenta) y «Más de <programa>» con sus
 * cortes anteriores. */
.htv-corte-cara {
	display: block;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--htv-banda, #000);
}

.htv-corte-cara img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.htv-corte-autor .mvp-author-info-name,
.htv-corte-autor .mvp-author-info-date {
	clear: both;
	width: 100%;
}

.htv-corte-autor .mvp-author-info-name {
	margin-bottom: 3px;
	font-size: .95rem;
}

.htv-corte-autor .author-name {
	font-weight: 700;
	color: #000;
}

.htv-corte-autor .htv-corte-cara img {
	border: 0;
}

body.htv-corte-sello-ancho .htv-corte-autor .mvp-author-info-thumb {
	width: auto;
}

body.htv-corte-sello-ancho .htv-corte-cara {
	width: 120px;
	border-radius: 23px;
}

.htv-corte-cara--logo img {
	box-sizing: border-box;
	padding: 7px;
	object-fit: contain;
}

body.htv-corte-pagina .htv-corte-mas {
	margin: 22px 0 6px;
}

/* La raya bajo el vídeo sobra. */
body.htv-corte-pagina #mvp-content-main figure.wp-block-video + hr.wp-block-separator {
	display: none;
}

/* «Ya disponible en nuestra web: [Televisión a la carta]», el bloque de dos
 * columnas que el Publicador pone antes de la tarjeta del episodio: en una
 * línea, a la izquierda y encima de la tarjeta, como cabecera suya (texto y
 * logotipo a la misma altura, raya fina debajo). Se ocultó un rato y el
 * responsable lo quiso de vuelta (28-nov-2026). */
body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-start;
	gap: 10px;
	margin: 28px 0 12px;
	padding: 0 0 10px;
	border-bottom: 1px solid #e6e6e6;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) > .wp-block-column {
	flex: 0 0 auto !important;
	align-self: center !important;
	width: auto;
	margin: 0 !important;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) .wp-block-spacer {
	display: none;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) p {
	margin: 0;
	text-align: left;
	font: 700 15px/1.2 Roboto, sans-serif;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) p a {
	color: #222 !important;
	text-decoration: none;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) .wp-block-image,
body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) figure {
	float: none;
	margin: 0 !important;
}

body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) img {
	display: block;
	width: auto !important;
	height: 34px !important;
}

@media screen and (max-width: 767px) {
	body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) {
		gap: 8px;
	}
	body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) p {
		font-size: 13px;
		white-space: nowrap;
	}
	body.htv-corte-pagina #mvp-content-main .wp-block-columns.no-padding:has(+ .wp-block-embed) img {
		height: 28px !important;
	}
}
