/* ==========================================================================
   HITPDF Video — scheda articolo video («Cinema»)
   Autore: BassDrake

   Un palco solo, grande, sul fondo scuro del sito; sotto la targa con le
   informazioni, staccata dal player; in fondo il nastro con tutti i media
   dell'articolo. Stessi token della scheda fumetti: per cambiare palette o
   proporzioni si tocca solo il blocco qui sotto.
   ========================================================================== */

.hitv {
	--hit-pink: #EA9EE4;
	--hit-magenta: #FE17D8;
	--hit-surface: #131118;
	--hit-surface-2: #1d1a24;
	--hit-border: rgba(255, 255, 255, 0.09);
	--hit-border-2: rgba(255, 255, 255, 0.16);
	--hit-text: #ece9f0;
	--hit-muted: #8f8b99;

	--hit-radius: 14px;
	--hit-radius-sm: 8px;

	/* >>> LARGHEZZA DEL PALCO <<< */
	--hitv-stage: 900px;
	/* >>> LARGHEZZA MASSIMA DELLA SCHEDA <<< */
	--hitv-max: 1200px;
	/* >>> ALTEZZA MASSIMA DI UN'IMMAGINE SUL PALCO <<< */
	--hitv-shot-max: 78vh;

	position: relative;
	max-width: var(--hitv-max);
	width: 100%;
	margin-inline: auto;
	padding: clamp(0.5rem, 1.5vw, 1rem) 0 clamp(1rem, 3vw, 2.25rem);

	/* Nessuno sfondo: dietro alla scheda si vede il fondo del sito e basta. */
	background: none;

	color: var(--hit-text);
	font-size: 1rem;
	line-height: 1.6;
}

/* .entry-content con is-layout-constrained restringe i figli: qui serve la
   larghezza piena del nostro contenitore. */
.entry-content .hitv {
	max-width: var(--hitv-max);
}

.hitv img {
	max-width: 100%;
	height: auto;
}

.hitv__in {
	position: relative;
	max-width: var(--hitv-stage);
	margin-inline: auto;
	padding-inline: clamp(0.5rem, 2vw, 1.25rem);
}

/* ==========================================================================
   IL PALCO
   ========================================================================== */
.hitv-stage {
	position: relative;
}

.hitv-slide[hidden] {
	display: none;
}

.hitv-frame {
	position: relative;
	border-radius: var(--hit-radius);
	overflow: hidden;
	background: #000;
	box-shadow:
		0 26px 60px -22px rgba(0, 0, 0, 0.9),
		0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* --- video: la cornice prende la forma del filmato, così non restano bande
   nere. Il 16:9 qui sotto è solo il valore di partenza: PHP lo sostituisce con
   la proporzione vera quando la conosce, e video.js la corregge appena il
   browser ha letto il file. --- */
.hitv-frame--video {
	aspect-ratio: 16 / 9;
	margin-inline: auto;
}

.hitv .hitv-embed,
.hitv .hitv-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.hitv .hitv-video {
	object-fit: contain;
}

/* --- immagini e gif: mai tagliate, su fondo pieno scuro --- */
.hitv-frame--shot {
	background: var(--hit-surface-2);
}

.hitv-shot {
	position: relative;
	display: block;
	cursor: zoom-in;
}

.hitv .hitv-shot__img {
	position: relative;
	display: block;
	width: 100%;
	max-height: var(--hitv-shot-max);
	object-fit: contain;
	margin-inline: auto;
}

.hitv-shot:focus-visible {
	outline: 2px solid var(--hit-pink);
	outline-offset: -4px;
}

/* ==========================================================================
   LA TARGA — categorie, titolo, metadati, tag, piede
   Sta sotto al palco, staccata: non copre mai il video.
   ========================================================================== */
.hitv-card {
	position: relative;
	margin-top: 14px;
	padding: 1.15rem clamp(1rem, 2.5vw, 1.4rem) 1.25rem;
	border: 1px solid var(--hit-border);
	border-radius: var(--hit-radius);
	background: var(--hit-surface);
}

.hitv-eyebrow {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hit-muted);
}

.hitv-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.hitv-eyebrow a:hover {
	color: var(--hit-pink);
}

.hitv-eyebrow span {
	color: rgba(255, 255, 255, 0.22);
	margin: 0 0.35em;
}

.hitv .hitv-title {
	margin: 0.3rem 0 0;
	font-size: clamp(1.4rem, 3vw, 2.05rem);
	line-height: 1.14;
	color: #ffffff;
}

/* ---- Metadati: pillole con etichetta e valore sulla stessa riga ---- */
.hitv-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.5rem;
	margin: 0.9rem 0 0;
	padding: 0;
}

.hitv-meta > div {
	display: flex;
	/* baseline e non center: etichetta e valore hanno font diversi e allineare
	   le scatole li lascerebbe sfalsati di un paio di pixel. */
	align-items: baseline;
	gap: 0.45rem;
	padding: 0.3rem 0.7rem 0.34rem;
	border: 1px solid var(--hit-border);
	border-radius: var(--hit-radius-sm);
	background: rgba(255, 255, 255, 0.03);
}

.hitv-meta > div[hidden] {
	display: none;
}

.hitv-meta dt {
	font-family: 'Agency FB', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.95rem;
	line-height: 1.15;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hit-muted);
}

.hitv-meta dd {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.15;
	color: var(--hit-text);
}

.hitv-meta dd {
	font-variant-numeric: tabular-nums;
}

.hitv .hitv-link {
	color: var(--hit-pink);
	text-decoration: none;
}

.hitv .hitv-link:hover {
	text-decoration: underline;
}

/* ---- Tag ---- */
.hitv-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.9rem 0 0;
	padding: 0;
	list-style: none;
}

.hitv-tags li {
	margin: 0;
}

.hitv-tag {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	border: 1px solid rgba(234, 158, 228, 0.32);
	border-radius: 999px;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--hit-pink);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.hitv-tag:hover,
.hitv-tag:focus-visible {
	background: var(--hit-pink);
	border-color: var(--hit-pink);
	color: #2a0f26;
}

.hitv-tags__more {
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--hit-border);
	border-radius: 999px;
	background: none;
	font: inherit;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--hit-muted);
	cursor: pointer;
}

.hitv-tags__more:hover {
	color: var(--hit-text);
	border-color: var(--hit-muted);
}

/* ---- Bottone eventuale trovato nell'articolo ---- */
.hitv-actions {
	margin: 1.1rem 0 0;
}

.hitv .hitv-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	box-sizing: border-box;
	max-width: 100%;
	min-width: 12ch;
	padding: 0.55rem 2.4rem;

	font-family: 'Agency FB', 'Arial Narrow', Arial, sans-serif;
	font-size: 1.55rem;
	font-weight: normal;
	letter-spacing: 0.14em;

	background: var(--hit-magenta);
	color: #ffffff;
	text-decoration: none !important;

	clip-path: polygon(94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%, 6% 0);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.hitv .hitv-cta:hover,
.hitv .hitv-cta:focus-visible {
	background: #ffffff;
	color: var(--hit-magenta);
}

.hitv .hitv-cta:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px var(--hit-magenta);
}

/* ---- Piede ---- */
.hitv-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin-top: 1.05rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--hit-border);
	font-size: 0.9rem;
	color: var(--hit-muted);
}

.hitv-byline {
	margin: 0;
}

.hitv-byline a {
	color: var(--hit-text);
	text-decoration: none;
}

.hitv-byline a:hover {
	color: var(--hit-pink);
}

.hitv-stats {
	display: flex;
	align-items: center;
	gap: 1.1rem;
}

.hitv-comments {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

/* ==========================================================================
   IL NASTRO — una cella per ogni media dell'articolo
   ========================================================================== */
.hitv-rail__title {
	margin: 1.3rem 0 0.6rem;
	font-family: 'Agency FB', 'Arial Narrow', Arial, sans-serif;
	font-size: 1rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hit-muted);
}

.hitv-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 150px;
	gap: 10px;
	margin: 0;
	padding: 0 0 10px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--hit-border-2) transparent;
}

.hitv-rail__cell {
	margin: 0;
	scroll-snap-align: start;
}

.hitv-cell {
	display: block;
	text-decoration: none;
	color: inherit;
}

.hitv-cell__art {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border: 1px solid var(--hit-border);
	border-radius: var(--hit-radius-sm);
	background: var(--hit-surface-2);
	overflow: hidden;
	opacity: 0.55;
	transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hitv .hitv-cell__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hitv-cell__img--empty {
	background: linear-gradient(158deg, #2a2136, #120f18);
}

/* Primo fotogramma del video, sopra alla miniatura di ripiego. Compare solo
   quando il browser ha davvero qualcosa da mostrare: se il file non si apre,
   sotto resta l'immagine e non si vede nessun buco nero. */
.hitv .hitv-cell__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	background: transparent;
}

.hitv .hitv-cell__frame.is-ready {
	opacity: 1;
}

.hitv-cell:hover .hitv-cell__art,
.hitv-cell:focus-visible .hitv-cell__art {
	opacity: 0.85;
}

.hitv-cell.is-active .hitv-cell__art {
	opacity: 1;
	border-color: var(--hit-pink);
	box-shadow: 0 0 0 1px var(--hit-pink);
}

.hitv-cell:focus-visible {
	outline: 2px solid var(--hit-pink);
	outline-offset: 3px;
}

.hitv-cell__cap {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.8rem;
	color: var(--hit-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hitv-cell.is-active .hitv-cell__cap {
	color: var(--hit-text);
}

/* ---- Etichette e durata sulle miniature ---- */
.hitv-badge {
	position: absolute;
	top: 7px;
	left: 7px;
	padding: 0.06rem 0.45rem 0.1rem;
	border-radius: 5px;
	font-family: 'Agency FB', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.85rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(11, 9, 16, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.hitv-badge--video {
	background: var(--hit-magenta);
	border-color: transparent;
}

.hitv-badge--gif {
	background: var(--hit-pink);
	border-color: transparent;
	color: #2a0f26;
}

/* La gif sul palco: etichetta in alto a sinistra, sopra la cornice */
.hitv-frame--shot > .hitv-badge {
	top: 10px;
	left: 10px;
	z-index: 2;
	font-size: 0.95rem;
}

.hitv-stamp {
	position: absolute;
	right: 7px;
	bottom: 7px;
	padding: 0.04rem 0.4rem 0.08rem;
	border-radius: 5px;
	background: rgba(11, 9, 16, 0.8);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: #e9e5ef;
}

.hitv-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(11, 9, 16, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.55);
	color: #fff;
}

.hitv-play svg {
	width: 14px;
	height: 14px;
	margin-left: 2px;
}

/* ==========================================================================
   GRIGLIA COMPLETA (opzionale: HITPDF_VIDEO_FULL_GRID)
   ========================================================================== */
.hitv-all {
	margin-top: 1.8rem;
}

.hitv-all__title {
	margin: 0 0 0.8rem;
	font-family: 'Agency FB', 'Arial Narrow', Arial, sans-serif;
	font-size: 1rem;
	font-weight: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hit-muted);
}

.hitv-all__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

.hitv-all__mark {
	margin: 0 0 0.4rem;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hit-muted);
}

/* ==========================================================================
   IL RESTO DELL'ARTICOLO — testo, liste, embed non riconosciuti
   ========================================================================== */
.hitv-rest {
	margin-top: 1.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--hit-border);
	color: var(--hit-text);
}

.hitv-rest > *:first-child {
	margin-top: 0;
}

.hitv-rest a {
	color: var(--hit-pink);
}

/* Galleria PhotoSwipe: presente nel DOM, mai visibile. */
.hitv-gallery {
	display: none;
}

/* ==========================================================================
   Responsive — un solo punto di rottura, come nella scheda fumetti
   ========================================================================== */
@media screen and (max-width: 860px) {
	.hitv {
		padding-inline: 0;
	}

	.hitv__in {
		padding-inline: 0.75rem;
	}

	.hitv-frame {
		border-radius: 10px;
	}

	.hitv-rail {
		grid-auto-columns: 128px;
	}

	.hitv .hitv-title {
		text-align: center;
	}

	.hitv-eyebrow {
		text-align: center;
	}

	.hitv-meta {
		justify-content: center;
	}

	.hitv-tags {
		justify-content: center;
	}

	.hitv-foot {
		justify-content: center;
	}

	.hitv .hitv-cta {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hitv * {
		transition: none !important;
	}

	.hitv-rail {
		scroll-behavior: auto;
	}
}
