/**
 * «Видео» (inc/video.php): additions on top of news.css, whose layout the
 * video pages reuse — listing cards (template-parts/page/video-list.php)
 * and the single video page (single-cncgc_video.php).
 * Mobile First. Breakpoints: 576 / 768 / 992 / 1200.
 */

/* ---------- Listing cards: play badge + duration ---------- */
.cncgc-video-card__media {
	position: relative;
}

.cncgc-video-card__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgb(0 0 0 / 18%);
	transition: background var(--cncgc-transition);
	pointer-events: none;
}

.cncgc-video-card__play .cncgc-icon svg {
	width: 56px;
	height: 56px;
	filter: drop-shadow(0 2px 8px rgb(0 0 0 / 35%));
	transition: transform var(--cncgc-transition);
}

.cncgc-video-card__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 2px 8px;
	background: rgb(0 0 0 / 75%);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1.6;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.cncgc-video-card:hover .cncgc-video-card__play {
		background: rgb(0 0 0 / 30%);
	}

	.cncgc-video-card:hover .cncgc-video-card__play .cncgc-icon svg {
		transform: scale(1.08);
	}
}

/* ---------- Single video: player in the main column ---------- */
.cncgc-video-player {
	min-width: 0;
}

.cncgc-video-player__video,
.cncgc-video-player__cover {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	background: #000;
}

.cncgc-video-player__video {
	height: auto;
	object-fit: contain;
}

.cncgc-video-player__video:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 2px;
}

.cncgc-video-player__cover img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
}

/* Edge-to-edge player on phones: cancels the 1em .cncgc-container gutter. */
@media (max-width: 575.98px) {
	.cncgc-video-player {
		margin-inline: -1em;
	}
}

.cncgc-video-hero__duration::before {
	content: "·";
	margin-right: 8px;
}

/* ---------- Single video: excerpt and full description under the player ---------- */
.cncgc-video__lead {
	margin: 24px 0 0;
	max-width: 62ch;
	font-size: 1rem;
	line-height: 1.7;
	color: #4a4a4a;
}

.cncgc-video__content {
	margin-top: 32px;
}

/* ---------- Sidebar «Другие видео»: small play mark on thumbs ---------- */
.cncgc-video-other__thumb {
	position: relative;
}

.cncgc-video-other__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgb(0 0 0 / 20%);
	pointer-events: none;
}

.cncgc-video-other__play .cncgc-icon svg {
	width: 28px;
	height: 28px;
}

@media (prefers-reduced-motion: reduce) {
	.cncgc-video-card__play,
	.cncgc-video-card__play .cncgc-icon svg {
		transition: none;
	}
}
