/* YouTube channel videos — grid + modal */
.content_full-videos .channel-list,
.channel-list {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(10px, 1.6vw, 16px) clamp(8px, 1.4vw, 14px);
	overflow-anchor: none;
	width: 100%;
}

/* Сброс legacy styles.min.css (144px / width:30% / nowrap) */
.content_full-videos .content_video-latest-card,
.content_full-videos .channel-list .content_video-latest-card {
	cursor: pointer;
	min-width: 0;
	width: auto !important;
	max-width: none !important;
	flex: none !important;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.content_full-videos .content_video-latest-card_img,
.content_video-latest-card_img {
	position: relative;
	width: 100% !important;
	height: auto !important;
	max-height: none !important;
	margin: 0;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: #e8eef3;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.content_full-videos .content_video-latest-card_img img,
.content_video-latest-card_img img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.content_video-latest-card_play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.22);
	color: #fff;
	font-size: clamp(18px, 4vw, 28px);
	opacity: 0;
	transition: opacity 0.2s ease, background 0.2s ease;
	pointer-events: none;
}

.content_video-latest-card_play .fa {
	width: clamp(32px, 8vw, 44px);
	height: clamp(32px, 8vw, 44px);
	line-height: clamp(32px, 8vw, 44px);
	text-align: center;
	border-radius: 50%;
	background: rgba(20, 128, 217, 0.92);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	font-size: 0.55em;
}

.content_video-latest-card:hover .content_video-latest-card_img img {
	transform: scale(1.04);
}

.content_video-latest-card:hover .content_video-latest-card_play {
	opacity: 1;
}

.content_video-latest-card.is-appending {
	animation: channel-card-in 0.42s ease-out both;
}

@keyframes channel-card-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.content_full-videos .content_video-latest-card_title,
.content_video-latest-card_title {
	width: 100% !important;
	max-width: 100% !important;
	margin: 4px 0 0;
	padding: 0;
	font-size: clamp(11px, 2.8vw, 13px);
	line-height: 1.3;
	color: #333;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal !important;
}

/* Floating video modal */
.youtube-video-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 15px;
	overflow-y: auto;
}

.youtube-video-modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
}

.youtube-video-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: auto;
	background: transparent;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	z-index: 1;
}

.youtube-video-modal__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	padding: 0;
	background: rgba(255, 255, 255, 0.96);
	color: #222;
	font-size: 30px;
	font-weight: 300;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, background 0.2s ease;
}

.youtube-video-modal__close:hover {
	background: #fff;
	transform: scale(1.06);
}

.youtube-video-modal__body {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.youtube-video-modal__body iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.youtube-video-modal__banner {
	margin-top: 14px;
	padding: 0;
	background: transparent;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.youtube-video-modal__banner:empty {
	display: none;
	margin: 0;
	box-shadow: none;
}

#video-popup {
	overflow: hidden !important;
}

/* Сетка видео: 5 → 4 → 3 → 2 колонки */
@media (max-width: 1199.98px) {
	.content_full-videos .channel-list,
	.channel-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 991.98px) {
	.content_full-videos .channel-list,
	.channel-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px 12px;
	}
}

@media (max-width: 767.98px) {
	.content_full-videos .channel-list,
	.channel-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px 10px;
	}

	.youtube-video-modal {
		padding: 12px 10px;
	}

	.youtube-video-modal__close {
		top: -10px;
		right: -6px;
		width: 36px;
		height: 36px;
		font-size: 26px;
		line-height: 34px;
	}
}
