/**
 * Страница «Видео» — отдельный файл стилей (шаблон video-page.php).
 * Расположение в теме: assets/css/pages/video-page.css (не каталог курсов).
 *
 * Блок Hero: макет Figma node 1361:56946 (отступы контейнера 1200px, колонка текста 650px,
 * зазор 70px, высота фрейма ~450px на десктопе); иллюстрация 480×382 — contain в маске 32px.
 * При изменении героя хаба курсов имеет смысл сверять общие токены с courses-hub.css.
 *
 * Каталог и карточки — выдержка из courses-hub.css (полный hub для страницы не подключается).
 *
 * @package Bloomcare
 */

/* Фон страницы по макету видео-героя (Figma). */
body.bc-video-page {
	background: #eaeee4;
}

.site-footer {
	margin-top: 0;
}

.bc-courses-hub {
	width: 100%;
	box-sizing: border-box;
}

/* =============================================================================
 * Hero (база как у хаба курсов; подгонка под Figma 1361:56946 — см. .bc-video-page__hero)
 * ============================================================================= */

.bc-courses-hub__hero {
	width: 100%;
	background: transparent;
	box-sizing: border-box;
	padding: 48px 0 82px;
}

.bc-courses-hub__hero-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 70px;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0;
}

/*
 * Figma 1361:56946 — фрейм героя ~450px по высоте, контент 650px + отступ 70px + визуал 480px (=1200).
 * Горизонтальные поля как у хаба: только .bc-container (max-width 1200), без лишнего padding секции.
 */
.bc-video-page__hero.bc-courses-hub__hero {
	padding-left: 0;
	padding-right: 0;
}

@media (min-width: 1280px) {
	.bc-video-page__hero.bc-courses-hub__hero {
		min-height: 450px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		box-sizing: border-box;
	}

	.bc-video-page__hero.bc-courses-hub__hero > .bc-courses-hub__hero-inner {
		flex: 0 0 auto;
	}
}

.bc-courses-hub__hero-content {
	display: flex;
	flex-direction: column;
	gap: 40px;
	align-items: flex-start;
	flex: 0 0 auto;
	width: 650px;
	min-width: 0;
}

.bc-courses-hub__hero-text {
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	color: #3f2b22;
}

.bc-courses-hub__hero-title {
	margin: 0;
	width: 100%;
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 54px;
	line-height: 1.1;
	color: #3f2b22;
	font-variation-settings: "CTGR" 0, "wdth" 100;
	font-feature-settings: "lnum" 1, "pnum" 1;
}

.bc-courses-hub__hero-lead {
	margin: 0;
	width: 100%;
	max-width: 650px;
	font-family: "Manrope", system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	color: #3f2b22;
	font-feature-settings: "lnum" 1, "pnum" 1;
}

.bc-courses-hub__hero-visual {
	position: relative;
	flex: 0 0 auto;
	width: 480px;
	height: 382px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bc-courses-hub__hero-art {
	position: relative;
	width: 480px;
	height: 382px;
	overflow: hidden;
	pointer-events: none;
	border-radius: 32px;
	background: transparent;
}

/*
 * Иллюстрация героя (Figma 1361:56955 внутри 480×382).
 * object-fit: contain — показываем весь ассет в скруглённой маске без второго «кропа»
 * (cover + отрицательные проценты давали сильное обрезание относительно макета).
 */
.bc-video-page__hero .bc-courses-hub__hero-art-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	box-sizing: border-box;
}

/* =============================================================================
 * Каталог и карточки (выдержка из courses-hub.css — без табов и пагинации)
 * ============================================================================= */

.bc-courses-hub__catalog {
	width: 100%;
	box-sizing: border-box;
	filter: drop-shadow(0 -10px 15px rgba(0, 0, 0, 0.02));
}

.bc-courses-hub__catalog-surface {
	width: 100%;
	background: #fef5ed;
	border-top-left-radius: 80px;
	border-top-right-radius: 80px;
	padding: 80px 0;
	box-sizing: border-box;
}

.bc-courses-hub__catalog-inner {
	width: 1200px;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
}

.bc-courses-hub__grid {
	width: 1200px;
	display: flex;
	flex-wrap: wrap;
	gap: 32px 12px;
	align-items: stretch;
	justify-content: center;
}

.bc-courses-hub__card {
	width: 392px;
	border-radius: 32px;
	background: #fff;
	box-shadow: 0 4px 5px rgba(0, 0, 0, 0.02);
	display: flex;
	flex-direction: column;
	align-items: center;
	align-self: stretch;
	gap: 24px;
	padding: 0 28px 28px;
	overflow: visible;
	box-sizing: border-box;
}

.bc-courses-hub__card-thumb {
	position: relative;
	width: calc(100% + 56px);
	height: 250px;
	margin-left: -28px;
	margin-right: -28px;
	flex-shrink: 0;
	border-radius: 32px;
	overflow: hidden;
	pointer-events: none;
}

.bc-courses-hub__card-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
	object-position: center;
}

.bc-courses-hub__card-body {
	width: 100%;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
}

.bc-courses-hub__card-main {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bc-courses-hub__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.bc-courses-hub__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 79px;
	background: #fef5ed;
	font-family: "Manrope", system-ui, sans-serif;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.35;
	color: #a63d52;
	font-feature-settings: "lnum" 1, "pnum" 1;
}

.bc-courses-hub__card-title {
	margin: 0;
	width: 100%;
	font-family: "Noto Serif", Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.2;
	color: #3f2b22;
	font-variation-settings: "CTGR" 0, "wdth" 100;
	font-feature-settings: "lnum" 1, "pnum" 1;
}

/* --- Модификаторы только для страницы «Видео» --- */

.bc-video-page__catalog .bc-courses-hub__catalog-inner {
	align-items: stretch;
}

.bc-video-page__grid {
	justify-content: center;
}

.bc-video-page__card {
	text-align: left;
}

.bc-video-page__card-hit {
	position: absolute;
	inset: 0;
	z-index: 4;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	cursor: pointer;
	pointer-events: auto;
}

.bc-video-page__card-hit:focus-visible {
	outline: 3px solid rgba(204, 124, 97, 0.85);
	outline-offset: 3px;
}

.bc-video-page__card-thumb.bc-courses-hub__card-thumb {
	/* Родитель в hub передаёт none — включаем события только для зоны превью и кнопки поверх картинки. */
	pointer-events: auto;
}

.bc-video-page__thumb-chips {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	pointer-events: none;
}

.bc-video-page__card-title {
	margin: 0;
}

.bc-video-page__card-title-text {
	display: block;
}

/* Модальное окно с видео — Figma Frame 2131332786: ≥1280 1120×630 r24 (1361:61631); ≤1279 960×540 (1361:60742); ≤1023 704×396 r27.75 (1361:60858); ≤767 512×288 (1361:60959); ≤559 320×180 r12 (1361:61630); overlay rgba(0,0,0,.6). Отступ сверху по макету: y 192 / 195 / 200 / 196 / 200 px */
.bc-video-page__dialog {
	--bc-video-dialog-top: 192px;
	position: fixed;
	left: 50%;
	right: auto;
	top: var(--bc-video-dialog-top);
	bottom: auto;
	transform: translateX(-50%);
	width: min(1120px, calc(100vw - 40px));
	max-width: none;
	max-height: calc(100vh - var(--bc-video-dialog-top) - 24px);
	padding: 0;
	border: none;
	margin: 0;
	background: transparent;
	box-sizing: border-box;
	overflow: visible;
	color-scheme: dark;
}

.bc-video-page__dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.bc-video-page__dialog-surface {
	position: relative;
	width: 100%;
	border-radius: 24px;
	overflow: hidden;
	background: #000;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.35),
		inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	box-sizing: border-box;
}

.bc-video-page__dialog-close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s ease;
}

.bc-video-page__dialog-close-icon {
	display: block;
	margin-top: -2px;
	font-weight: 300;
}

.bc-video-page__dialog-close:hover {
	background: rgba(255, 255, 255, 0.32);
	color: #fff;
}

.bc-video-page__dialog-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.bc-video-page__dialog-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.bc-video-page__dialog-player iframe {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (min-width: 1280px) {
	.bc-video-page__dialog {
		--bc-video-dialog-top: 80px;
		width: 1120px;
		max-width: calc(100vw - 80px);
	}
}

@media (max-width: 1279px) {
	.bc-video-page__dialog {
		--bc-video-dialog-top: 130px;
		width: min(960px, calc(100vw - 64px));
	}
}

@media (max-width: 1023px) {
	.bc-video-page__dialog {
		--bc-video-dialog-top: 200px;
		width: min(704px, calc(100vw - 64px));
	}

	.bc-video-page__dialog-surface {
		border-radius: 27.75px;
	}
}

@media (max-width: 767px) {
	.bc-video-page__dialog {
		--bc-video-dialog-top: 196px;
		width: min(512px, calc(100vw - 48px));
	}

	.bc-video-page__dialog-surface {
		border-radius: 24px;
	}
}

@media (max-width: 559px) {
	.bc-video-page__dialog {
		--bc-video-dialog-top: 200px;
		width: min(320px, calc(100vw - 40px));
	}

	.bc-video-page__dialog-surface {
		border-radius: 12px;
	}

	.bc-video-page__dialog-close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 24px;
	}
}

@media (max-width: 1279px) {
	.bc-courses-hub__hero {
		padding: 36px 0 48px;
	}

	.bc-courses-hub__hero-inner {
		margin-top: 0;
		padding-left: 20px;
		padding-right: 20px;
		gap: clamp(24px, 4vw, 48px);
		align-items: center;
	}

	.bc-courses-hub__hero-content {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}

	.bc-courses-hub__hero-text {
		gap: 20px;
	}

	.bc-courses-hub__hero-title {
		font-size: 48px;
		line-height: 1.1;
	}

	.bc-courses-hub__hero-lead {
		font-weight: 400;
		font-size: 18px;
		line-height: 1.4;
	}

	.bc-courses-hub__hero-visual {
		width: 362px;
		height: 288.446px;
		flex: 0 0 auto;
	}

	.bc-courses-hub__hero-art {
		width: 362px;
		height: 288.446px;
	}

	.bc-courses-hub__catalog-surface {
		border-top-left-radius: 64px;
		border-top-right-radius: 64px;
		padding: 64px 20px;
	}

	.bc-courses-hub__catalog-inner {
		width: 100%;
		max-width: none;
		padding: 0;
		gap: 40px;
	}

	.bc-courses-hub__grid {
		width: 100%;
		max-width: none;
		justify-content: center;
	}

	.bc-courses-hub__card {
		box-sizing: border-box;
		padding: 0 0 28px;
		gap: 20px;
		flex: 0 1 calc((100% - 24px) / 3);
		width: calc((100% - 24px) / 3);
		max-width: calc((100% - 24px) / 3);
		min-width: 0;
	}

	.bc-video-page__grid {
		justify-content: center;
	}

	.bc-courses-hub__card-thumb {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
		height: 204px;
	}

	.bc-courses-hub__card-body {
		gap: 24px;
		padding: 0 20px;
	}

	.bc-courses-hub__card-main {
		gap: 12px;
	}

	.bc-courses-hub__card-title {
		font-size: 22px;
	}
}

@media (max-width: 1023px) {
	.bc-courses-hub__hero {
		padding: 32px 0 64px;
	}

	.bc-courses-hub__hero-inner {
		flex-direction: column;
		align-items: center;
		gap: 32px;
		padding-left: 40px;
		padding-right: 40px;
	}

	.bc-courses-hub__hero-content {
		display: contents;
	}

	.bc-courses-hub__hero-inner > nav.bc-breadcrumbs {
		order: 1;
		width: 100%;
		max-width: 100%;
		align-self: stretch;
	}

	.bc-courses-hub__hero-visual {
		order: 2;
		width: 380px;
		height: 303px;
	}

	.bc-courses-hub__hero-art {
		width: 380px;
		height: 303px;
	}

	.bc-courses-hub__hero-text {
		order: 3;
		align-items: center;
		text-align: center;
		max-width: 650px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}

	.bc-courses-hub__hero-title {
		font-size: 42px;
		line-height: 1.1;
		max-width: 650px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}

	.bc-courses-hub__hero-lead {
		font-size: 17px;
		line-height: 1.4;
		max-width: 100%;
	}

	.bc-courses-hub__catalog-surface {
		padding: 64px 40px;
	}

	.bc-courses-hub__catalog-inner {
		gap: 32px;
	}

	.bc-courses-hub__grid {
		max-width: 932px;
		margin-left: auto;
		margin-right: auto;
		justify-content: center;
	}

	.bc-courses-hub__card {
		box-sizing: border-box;
		flex: 0 1 calc((100% - 12px) / 2);
		width: calc((100% - 12px) / 2);
		max-width: 466px;
		min-width: 0;
	}

	.bc-video-page__grid {
		justify-content: center;
	}

	.bc-courses-hub__card-thumb {
		height: auto;
		aspect-ratio: 338 / 216;
	}

	.bc-courses-hub__card-body {
		gap: 20px;
		padding: 0 20px;
	}
}

@media (max-width: 767px) {
	.bc-courses-hub__hero {
		padding: 32px 0 64px;
	}

	.bc-courses-hub__hero-inner {
		padding-left: 40px;
		padding-right: 40px;
		gap: 32px;
	}

	.bc-courses-hub__hero-visual {
		width: 380px;
		height: 303px;
	}

	.bc-courses-hub__hero-art {
		width: 380px;
		height: 303px;
	}

	.bc-courses-hub__hero-title {
		max-width: 480px;
		font-size: 42px;
		line-height: 1.1;
	}

	.bc-courses-hub__hero-lead {
		font-size: 17px;
		line-height: 1.4;
	}

	.bc-courses-hub__catalog-surface {
		border-top-left-radius: 48px;
		border-top-right-radius: 48px;
		padding: 64px 40px;
	}

	.bc-courses-hub__catalog-inner {
		gap: 28px;
	}

	.bc-courses-hub__grid {
		max-width: 680px;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: center;
		gap: 24px;
	}

	.bc-courses-hub__card {
		width: 100%;
		max-width: 680px;
		flex: 1 1 100%;
	}

	.bc-courses-hub__card-thumb {
		aspect-ratio: 338 / 216;
	}

	.bc-courses-hub__card-body {
		padding: 0 24px;
		gap: 20px;
	}

	.bc-courses-hub__chip {
		padding: 5px 10px;
		font-size: 13px;
	}

	.bc-courses-hub__card-title {
		font-size: 20px;
	}
}

@media (max-width: 559px) {
	.bc-courses-hub__hero {
		padding: 32px 0 48px;
	}

	.bc-courses-hub__hero-inner {
		padding-left: 20px;
		padding-right: 20px;
		gap: 28px;
	}

	.bc-courses-hub__hero-inner > nav.bc-breadcrumbs {
		font-size: 14px;
		line-height: 1.35;
	}

	.bc-courses-hub__hero-visual {
		width: 280px;
		height: 223px;
	}

	.bc-courses-hub__hero-art {
		width: 280px;
		height: 223px;
	}

	.bc-courses-hub__hero-text {
		gap: 16px;
	}

	.bc-courses-hub__hero-title {
		max-width: 320px;
		font-size: 28px;
		line-height: 1.1;
	}

	.bc-courses-hub__hero-lead {
		font-size: 16px;
		line-height: 1.4;
		color: #454545;
	}

	.bc-courses-hub__catalog-surface {
		border-top-left-radius: 36px;
		border-top-right-radius: 36px;
		padding: 40px 20px;
	}

	.bc-courses-hub__catalog-inner {
		gap: 24px;
	}

	.bc-courses-hub__grid {
		max-width: 520px;
		gap: 8px;
	}

	.bc-courses-hub__card {
		max-width: 520px;
		padding-bottom: 24px;
	}

	.bc-courses-hub__card-body {
		padding: 0 20px;
	}

	.bc-courses-hub__card-main {
		gap: 12px;
	}

	.bc-courses-hub__card-title {
		font-size: 19px;
	}

	.bc-breadcrumbs__item {
		font-family: Manrope, system-ui, sans-serif;
		font-size: 14px;
		font-style: normal;
		font-weight: 400;
		line-height: 135%;
	}
}
