/* Blog list, category archive and search results */
.blog-list {
	padding: 4% 0 3%;
}

/* this band has no horizontal padding of its own, so the .wrap inside carries the
   page column here (style.css zeroes it for every other .section) */
.blog-list > .wrap {
	padding-inline: var(--page-gutter);
}

.catnav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	padding: 5px 0 40px;
}

.catnav a {
	display: inline-block;
	padding: 9px 22px;
	border-radius: 50px;
	background: #f1f3f5;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	border: 1px solid #e5e7eb;
	transition: background 0.2s ease, color 0.2s ease;
}

.catnav a:hover,
.catnav a.is-active {
	background: #f0a500;
	border-color: #f0a500;
	color: var(--white);
}

/* ---------- post cards ---------- */
.postgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.card {
	display: block;
	background: none;
	box-shadow: none;
}

.card__media {
	display: block;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: var(--bg-2);
}

.card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__title {
	margin: 1.5rem 0 0;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.6;
	/* every card reserves three lines, so the excerpt below starts on the same
	   line for all of them instead of following each title's own length */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(3 * 1.6em);
}

.card__title a:hover {
	color: var(--orange);
}

.card__row {
	display: flex;
	gap: 0;
	margin-top: 1.55rem;
}

.card__date {
	flex: 0 0 57px;
	display: flex;
	flex-direction: column;
	font-size: 1rem;
	line-height: 1.5;
}

.card__excerpt {
	flex: 1;
	min-width: 0;
	padding-left: 7px;
	font-size: 1rem;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
}

.blog-empty {
	padding: 3rem 0;
	text-align: center;
}

/* pagination: plain text links, current page in orange */
.pager {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 3rem 0 1rem;
	font-size: 1.2rem;
	font-weight: 600;
}

.pager .page-numbers {
	display: inline-block;
	min-width: 0;
	height: auto;
	padding: 0;
	margin: 0 0.5rem;
	border: 0;
	background: none;
	color: var(--ink);
	font-size: 1.2rem;
	line-height: 1.5;
}

.pager .page-numbers.current,
.pager a.page-numbers:hover {
	background: none;
	color: var(--orange);
}

.pager .prev {
	margin-right: 0.5rem;
}

/* search page */
.searchpage__title {
	font-size: 1.8rem;
	margin-bottom: 1rem;
}

.searchpage__form {
	display: flex;
	gap: 0.5rem;
	max-width: 640px;
	margin-bottom: 2.5rem;
}

.searchpage__sub {
	font-size: 1.3rem;
	margin: 2rem 0 1.2rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (max-width: 1024px) {
	.postgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.postgrid {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.catnav {
		flex-wrap: nowrap;
		overflow-x: auto;
		justify-content: flex-start;
		padding-bottom: 16px;
	}

	.catnav a {
		flex-shrink: 0;
	}
}
