/*--------------------------------------------------------------
# Blog Listing
# Page header + card grid + pagination. Also carries .blog-card2,
# which is shared with the related-posts strip on a single post
# (see assets/css/blog/blog-post.css, which depends on this file).
--------------------------------------------------------------*/

/* ── Section ── */
.blog-list {
	background: var(--tpp-white);
	/* The header is not an overlay on this template, so the hero-style top
	   clearance is not needed — this is the page's own breathing room. */
	padding: 72px 0 100px;
}

.blog-list__container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ──────────────────────────────────────────────
   Page header
   ────────────────────────────────────────────── */

.blog-list__header {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 64px;
}

.blog-list__eyebrow {
	display: inline-block;
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
	margin-bottom: 16px;
}

/* Owen's "Today's News in Points & Miles" (task E43) runs to two lines;
   balanced so neither is left with a lone word. */
.blog-list__heading {
	font-family: var(--tpp-font-heading);
	font-size: clamp(2rem, 4.5vw + 0.5rem, 3.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0;
	text-wrap: balance;
}

.blog-list__sub {
	font-family: var(--tpp-font-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.7;
	color: var(--tpp-text-light);
	margin: 16px 0 0;
}


/* ──────────────────────────────────────────────
   Grid
   ────────────────────────────────────────────── */

.blog-list__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}


/* ──────────────────────────────────────────────
   Card
   ────────────────────────────────────────────── */

/* The whole card is the anchor, so every state lives here rather than on an
   inner "read more" link. */
.blog-card2 {
	display: flex;
	flex-direction: column;
	background: var(--tpp-white);
	border: 1px solid var(--tpp-border-light);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition:
		border-color 0.3s ease,
		box-shadow 0.35s ease,
		transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);

	/* Scroll-reveal, staggered by --card-index from the partial. */
	opacity: 0;
	transform: translateY(24px);
}

.blog-list.is-visible .blog-card2,
.blog-related.is-visible .blog-card2 {
	opacity: 1;
	transform: translateY(0);
	transition-delay: calc(var(--card-index, 0) * 0.07s);
}

.blog-card2:hover {
	border-color: rgba(0, 0, 0, 0.14);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.07);
	transform: translateY(-3px);
}

.blog-card2:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
}


/* ── Media ── */
.blog-card2__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--tpp-off-white);
	flex-shrink: 0;
}

.blog-card2__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.blog-card2:hover .blog-card2__img {
	transform: scale(1.04);
}

/* Shown when a post has no featured image, so heights stay even across a row
   rather than one card collapsing to its text. */
.blog-card2__media--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tpp-border);
	border-bottom: 1px solid var(--tpp-border-light);
}


/* ── Body ── */
.blog-card2__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 24px 26px;
}

.blog-card2__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.blog-card2__cat {
	font-family: var(--tpp-font-body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tpp-black);
	border: 1px solid var(--tpp-border);
	border-radius: var(--tpp-radius-pill);
	padding: 4px 12px;
	line-height: 1.4;
}

.blog-card2__date {
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--tpp-text-light);
}

.blog-card2__title {
	font-family: var(--tpp-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--tpp-black);
	margin: 0 0 10px;
}

.blog-card2__excerpt {
	font-family: var(--tpp-font-body);
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.65;
	color: var(--tpp-text-light);
	margin: 0 0 20px;

	/* Two lines, so a long excerpt cannot push one card taller than its row. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* margin-top: auto pins this to the bottom, so the arrows line up across a
   row even when titles run to different lengths. */
.blog-card2__more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: auto;
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tpp-black);
	transition: gap 0.3s ease;
}

.blog-card2:hover .blog-card2__more {
	gap: 12px;
}


/* ──────────────────────────────────────────────
   Empty state
   ────────────────────────────────────────────── */

.blog-list__empty {
	text-align: center;
	max-width: 520px;
	margin: 0 auto;
	padding: 56px 0 24px;
}

.blog-list__empty-title {
	font-family: var(--tpp-font-heading);
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--tpp-black);
	margin: 0 0 12px;
}

.blog-list__empty-text {
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--tpp-text-light);
	margin: 0 0 28px;
}

.blog-list__empty-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--tpp-black);
	text-decoration: none;
	transition: gap 0.3s ease;
}

.blog-list__empty-cta:hover {
	color: var(--tpp-black);
	gap: 13px;
}


/* ──────────────────────────────────────────────
   Pagination
   ────────────────────────────────────────────── */

.blog-list .blog-pager {
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid var(--tpp-border-light);
}

.blog-list .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* WordPress emits the current page as a <span> and the rest as <a>, so both
   are styled together and the current one is distinguished below. */
.blog-list .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--tpp-text);
	text-decoration: none;
	border: 1px solid var(--tpp-border-light);
	border-radius: var(--tpp-radius-pill);
	transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.blog-list a.page-numbers:hover {
	color: var(--tpp-black);
	border-color: var(--tpp-black);
}

.blog-list .page-numbers.current {
	background: var(--tpp-black);
	border-color: var(--tpp-black);
	color: var(--tpp-white);
}

/* The gap between numbers is enough; a bordered pill around "…" reads as a
   button that cannot be pressed. */
.blog-list .page-numbers.dots {
	border-color: transparent;
	min-width: 24px;
	padding: 0;
	color: var(--tpp-text-light);
}

.blog-pager__arrow {
	font-size: 1.05em;
	line-height: 1;
}

.blog-list .page-numbers.prev,
.blog-list .page-numbers.next {
	gap: 8px;
}


/* ──────────────────────────────────────────────
   Reduced motion
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.blog-card2,
	.blog-card2__img,
	.blog-card2__more {
		transition: none;
	}

	.blog-card2:hover {
		transform: none;
	}

	.blog-card2:hover .blog-card2__img {
		transform: none;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Tablet (≤991px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 991px) {
	.blog-list {
		padding: 56px 0 80px;
	}

	.blog-list__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px;
	}

	.blog-list__header {
		margin-bottom: 48px;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Mobile (≤767px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
	.blog-list {
		padding: 40px 0 72px;
	}

	.blog-list__grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.blog-list__header {
		margin-bottom: 36px;
	}

	.blog-list__sub {
		font-size: 0.9375rem;
	}

	.blog-card2__body {
		padding: 20px 20px 22px;
	}

	.blog-list .blog-pager {
		margin-top: 44px;
		padding-top: 32px;
	}
}


/* ──────────────────────────────────────────────
   Responsive — Small mobile (≤480px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 480px) {
	.blog-list {
		padding: 32px 0 56px;
	}

	.blog-card2 {
		border-radius: 14px;
	}

	.blog-card2__body {
		padding: 18px 18px 20px;
	}

	.blog-card2__title {
		font-size: 1.05rem;
	}

	/* Narrow enough that a long page list wraps to several rows; the arrows
	   and current page still fit on one. */
	.blog-list .page-numbers {
		min-width: 38px;
		height: 38px;
		padding: 0 11px;
		font-size: 0.8125rem;
	}
}
