/**
 * Block: Featured work.
 *
 * Mobile: header, then a swipeable row of cards. Desktop (960px+): header in a
 * left column, the row running off the right edge of the viewport.
 */

.ci-featured {
	overflow: hidden;
}

.ci-featured__inner {
	display: grid;
	gap: 2rem;
}

.ci-featured__head {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ci-featured__arrows[hidden] {
	display: none;
}

.ci-featured__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ci-featured__item {
	width: min(80vw, 20rem);
	height: auto;
}

/* Before Swiper runs (or without JavaScript), the row scrolls natively. */
.ci-featured__track:not(.swiper-initialized) .ci-featured__list {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.ci-featured__track:not(.swiper-initialized) .ci-featured__item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

@media (min-width: 960px) {
	.ci-featured__inner {
		grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
		align-items: start;
		gap: 3rem;
	}

	.ci-featured__head {
		position: sticky;
		top: calc(var(--ci-header-height) + 2rem);
		gap: 2rem;
	}

	.ci-featured__head .ci-section-head__title {
		font-size: var(--wp--preset--font-size--heading-2);
	}

	/* Let the row bleed past the container to the viewport edge. */
	.ci-featured__track {
		margin-inline-end: calc((100vw - 100%) / -2);
		overflow: visible;
	}

	.ci-featured__item {
		width: clamp(16rem, 22vw, 21rem);
	}
}
