/**
 * Series list: juxt/juxt_message_series_list.php
 */

.juxt-series-page {
	--juxt-series-content-max: 56rem;
	--juxt-series-page-pad: 1.25rem;

	background: #fff;
}

.juxt-series-page-inner {
	max-width: 72rem;
	margin: 0 auto;
	padding: 2.25rem var(--juxt-series-page-pad) 3.5rem;
}

/* -------------------------------------------------------------------------
 * Hero: image-first when present; “Series” + title only when no image
 * ------------------------------------------------------------------------- */
.juxt-series-hero {
	margin-bottom: 2rem;
}

.juxt-series-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #6b6b70;
}

.juxt-series-title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.85rem, 4vw, 2.65rem);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #141418;
}

.juxt-series-featured-image {
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	background: #ececee;
	box-shadow:
		0 2px 4px rgba(0, 0, 0, 0.04),
		0 12px 40px rgba(0, 0, 0, 0.08);
}

.juxt-series-featured-image ~ .juxt-series-prose--description {
	margin-top: 1.75rem;
}

.juxt-series-hero > .juxt-series-featured-image:first-child {
	margin-bottom: 0;
}

.juxt-series-featured-image .juxt-series-hero-img,
.juxt-series-hero-img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

/*
 * Description: blends with white page; width tracks hero (same column), readable measure inside.
 */
.juxt-series-prose--description {
	max-width: var(--juxt-series-content-max);
	margin-left: auto;
	margin-right: auto;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.juxt-series-prose--description .juxt-series-body-copy {
	max-width: 65ch;
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: #2d2d32;
}

.juxt-series-prose--description .juxt-series-body-copy p {
	margin: 0 0 1em;
}

.juxt-series-prose--description .juxt-series-body-copy p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * Resources (ACF on series term)
 * ------------------------------------------------------------------------- */
.juxt-series-resources {
	max-width: var(--juxt-series-content-max);
	margin: 2.5rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.juxt-series-resources__title {
	margin: 0 0 1rem;
	padding: 0 0 0.65rem 0.15rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5c5c62;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.juxt-series-resources__body {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: #2d2d32;
}

.juxt-series-resources__body > *:first-child {
	margin-top: 0;
}

.juxt-series-resources__body > *:last-child {
	margin-bottom: 0;
}

.juxt-series-resources__body ul,
.juxt-series-resources__body ol {
	padding-left: 1.25rem;
}

/* -------------------------------------------------------------------------
 * Messages grid
 * ------------------------------------------------------------------------- */
.juxt-series-messages {
	max-width: 72rem;
	margin-left: auto;
	margin-right: auto;
	margin-top: 2.75rem;
}

.juxt-series-messages-heading {
	margin: 0 0 1.25rem;
	padding: 0 0 0.65rem 0.15rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5c5c62;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.juxt-series-message-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
}

.juxt-series-message-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.juxt-series-message-card:hover {
	border-color: rgba(0, 0, 0, 0.12);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.juxt-series-message-card__thumb {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #ececee;
}

.juxt-series-message-card__thumb .juxt-series-message-card__img,
.juxt-series-message-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	vertical-align: middle;
}

.juxt-series-message-card__body {
	padding: 1rem 1.1rem 1.15rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.juxt-series-message-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
}

.juxt-series-message-card__title a {
	text-decoration: none;
	color: #141418;
}

.juxt-series-message-card__title a:hover,
.juxt-series-message-card__title a:focus {
	text-decoration: underline;
}

.juxt-series-message-card__meta {
	margin: 0 0 0.65rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #4a4a50;
}

.juxt-series-message-card__action {
	margin: auto 0 0;
	padding-top: 0.25rem;
}

.juxt-series-watch-link {
	display: inline-block;
	font-weight: 600;
	font-size: 0.8125rem;
	text-decoration: none;
	color: #0b5fff;
}

.juxt-series-watch-link:hover,
.juxt-series-watch-link:focus {
	text-decoration: underline;
}

.juxt-series-page .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.juxt-series-pagination {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	max-width: 72rem;
	margin-left: auto;
	margin-right: auto;
}

.juxt-series-pagination .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.juxt-series-pagination a {
	text-decoration: none;
	font-weight: 600;
	color: #0b5fff;
}

.juxt-series-pagination a:hover,
.juxt-series-pagination a:focus {
	text-decoration: underline;
}

.juxt-series-empty {
	margin: 2rem auto;
	max-width: var(--juxt-series-content-max);
	text-align: center;
	color: #555;
}

@supports not (aspect-ratio: 16 / 9) {
	.juxt-series-message-card__thumb {
		height: 0;
		padding-bottom: 56.25%;
	}
	.juxt-series-message-card__thumb .juxt-series-message-card__img,
	.juxt-series-message-card__thumb img {
		position: absolute;
		left: 0;
		top: 0;
	}
}
