/**
 * Topic (category) archives and the video archive: the article count, the compact video
 * cards and the "Videos on <topic>" strip that follows the articles. Loaded from archive.php.
 *
 * @package Ryan_Oconnell
 */

.roc-topic-count {
	display: inline-block;
	margin: 18px 0 0;
	padding: 6px 16px;
	border-radius: 999px;
	background: #eff6ff;
	color: #1e40af;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

/* Videos after the articles */
.roc-topic-videos {
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid #e2e8f0;
}

.roc-topic-videos__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}

.roc-topic-videos__head h2 {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
}

.roc-topic-videos__all {
	color: #1d4ed8;
	font-weight: 600;
	text-decoration: none;
}

.roc-topic-videos__all:hover {
	color: #1e40af;
	text-decoration: underline;
}

/* Compact video card: thumbnail, title, date (no description) */
.roc-topic-video {
	display: block;
	margin-top: 30px;
	color: #0f172a;
	text-decoration: none;
}

.roc-topic-video:hover {
	color: #1d4ed8;
}

.roc-topic-video:focus-visible {
	border-radius: 12px;
	outline: 3px solid #2563eb;
	outline-offset: 4px;
}

.roc-topic-video__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 12px;
	aspect-ratio: 16 / 9;
	background: #0f172a;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.roc-topic-video__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.roc-topic-video:hover .roc-topic-video__thumb img {
	transform: scale(1.04);
}

.roc-topic-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

.roc-topic-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -5px;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #2563eb;
}

.roc-topic-video__title {
	display: block;
	margin-top: 12px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

.roc-topic-video__date {
	display: block;
	margin-top: 4px;
	color: #64748b;
	font-size: 14px;
}

@media (max-width: 767px) {
	.roc-topic-videos {
		margin-top: 48px;
		padding-top: 32px;
	}

	.roc-topic-videos__head h2 {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.roc-topic-video__thumb img {
		transition: none;
	}

	.roc-topic-video:hover .roc-topic-video__thumb img {
		transform: none;
	}
}
