/**
 * Blog (Figma: Blog 2578:3515, Blog - single 2578:3668, Blog - Mobile
 * 2868:1259, Blog single - Mobile 2868:2323). Desktop from the 1640 frames.
 */

.blog-page,
.post-page {
	--section-space: 48px;
}

@media (min-width: 1024px) {
	.blog-page,
	.post-page {
		--section-space: 120px;
	}
}

/* ---- Breadcrumbs (both headers, white) ------------------------------------ */

.blog-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 24px;
	text-transform: uppercase;
}

.blog-breadcrumbs li + li::before {
	content: "/";
	margin-right: var(--space-2);
}

.blog-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.blog-breadcrumbs a:hover {
	color: inherit;
	text-decoration: underline;
}

@media (min-width: 1024px) {
	.blog-breadcrumbs ol {
		font-size: 16px;
	}
}

/* ---- Blog header: green, centred, the journal search, category tabs ------- */

.blog-hero {
	background: var(--color-announcement);
	color: var(--color-warm-off-white);
}

.blog-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-4);
	padding-top: 40px;
	padding-bottom: 32px;
	text-align: center;
}

.blog-hero .blog-breadcrumbs ol {
	justify-content: center;
}

.blog-hero__title {
	margin: 0;
	color: inherit;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h1);
	line-height: var(--leading-h1);
}

.blog-hero__intro {
	max-width: 504px;
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

/* White pill, the search icon as its button (Figma 442 × 58). */
.blog-search {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 442px;
	min-height: 52px;
	box-sizing: border-box;
	margin-top: var(--space-2);
	padding: 0 6px 0 20px;
	border-radius: var(--radius-pill);
	background: var(--color-warm-off-white);
	color: var(--color-deep-slate);
	transition: box-shadow 0.2s ease;
}

.blog-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-size: 16px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.blog-search input[type="search"]::placeholder {
	color: var(--color-deep-slate);
	opacity: 1;
}

.blog-search input[type="search"]::-webkit-search-cancel-button,
.blog-search input[type="search"]::-webkit-search-decoration {
	display: none;
	-webkit-appearance: none;
}

.blog-search button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--color-deep-slate);
	cursor: pointer;
}

.blog-search button:hover {
	background: var(--color-light-oat);
}

/* A light ring on the green: soft on hover, stronger while typing. */
.blog-search:hover {
	box-shadow: 0 0 0 4px rgba(254, 253, 253, 0.25);
}

.blog-search:focus-within {
	box-shadow: 0 0 0 4px rgba(254, 253, 253, 0.5);
}

/* Category tabs. Mobile: pill chips in one row that scrolls (Figma mobile).
   Desktop: text tabs on a line, the current one underlined (Figma). */
.blog-tabs {
	padding-bottom: 32px;
}

.blog-tabs__list {
	display: flex;
	gap: 8px;
	margin: 0 calc(-1 * var(--gutter));
	padding: 0 var(--gutter);
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}

.blog-tabs__list::-webkit-scrollbar {
	display: none;
}

.blog-tabs__list li {
	flex: none;
}

.blog-tabs__list a {
	display: block;
	padding: 10px 17px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: var(--radius-pill);
	color: var(--color-warm-off-white);
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
	white-space: nowrap;
}

.blog-tabs__list a:hover {
	border-color: var(--color-warm-off-white);
	color: var(--color-warm-off-white);
}

.blog-tabs__list a[aria-current] {
	border-color: var(--color-warm-off-white);
	background: var(--color-warm-off-white);
	color: var(--color-deep-slate);
}

@media (min-width: 1024px) {
	.blog-hero__inner {
		padding-top: 100px;
		padding-bottom: 66px;
	}

	.blog-search {
		min-height: 58px;
	}

	.blog-tabs {
		padding-bottom: 107px;
	}

	/* "All stories" plus the eight categories fit from about 1360px; narrower,
	   the row scrolls. */
	.blog-tabs__list {
		justify-content: space-between;
		gap: var(--space-3);
		margin: 0;
		padding: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.5);
	}

	.blog-tabs__list a {
		position: relative;
		padding: 0 0 9px;
		border: 0;
		border-radius: 0;
		font-size: 16px;
		line-height: 24px;
	}

	.blog-tabs__list a::after {
		content: "";
		position: absolute;
		right: 0;
		bottom: -2px;
		left: 0;
		height: 3px;
		background: transparent;
		transition: background-color 0.2s ease;
	}

	.blog-tabs__list a:hover::after {
		background: rgba(255, 255, 255, 0.5);
	}

	.blog-tabs__list a[aria-current] {
		background: none;
		color: var(--color-warm-off-white);
	}

	.blog-tabs__list a[aria-current]::after {
		background: var(--color-warm-off-white);
	}
}

/* ---- Post grid and cards -------------------------------------------------- */

.blog-page__body {
	padding-top: 40px;
	padding-bottom: var(--section-space);
}

.post-grid {
	display: grid;
	gap: 40px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-grid > li {
	display: flex;
	min-width: 0;
}

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

@media (min-width: 1024px) {
	.blog-page__body {
		padding-top: 148px;
	}

	.post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 50px;
	}
}

.post-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.post-card__media {
	position: relative;
	margin-bottom: var(--space-3);
}

.post-card__image {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--color-light-oat);
}

.post-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-card:hover .post-card__image img {
	transform: scale(1.03);
}

/* Category label on the photo, top left (Figma). */
.post-card__category {
	position: absolute;
	top: 0;
	left: 0;
	padding: 6px 21px 5px;
	background: var(--color-soft-ivory);
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 12px;
	line-height: 20px;
	text-decoration: none;
	text-transform: uppercase;
}

.post-card__category:hover {
	background: var(--color-pale-oat);
	color: var(--color-dark-sage);
}

.post-card__title {
	margin: 0 0 var(--space-3);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 20px;
	line-height: 28px;
}

.post-card__title a {
	color: var(--color-deep-slate);
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--color-dark-sage);
}

.post-card__excerpt {
	display: -webkit-box;
	margin: 0 0 var(--space-4);
	overflow: hidden;
	color: var(--color-body-gray);
	font-size: 16px;
	line-height: 24px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* Read more and reading time between two lines, at the card's foot. */
.post-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: 53px;
	margin-top: auto;
	border-top: 1px solid var(--color-pale-oat);
	border-bottom: 1px solid var(--color-pale-oat);
}

.post-card__more {
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
	text-decoration: none;
}

.post-card__more:hover {
	color: var(--color-deep-slate);
}

.post-card__time {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--color-body-gray);
	font-size: 14px;
	line-height: 24px;
	white-space: nowrap;
}

@media (min-width: 1024px) {
	.post-card__media {
		margin-bottom: 19px;
	}

	.post-card__title {
		margin-bottom: 14px;
		font-size: var(--text-h4);
		line-height: var(--leading-h4);
	}

	.post-card__category {
		font-size: 14px;
	}

	.post-card__time {
		font-size: 16px;
	}
}

/* Pagination: "1  2  3  …  Next", Mont Regular 18 (Figma). */
.blog-pagination {
	margin-top: 48px;
}

.blog-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.blog-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	box-sizing: border-box;
	padding: 0 var(--space-2);
	border-radius: var(--radius-pill);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 18px;
	line-height: 34px;
	text-decoration: none;
}

.blog-pagination a.page-numbers:hover {
	background: var(--color-light-oat);
	color: var(--color-deep-slate);
}

.blog-pagination .page-numbers.current {
	background: var(--color-dark-sage);
	color: var(--color-warm-off-white);
}

.blog-pagination .prev,
.blog-pagination .next {
	padding: 0 var(--space-4);
}

.blog-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-6);
	color: var(--color-body-gray);
	text-align: center;
}

.blog-empty p {
	margin: 0;
}

/* ---- Post header: the featured photo, text white -------------------------- */

.post-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 420px;
	overflow: hidden;
	isolation: isolate;
	background: var(--color-announcement);
	color: var(--color-warm-off-white);
}

.post-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(rgba(34, 51, 60, 0.2), rgba(34, 51, 60, 0.7));
}

.post-hero__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
	padding-top: 40px;
	padding-bottom: 32px;
}

.post-hero__title {
	max-width: 814px;
	margin: 0;
	color: inherit;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 32px;
	line-height: 40px;
}

.post-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

@media (min-width: 1024px) {
	.post-hero {
		align-items: center;
		min-height: 572px;
	}

	.post-hero::after {
		background: linear-gradient(90deg, rgba(34, 51, 60, 0.6), rgba(34, 51, 60, 0.15) 75%);
	}

	.post-hero__inner {
		padding-top: 60px;
		padding-bottom: 60px;
	}

	.post-hero__title {
		font-size: var(--text-h1);
		line-height: var(--leading-h1);
	}
}

/* ---- Post layout: In this article beside the text -------------------------- */

.post-layout {
	display: grid;
	gap: 32px;
	padding-top: 24px;
	padding-bottom: var(--section-space);
}

.post-content {
	min-width: 0;
}

/* Mobile: a collapsed accordion above the text (Figma mobile), stuck to the
   top while reading, naming the section being read. The card, the title and
   the links look like Delivery & Returns' "On this page" (client, 2026-11-19). */
.post-toc-wrap {
	position: sticky;
	top: var(--sticky-header);
	z-index: 50;
	/* The section's name never widens the column (the text would reflow). */
	min-width: 0;
}

.post-toc {
	border: 1px solid var(--color-pale-oat);
	border-radius: var(--radius-card);
	background: var(--color-soft-ivory);
	box-shadow: 0 6px 18px rgba(34, 51, 60, 0.08);
}

.post-toc__current {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-regular);
	font-size: 14px;
	text-overflow: ellipsis;
	text-transform: none;
	white-space: nowrap;
}

.post-toc {
	position: relative;
}

/* The open list drops over the text, so the page under it never moves. */
.post-toc[open] .post-toc__list {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	left: 0;
	max-height: 60vh;
	margin: 0;
	padding: 12px 16px 12px 15px;
	overflow-y: auto;
	border: 1px solid var(--color-pale-oat);
	border-radius: var(--radius-card);
	background: var(--color-soft-ivory);
	box-shadow: 0 12px 28px rgba(34, 51, 60, 0.14);
}

.post-toc__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: 14px 16px;
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 20px;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

.post-toc__title::-webkit-details-marker {
	display: none;
}

.post-toc__title .icon {
	flex: none;
	color: var(--color-dark-sage);
	transition: transform 0.2s ease;
}

.post-toc[open] .post-toc__title .icon {
	transform: rotate(180deg);
}

/* The links on a thin line; the section being read: Dark Sage, its part of
   the line darker. */
.post-toc__list {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0 16px 16px;
	padding: 0;
	border-left: 1px solid var(--color-pale-oat);
	list-style: none;
	font-size: 14px;
	line-height: 20px;
}

.post-toc__list a {
	display: block;
	margin-left: -1px;
	padding: 6px 10px 6px 14px;
	border-left: 2px solid transparent;
	border-radius: 0 6px 6px 0;
	color: var(--color-body-gray);
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.post-toc__list a:hover {
	color: var(--color-deep-slate);
	text-decoration: underline;
}

.post-toc__list a[aria-current] {
	border-left-color: var(--color-dark-sage);
	background: var(--color-pale-sage);
	color: var(--color-dark-sage);
	font-weight: var(--weight-gilroy-medium);
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.post-page) {
		scroll-behavior: smooth;
	}
}

.post-content h2[id] {
	/* Below the stuck "In this article" bar (phones). */
	scroll-margin-top: 80px;
}

/* Desktop (Figma): a Soft Ivory column at the left, sticky; the text 990 wide. */
@media (min-width: 1024px) {
	.post-layout {
		grid-template-columns: 250px minmax(0, 990px);
		justify-content: space-between;
		align-items: start;
		column-gap: 40px;
		padding-top: 41px;
	}

	.post-layout--no-toc {
		grid-template-columns: minmax(0, 990px);
		justify-content: end;
	}

	.post-toc-wrap {
		position: sticky;
		top: calc(var(--sticky-header) + 24px);
	}

	.post-toc {
		max-height: calc(100vh - var(--sticky-header) - 48px);
		margin-left: -28px;
		padding: 28px;
		overflow-y: auto;
		border: 0;
		box-shadow: none;
	}

	.post-content h2[id] {
		scroll-margin-top: 24px;
	}

	.post-toc__title {
		margin-bottom: var(--space-3);
		padding: 0;
		cursor: default;
	}

	.post-toc__title .icon,
	.post-toc__current {
		display: none;
	}

	.post-toc[open] .post-toc__list {
		position: static;
		max-height: none;
		margin: 0;
		padding: 0;
		overflow: visible;
		border: 0;
		border-left: 1px solid var(--color-pale-oat);
		border-radius: 0;
		box-shadow: none;
	}

	.post-toc__list {
		margin: 0;
	}

	/* The text starts level with "In this article". */
	.post-content {
		padding-top: 28px;
	}
}

/* ---- Post text (classic editor HTML) ---------------------------------------- */

.post-content {
	color: var(--color-body-gray);
	font-size: 16px;
	line-height: 24px;
	overflow-wrap: break-word;
}

.post-content > :first-child {
	margin-top: 0;
}

.post-content p {
	margin: 0 0 24px;
}

.post-content a {
	color: var(--color-dark-sage);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.post-content a:hover {
	color: var(--color-deep-slate);
}

.post-content strong,
.post-content b {
	color: var(--color-deep-slate);
	font-weight: var(--weight-gilroy-medium);
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
}

/* H2 Mont 30/44, H3 24/34, H4 18/34, H5 Mont Bold 16/24 (Figma). */
.post-content h2 {
	margin: 40px 0 24px;
	font-size: 24px;
	line-height: 34px;
}

.post-content h3 {
	margin: 32px 0 20px;
	font-size: 20px;
	line-height: 28px;
}

.post-content h4 {
	margin: 32px 0 20px;
	font-size: 18px;
	line-height: 28px;
}

.post-content h5,
.post-content h6 {
	margin: 24px 0 20px;
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
}

@media (min-width: 1024px) {
	.post-content h2 {
		font-size: var(--text-h3);
		line-height: var(--leading-h3);
	}

	.post-content h3 {
		font-size: 24px;
		line-height: 34px;
	}

	.post-content h4 {
		font-size: 18px;
		line-height: 34px;
	}
}

.post-content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.post-content p > img,
.post-content figure,
.post-content .wp-caption {
	margin: 40px 0;
}

.post-content figure img,
.post-content .wp-caption img {
	margin: 0;
}

.post-content img.size-large,
.post-content img.size-full,
.post-content figure img {
	width: 100%;
}

.post-content .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

.post-content figcaption,
.post-content .wp-caption-text {
	margin-top: var(--space-2);
	font-size: 14px;
	line-height: 20px;
}

/* Lists: Dark Sage dots and numbers (Figma). */
.post-content ul,
.post-content ol {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.post-content li {
	position: relative;
	padding-left: 22px;
}

.post-content ul > li::before {
	content: "";
	position: absolute;
	top: 9px;
	left: 0;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-dark-sage);
}

.post-content ol {
	counter-reset: post-ol;
}

.post-content ol > li {
	padding-left: 36px;
	counter-increment: post-ol;
}

.post-content ol > li::before {
	content: counter(post-ol) ".";
	position: absolute;
	top: -5px;
	left: 0;
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 18px;
	line-height: 34px;
}

.post-content li > ul,
.post-content li > ol {
	margin: 12px 0 0;
}

/* Tables (Figma "Table / standard"): Pale Oat head and borders; the first
   column Deep Slate 16, the others Body Gray 14. A wide table scrolls in its
   wrapper (inc/blog.php). */
.post-table {
	margin: 0 0 32px;
	overflow-x: auto;
	border: 1px solid var(--color-pale-oat);
}

.post-content table {
	width: 100%;
	min-width: 520px;
	margin: 0;
	border-collapse: collapse;
}

.post-content th,
.post-content td {
	padding: 8px 20px;
	border-bottom: 1px solid var(--color-pale-oat);
	color: var(--color-body-gray);
	font-size: 14px;
	line-height: 20px;
	text-align: left;
	vertical-align: top;
}

.post-content th,
.post-content thead td {
	background: var(--color-pale-oat);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 16px;
	line-height: 26px;
}

.post-content td:first-child {
	color: var(--color-deep-slate);
	font-size: 16px;
	line-height: 24px;
}

.post-content tr:last-child > td {
	border-bottom: 0;
}

.post-content td p:last-child,
.post-content th p:last-child {
	margin-bottom: 0;
}

/* Blockquote (Figma): Soft Ivory, a Dark Sage line, Mont 24/34; the cite small caps. */
.post-content blockquote {
	margin: 40px 0;
	padding: 24px 24px 24px 28px;
	border-left: 3px solid var(--color-dark-sage);
	background: var(--color-soft-ivory);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 20px;
	line-height: 30px;
}

.post-content blockquote p {
	margin: 0 0 16px;
}

.post-content blockquote > :last-child {
	margin-bottom: 0;
}

.post-content blockquote cite {
	display: block;
	color: var(--color-dark-sage);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-medium);
	font-size: 12px;
	font-style: normal;
	line-height: 24px;
	text-transform: uppercase;
}

@media (min-width: 1024px) {
	.post-content blockquote {
		padding: 32px 40px;
		font-size: 24px;
		line-height: 34px;
	}
}

.post-content iframe {
	max-width: 100%;
}

/* [products] in a post: WooCommerce's list, as a simple grid. */
.post-content ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: var(--space-6);
}

.post-content ul.products li.product {
	width: auto;
	margin: 0;
	padding: 0;
}

.post-content ul.products li.product::before {
	content: none;
}

/* Customer favourites after the post. */
.post-page .card-row--favourites {
	margin-top: 0;
}
