/*
 * "Latest from the Visit Burbank blog", under every post (partials/blog/see-more.php).
 * Borrows from the homepage's "See what's new in the city": the cream ground, the pink offset behind a
 * photo on hover and the red button. The red arrow on the titles comes from the guide's link headings.
 * Headings are Instrument Serif, the rest Lexend.
 *
 * The templates print this outside their .container: those clip overflow, so a full-width ground
 * can't reach the screen edges from inside them.
 */
.vb-latest {
	--l-cream: var(--vb-color-cream, #F4F2EB);
	--l-ink: var(--vb-color-primary, #231F20);
	--l-red: var(--vb-color-accent, #EF4343);
	--l-pink: var(--vb-color-pink, #EDD0E4);
	margin-top: clamp(56px, 7vw, 96px);
	padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 96px);
	background: var(--l-cream);
	font-family: "Lexend", sans-serif;
	color: var(--l-ink);
	text-align: left;
}
/* custom.css still drops the footer 50-114px for the old fixed header (as .vb-theme-hero footer undoes on
   hero pages). On white that didn't show; here it would leave a white strip under the cream. */
.vb-latest + .vb-footer { top: 0; }
.vb-latest__inner { width: min(1240px, 100% - 2 * clamp(20px, 4vw, 40px)); margin: 0 auto; }

/* ---------- Heading ---------- */
.vb-latest__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: clamp(28px, 3.5vw, 44px);
}
.vb-latest .vb-latest__title {
	margin: 0;
	font-size: clamp(40px, 4.4vw, 56px);
	line-height: 1.05;
	text-wrap: balance;
}
.vb-latest a.vb-latest__all {
	flex: none;
	display: inline-block;
	padding: 14px 24px;
	background: var(--l-red);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color .15s;
}
.vb-latest a.vb-latest__all:hover,
.vb-latest a.vb-latest__all:focus-visible { background: var(--l-ink); color: #fff; }

/* ---------- Layout: the newest post large, the next three beside it ---------- */
.vb-latest__grid { display: grid; gap: 40px; }
.vb-latest__rest { display: grid; gap: 28px; align-content: space-between; } /* the last row lines up with the bottom of the lead */

/* The title link covers the whole card, so a card is one click and one tab stop. */
.vb-latest__card { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; }
.vb-latest__card--lead { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.vb-latest .vb-latest__name a { color: inherit; text-decoration: none; }
.vb-latest .vb-latest__name a::after { content: ""; position: absolute; inset: 0; }
.vb-latest .vb-latest__name a:focus-visible { outline: none; }
.vb-latest .vb-latest__name a:focus-visible::after { outline: 2px solid var(--l-ink); outline-offset: 4px; }

/* The arrow from the guide's link headings. The SVG's viewBox is cropped to the stroke, so
   vertical-align: baseline puts its foot on the text's baseline. */
.vb-latest__arrow { display: inline-block; width: .36em; height: .36em; margin-left: .22em; vertical-align: baseline; overflow: visible; fill: none; stroke: var(--l-red); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vb-latest__end { white-space: nowrap; }

/* ---------- Photos ---------- */
.vb-latest__media { position: relative; isolation: isolate; }
.vb-latest__media::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background: var(--l-pink);
	opacity: 0;
	transition: opacity .25s, transform .25s;
}
.vb-latest__media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--l-cream); }
.vb-latest__card--lead .vb-latest__media img { aspect-ratio: 3 / 2; }

/* ---------- Text ---------- */
.vb-latest .vb-latest__name { margin: 0; font-size: 24px; line-height: 1.15; text-wrap: balance; }
.vb-latest .vb-latest__card--lead .vb-latest__name { font-size: clamp(32px, 3vw, 38px); line-height: 1.1; }
.vb-latest .vb-latest__excerpt { margin: 12px 0 0; font-size: 17px; line-height: 1.55; text-wrap: pretty; }

@media (min-width: 900px) {
	.vb-latest__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 4vw, 64px); }
	.vb-latest__card { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
	.vb-latest__card--lead { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 599px) {
	.vb-latest__head { display: block; }
	.vb-latest a.vb-latest__all { margin-top: 18px; }
}
/* Pointer devices only, so a tap on a phone doesn't leave a card stuck in its hover state. */
@media (hover: hover) {
	.vb-latest__card:hover .vb-latest__name a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
	.vb-latest__card:hover .vb-latest__media::before { opacity: 1; transform: translate(-8px, -8px); }
	.vb-latest__card--lead:hover .vb-latest__media::before { transform: translate(-15px, -15px); }
}
@media (prefers-reduced-motion: reduce) {
	.vb-latest__media::before { transition: none; }
}
