/* ==========================================================================
   Post footer (parts/post-footer.html): below every news post.
   Previous and next cards, More club news, and the Join the Vale band.
   Loaded on single posts only (inc/post-footer.php).
   ========================================================================== */

.mv-post-footer,
.mv-post-footer * {
	box-sizing: border-box;
}
/* Spacing in here is set explicitly, not by WordPress's block gap. */
.mv-post-footer :where(p, h2, h3, figure, .wp-block-group, .wp-block-buttons, .wp-block-query, .wp-block-post-template) {
	margin-block: 0;
}
.mv-post-footer .is-layout-flow > * {
	margin-block-start: 0;
}

/* --------------------------------------------------------------------------
   Previous and next posts: two cards at article width.
   -------------------------------------------------------------------------- */
.mv-post-footer .mv-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	width: min(760px, calc(100% - 2 * var(--mv-gutter)));
	margin: 0 auto;
	padding-block: 32px 56px;
	border-top: 1px solid var(--mv-line);
}
.mv-post-nav .wp-block-post-navigation-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--mv-line);
	border-radius: 8px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
/* The newest post has no "next"; the oldest has no "previous". */
.mv-post-nav .wp-block-post-navigation-link:empty {
	display: none;
}
.mv-post-nav .post-navigation-link-next {
	grid-column: 2;
	justify-content: flex-end;
	text-align: right;
}
.mv-post-nav .wp-block-post-navigation-link:hover {
	border-color: var(--mv-maroon-500);
	box-shadow: var(--wp--preset--shadow--card);
}
.mv-post-nav .wp-block-post-navigation-link:focus-within {
	outline: 2px solid var(--mv-maroon-500);
	outline-offset: 2px;
}
.mv-post-nav .wp-block-post-navigation-link a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	color: var(--mv-ink);
	text-decoration: none;
}
/* The whole card is the link. */
.mv-post-nav .wp-block-post-navigation-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.mv-post-nav .wp-block-post-navigation-link a:focus-visible {
	outline: none;
}
.mv-post-nav .post-navigation-link__label {
	font-family: var(--mv-display);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mv-maroon-500);
}
.mv-post-nav .post-navigation-link__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-family: var(--mv-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
}
.mv-post-nav [class*="post-navigation-link__arrow"] {
	flex: none;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--mv-maroon-500);
}

/* --------------------------------------------------------------------------
   More club news: the homepage news cards, three across.
   The post being read is left out (inc/post-footer.php).
   -------------------------------------------------------------------------- */
.mv-post-more {
	background: var(--mv-surface-alt);
	padding-block: 56px;
}
.mv-post-more-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 24px;
}
.mv-post-more-head h2 {
	font-size: var(--wp--preset--font-size--x-large);
}
.mv-post-more-all a {
	color: var(--mv-maroon-500);
}
.mv-post-more .mv-news-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* --------------------------------------------------------------------------
   Join the Vale: a club band, kept apart from the article above it.
   -------------------------------------------------------------------------- */
.mv-post-cta {
	background: var(--mv-maroon);
	color: #fff;
	padding-block: 44px;
}
.mv-post-cta-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
}
.mv-post-cta h2 {
	color: #fff;
	font-size: var(--wp--preset--font-size--x-large);
}
.mv-post-cta p {
	max-width: 560px;
	margin-block-start: 6px !important;
	color: rgba(255, 255, 255, .88);
}
.mv-post-cta .wp-block-buttons {
	gap: 12px;
}
.mv-post-cta .wp-block-button.is-style-mv-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.mv-post-cta .wp-block-button.is-style-mv-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, .1);
}

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.mv-post-more .mv-news-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}
@media (max-width: 782px) {
	.mv-post-footer .mv-post-nav {
		grid-template-columns: 1fr;
		gap: 12px;
		padding-block: 24px 40px;
	}
	.mv-post-nav .post-navigation-link-next {
		grid-column: auto;
	}
	.mv-post-nav .wp-block-post-navigation-link {
		padding: 16px;
	}
	.mv-post-more,
	.mv-post-cta {
		padding-block: 40px;
	}
	.mv-post-cta .wp-block-buttons,
	.mv-post-cta .wp-block-button,
	.mv-post-cta .wp-block-button__link {
		width: 100%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mv-post-nav .wp-block-post-navigation-link {
		transition: none;
	}
}
