/* Latest Reels rail — portrait hover-play cards (reference: economist.com/video "Latest"). */

.wmk-latest-reels {
	margin: 1.5rem 0 3.5rem;
}

/* The section heading directly above the rail drops the child theme's ruled
   line (home-main-group h2:after); every other section heading keeps it. */
.wp-block-group.home-main-group .wp-block-group__inner-container > h2:has(+ .wmk-latest-reels)::after {
	content: none;
}

.wmk-latest-reels-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.wmk-latest-reels-heading {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.2;
}

.wmk-latest-reels-more {
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
	text-decoration: none;
}

.wmk-latest-reels-more:hover,
.wmk-latest-reels-more:focus-visible {
	text-decoration: underline;
}

/* Horizontal strip below desktop; all cards in one row at desktop width. */
.wmk-latest-reels-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0.5rem;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(158px, 216px);
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 1200px) {
	.wmk-latest-reels-list {
		grid-auto-columns: 1fr;
		overflow-x: visible;
		padding-bottom: 0;
	}
}

.wmk-latest-reels-item {
	scroll-snap-align: start;
	margin: 0;
}

.wmk-latest-reels-card {
	display: block;
	color: inherit;
}

.wmk-latest-reels-figure {
	margin: 0;
}

.wmk-latest-reels-media {
	display: block;
	position: relative;
	width: 100%;
	padding: 0;
	border: 0;
	margin: 0;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 4px;
	background: #101010;
	cursor: pointer;
	font: inherit;
}

.wmk-latest-reels-media:focus-visible {
	outline: 2px solid #444444;
	outline-offset: 3px;
}

.wmk-latest-reels-card.is-sound .wmk-latest-reels-media {
	outline: 2px solid #444444;
	outline-offset: 2px;
}

.wmk-latest-reels-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wmk-latest-reels-play {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 0.75rem;
	line-height: 1;
	transition: opacity 0.2s ease;
}

.wmk-latest-reels-card.is-playing .wmk-latest-reels-play {
	opacity: 0;
}

.wmk-latest-reels-duration {
	font-variant-numeric: tabular-nums;
}

.wmk-latest-reels-caption {
	display: block;
	padding: 0.55rem 0.125rem 0;
	font-size: 0.85rem;
	line-height: 1.3;
	color: #444444;
}

/* Title matches .pt-cv-content type (18px, #262626). The color and decoration
   carry !important because the theme's option-generated link CSS otherwise
   repaints the link on every state. */
.wmk-latest-reels .wmk-latest-reels-caption .wmk-latest-reels-title,
.wmk-latest-reels .wmk-latest-reels-caption .wmk-latest-reels-title:hover,
.wmk-latest-reels .wmk-latest-reels-caption .wmk-latest-reels-title:focus,
.wmk-latest-reels .wmk-latest-reels-caption .wmk-latest-reels-title:active {
	display: block;
	font-size: 18px;
	color: #262626 !important;
	text-decoration: none !important;
}

.wmk-latest-reels .wmk-latest-reels-caption .wmk-latest-reels-title:focus-visible {
	outline: 2px solid #444444;
	outline-offset: 2px;
}

/* Matches .pt-cv-custom-fields.pt-cv-ctf-subtitle type (14px, #262626). */
.wmk-latest-reels-date {
	display: block;
	margin-top: 0.55rem;
	font-size: 14px;
	color: #262626;
}
