/* News overview (posts page, categories) and a single news post. */

/* ------------------------------------------------------------ Category chips */

.news-filter-section {
	padding-top: 40px;
}

.news-filter {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.news-filter__label {
	margin: 0;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-size: 22px;
	font-weight: 600;
}

.news-filter .chip-row {
	gap: 8px;
}

@media (min-width: 1024px) {
	.news-filter-section {
		padding-top: 72px;
	}

	.news-filter {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
	}

	.news-filter .chip-row {
		justify-content: flex-end;
	}
}

/* ---------------------------------------------------------------- Grid */

/* Less air between the chips and the first posts than a normal section has. */
.news-list-section {
	padding-top: 32px;
}

@media (min-width: 1024px) {
	.news-list-section {
		padding-top: 56px;
	}
}

.news-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-grid > li {
	min-width: 0;
}

.news-grid .card-photo {
	height: 100%;
}

.news-empty {
	margin: 0;
	padding: 40px 0;
	font-size: 19px;
}

@media (min-width: 640px) {
	.news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (min-width: 1024px) {
	.news-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------ Pagination */

.pagination {
	margin-top: 40px;
}

.pagination__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pagination .pager {
	flex: 1 1 auto;
	gap: 6px;
}

.pager__gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	color: var(--rbnl-mute);
}

.pager__item--nav {
	gap: 8px;
	padding: 0 18px;
	font-weight: 500;
}

.pager__item.is-disabled {
	background: transparent;
	box-shadow: none;
	color: #b5b2c4;
}

@media (min-width: 1024px) {
	.pagination {
		margin-top: 56px;
	}
}

@media (max-width: 1023.98px) {
	.pager__item--nav {
		padding: 0;
		min-width: 44px;
	}

	.pager__gap {
		height: 44px;
	}
}

/* --------------------------------------------------------------- A post */

.post__head {
	padding-top: 24px;
}

.post__head-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
}

.post__meta a.pill {
	text-decoration: none;
}

.post__date {
	color: var(--rbnl-mute);
	font-size: 15px;
}

.post__title {
	margin: 0;
	font-size: clamp(36px, calc(36px + 24 * (100vw - 390px) / 1050), 60px);
	line-height: 1.02;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.post__lead {
	margin: 0;
	color: var(--rbnl-ink);
	font-size: clamp(18px, calc(18px + 4 * (100vw - 390px) / 1050), 22px);
	line-height: 1.55;
}

.post__figure-wrap {
	padding-inline: 16px;
}

.post__figure {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 1408px;
	margin: 0 auto;
}

.post__image {
	height: clamp(240px, calc(240px + 320 * (100vw - 390px) / 1050), 560px);
	border-radius: var(--rbnl-radius-section);
}

.post__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post__caption {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding-inline: var(--rbnl-gutter);
	color: var(--rbnl-mute);
	font-size: 14px;
	box-sizing: border-box;
}

.post__foot-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.post__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.post__row-label {
	margin: 0;
	color: var(--rbnl-ink);
	font-size: 15px;
	font-weight: 600;
}

.post__row .tags,
.post__row .chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post__row .tag {
	min-height: 28px;
	padding: 0 12px;
	background: var(--rbnl-sand);
	color: var(--rbnl-orange-dark);
	font-size: 13px;
	font-weight: 600;
}

.post-nav__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

.post-nav__item {
	gap: 6px;
	padding: 22px;
	text-decoration: none;
}

.post-nav__item--next {
	align-items: flex-end;
	text-align: right;
}

.post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--rbnl-mute);
	font-size: 14px;
}

.post-nav__title {
	font-family: var(--rbnl-font-heading);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.2;
}

@media (min-width: 640px) {
	.post-nav__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.post-more {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.post-more__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

@media (min-width: 1024px) {
	.post__head {
		padding-top: 48px;
	}

	.post__figure-wrap {
		padding-inline: 16px;
	}

	.post-more__head {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}
