/* Unified editorial cards, compact footer, and final responsive guardrails. */

.post-card,
.series-card,
.series-related__card {
	display: flex;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border: 1px solid #e6e4e2;
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.post-card:hover,
.series-card:hover,
.series-related__card:hover {
	border-color: #cbc7c3;
	box-shadow: 0 12px 30px rgba(20, 17, 15, 0.08);
	transform: translateY(-2px);
}

.post-card__link,
.series-card__link,
.series-related__card {
	display: flex;
	width: 100%;
	height: 100%;
	min-width: 0;
	flex-direction: column;
	color: #171515;
	text-decoration: none;
}

.post-card__link:hover,
.series-card__link:hover,
.series-related__card:hover {
	color: #171515;
}

.post-card__link:focus-visible,
.series-card__link:focus-visible,
.series-related__card:focus-visible {
	outline: 3px solid #fd3301;
	outline-offset: -3px;
}

.post-card__media,
.home .post-card__media,
.related-posts .post-card__media,
.series-card__art {
	position: relative;
	display: block;
	width: 100%;
	min-height: 0;
	flex: 0 0 auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #ece9e6;
}

.post-card__media > img,
.series-card__art > img,
.series-related__card > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 420ms ease;
}

.post-card:hover .post-card__media > img,
.series-card:hover .series-card__art > img,
.series-related__card:hover > img {
	transform: scale(1.025);
}

.post-card__content,
.series-card__body,
.sermon-home .series-card__body,
.series-related__card > span {
	display: flex;
	min-height: 0;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 20px 20px 22px;
	background: #fff;
}

.post-card__title,
.series-card__body h3,
.series-related__card strong {
	margin: 0;
	color: #171515;
	font-size: clamp(1.08rem, 1.45vw, 1.28rem);
	font-weight: 750;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.post-card__excerpt,
.series-card__body p,
.series-related__card p {
	display: -webkit-box;
	overflow: hidden;
	margin: 9px 0 0;
	color: #716b82;
	font-size: 0.98rem;
	font-weight: 500;
	line-height: 1.48;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.series-card__meta,
.series-related__card small {
	display: block;
	margin-top: auto;
	padding-top: 13px;
	color: #716b82;
	font-size: 0.7rem;
	font-weight: 750;
	letter-spacing: 0.05em;
	line-height: 1.3;
	text-transform: uppercase;
}

.series-related__card > img {
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Featured collection keeps the Ministry Pass-style image overlay. */
.featured-collection-card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.featured-collection-card__overlay {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(180deg, transparent 38%, rgba(7, 7, 7, 0.18) 60%, rgba(7, 7, 7, 0.9) 100%);
	pointer-events: none;
}

.featured-collection-card__content,
.featured-collection-card--primary .featured-collection-card__content {
	position: absolute;
	z-index: 2;
	right: 22px;
	bottom: 21px;
	left: 22px;
	display: flex;
	min-width: 0;
	flex-direction: column;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.featured-collection-card__content strong {
	color: #fff;
	font-size: 1.08rem;
	font-weight: 750;
	line-height: 1.25;
}

.featured-collection-card--primary .featured-collection-card__content strong {
	font-size: clamp(1.6rem, 2.2vw, 2.15rem);
}

.featured-collection-card__summary {
	display: -webkit-box;
	overflow: hidden;
	max-width: 760px;
	margin-top: 7px;
	color: rgba(255, 255, 255, 0.92);
	font-size: 0.91rem;
	line-height: 1.42;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.featured-collection-card:not(.featured-collection-card--primary) .featured-collection-card__summary {
	display: -webkit-box;
	font-size: 0.82rem;
	line-height: 1.36;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* Authenticated overview is real content, never a blurred placeholder. */
[data-series-guide].is-authenticated .series-guide-preview__lines {
	display: none;
}

.series-guide-overview__content {
	margin-top: 20px;
	color: #403b4d;
	font-size: 0.98rem;
	line-height: 1.7;
}

.series-guide-overview__content > :first-child {
	margin-top: 0;
}

.series-guide-overview__content > :last-child {
	margin-bottom: 0;
}

[data-series-guide]:not(.is-authenticated) .series-guide-overview__content {
	display: none;
}

/* Preserve footer structure while removing unnecessary vertical emptiness. */
.site-footer.sermon-footer {
	min-height: 0 !important;
	padding-top: 70px !important;
}

.sermon-footer__grid {
	gap: 44px;
	padding-bottom: 62px !important;
}

.sermon-footer__bottom {
	min-height: 72px !important;
}

/* Guardrails shared by study, search, author, and sermon listings. */
.post-grid,
.series-grid,
.series-related__grid {
	min-width: 0;
}

.post-card *,
.series-card *,
.series-related__card *,
.featured-collection-card__content * {
	min-width: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
	.post-grid--listing {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.series-grid--home {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-footer.sermon-footer {
		padding-top: 52px !important;
	}

	.sermon-footer__grid {
		padding-bottom: 44px !important;
	}
}

@media (max-width: 700px) {
	.post-grid--listing,
	.series-grid--home,
	.series-related__grid {
		grid-template-columns: 1fr;
	}

	.post-card__content,
	.series-card__body,
	.sermon-home .series-card__body,
	.series-related__card > span {
		padding: 18px 18px 20px;
	}

	.post-card__title,
	.series-card__body h3,
	.series-related__card strong {
		font-size: 1.12rem;
	}

	.featured-collection-card__content,
	.featured-collection-card--primary .featured-collection-card__content {
		right: 18px;
		bottom: 18px;
		left: 18px;
	}

	.featured-collection-card--primary .featured-collection-card__content strong,
	.featured-collection-card__content strong {
		font-size: 1.34rem;
	}

	.featured-collection-card__summary {
		font-size: 0.84rem;
		-webkit-line-clamp: 2;
	}

	.site-footer.sermon-footer {
		padding-top: 40px !important;
	}

	.sermon-footer__grid {
		gap: 28px !important;
		padding-bottom: 34px !important;
	}

	.sermon-footer__bottom {
		min-height: 0 !important;
		padding: 20px 0 !important;
	}
}

@media (max-width: 380px) {
	.post-card__content,
	.series-card__body,
	.sermon-home .series-card__body,
	.series-related__card > span {
		padding: 16px;
	}

	.featured-collection-card__summary {
		-webkit-line-clamp: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.post-card,
	.series-card,
	.series-related__card,
	.post-card__media > img,
	.series-card__art > img,
	.series-related__card > img {
		transition: none;
	}
}
