/*******************************************************
 * Category archive (Sonder Reads–style)
 * Loaded only on is_category().
 *******************************************************/

body.category,
body.tag,
body.blog,
body.search {
	--fg: #14213d;
	--fg-muted: #5a6376;
	--accent: #b07a4c;
	--accent-fg: #f4efe6;
	--line: rgba(20, 33, 61, 0.14);
	--line-soft: rgba(20, 33, 61, 0.08);
	--bg: #f4efe6;
	--bg-card: #fbf8f2;
	--bg-inset: #ece5d7;
	--font-display: "Prata", "Playfair Display", "Times New Roman", serif;
	--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;
	--display-weight: 400;
	--section-y: clamp(48px, 7vw, 96px);
	--page-x: clamp(20px, 4vw, 56px);
	--t-h-eyebrow: 12px;
	--t-h-section: clamp(24px, 3vw, 36px);
	--r-2: 8px;
	--r-pill: 999px;
	--shadow-md: 0 4px 14px rgba(20, 16, 10, 0.06), 0 2px 4px rgba(20, 16, 10, 0.04);
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	background: var(--bg);
}

body.category .main-wrapper,
body.category .loader-wrapper,
body.tag .main-wrapper,
body.tag .loader-wrapper,
body.blog .main-wrapper,
body.blog .loader-wrapper,
body.search .main-wrapper,
body.search .loader-wrapper {
	background: transparent;
}

.blog .j-journal .section,
.search.search-results .j-journal .section {
    padding-bottom: 4px;
}
.blog .j-journal .blog-pagination,
.search.search-results .j-journal .blog-pagination {
    margin-top: 74px;
}

.j-journal {
	width: 100%;
	max-width: 1688px;
	margin: 0 auto;
	padding: 0 var(--page-x) var(--section-y);
	background: transparent;
	color: var(--fg);
	font-family: var(--font-sans);
}

/************************** Page head ******************/

.j-journal .page-head {
	padding-top: 28px;
	padding-bottom: 30px;
}

/* Default journal eyebrows (Explore more, Browse more, etc.) */
.j-journal .sd-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #5a6376;
}

/* CATEGORY / TAG / BLOG / SEARCH page-head label */
body.category .j-journal .page-head > .sd-eyebrow,
body.tag .j-journal .page-head > .sd-eyebrow,
body.blog .j-journal .page-head > .sd-eyebrow,
body.search .j-journal .page-head > .sd-eyebrow,
.j-journal .page-head > .sd-eyebrow {
	display: block;
	margin: 4px 0 0;
	color: #b07a4c !important;
}

.j-journal .page-head h1 {
	margin: 12px 0 0;
	/* max-width: 18ch; */
	font-family: var(--font-display);
	font-weight: var(--display-weight, 400);
	font-size: clamp(28px, 3.4vw, 47px);
	line-height: 1.11;
	letter-spacing: -0.022em;
	color: #14213d;
}

/************************** Breadcrumbs ****************/

.j-journal .refine-breadcrumb {
	position: relative;
	padding: 0;
	margin: 0 0 18px;
	font-size: 14px;
	font-weight: 400;
	line-height: normal;
	color: #030303;
}

.j-journal .refine-breadcrumb ol {
	display: inline-block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.j-journal .refine-breadcrumb ol li {
	position: relative;
	display: inline-block;
	padding-right: 13px;
	list-style: none;
}

.j-journal .refine-breadcrumb ol li a {
	color: #757575;
	text-decoration: none;
	transition: color 0.3s ease;
}

.j-journal .refine-breadcrumb ol li a:hover {
	color: #103076;
}

.j-journal .refine-breadcrumb ol li a span {
	position: relative;
	padding-right: 18px;
	color: inherit;
}

.j-journal .refine-breadcrumb ol li:not(:last-child) a span::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 3px;
	width: 8px;
	height: 8px;
	border: 1px solid;
	border-color: transparent transparent #757575 #757575;
	transform: rotate(-136deg);
}

.j-journal .refine-breadcrumb ol li:last-child .pt-breadcrumb-item {
	color: var(--fg);
}

/************************** Post grid ******************/

.j-journal .section {
	padding-top: 0;
	padding-bottom: var(--section-y);
}

.j-journal .jc-grid-section .cats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(16px, 1.6vw, 24px);
}

.j-journal .jc-grid-section .sonder-blog-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 360px;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--line-soft);
	border-radius: var(--r-2);
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.j-journal .jc-grid-section .sonder-blog-cat-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-3px);
}

.j-journal .jc-grid-section .sonder-blog-cat-card > a {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.j-journal .jc-grid-section .sonder-blog-cat-card > a > div {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 100%;
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-img-wrap {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-bottom: 1px solid var(--line-soft);
	background: var(--bg-inset);
}

.j-journal .jc-grid-section .sonder-blog-img-wrap img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 8px;
	padding: 22px 24px 24px;
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-label {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fg-muted);
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-body h3 {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	font-family: var(--font-display);
	font-weight: var(--display-weight, 400);
	font-size: 22px;
	line-height: calc(1.05em + 3px);
	letter-spacing: -0.012em;
	color: #000;
	text-overflow: ellipsis;
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding: 16px 24px;
	border-top: 1px solid var(--line-soft);
	font-size: 13px;
	color: var(--fg-muted);
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-foot strong {
	font-weight: 500;
	color: var(--fg);
}

.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-foot svg {
	display: block;
	flex: none;
}

.j-journal .jc-grid-section .sonder-blog-cat-card[hidden] {
	display: none !important;
}

/************************** Load more ******************/

.j-journal .jc-loadmore {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

/************************** Blog pagination ******************/

.j-journal .navigation.pagination,
.j-journal .blog-pagination {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 48px 0 0;
}

.j-journal .navigation.pagination .nav-links,
.j-journal .blog-pagination .nav-links {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.j-journal .blog-pagination ul.page-numbers {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.j-journal .blog-pagination ul.page-numbers > li {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	width: auto;
}

.j-journal .navigation.pagination .page-numbers,
.j-journal .blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 35px;
	min-width: 35px;
	height: 35px;
	padding: 0;
	border: 1px solid #14213d;
	border-radius: 50%;
	background: #fff;
	color: #14213d;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.j-journal .navigation.pagination .page-numbers.current,
.j-journal .blog-pagination .page-numbers.current {
	border-color: #14213d;
	background: #14213d;
	color: #fff;
}

.j-journal .navigation.pagination a.page-numbers:hover,
.j-journal .navigation.pagination a.page-numbers:focus-visible,
.j-journal .blog-pagination a.page-numbers:hover,
.j-journal .blog-pagination a.page-numbers:focus-visible {
	border-color: #14213d;
	background: #14213d;
	color: #fff;
}

.j-journal .navigation.pagination .page-numbers.dots,
.j-journal .blog-pagination .page-numbers.dots {
	width: auto;
	min-width: 20px;
	height: auto;
	border: 0;
	background: transparent;
	color: #5a6376;
	font-weight: 500;
	pointer-events: none;
}

.j-journal .navigation.pagination .prev .screen-reader-text,
.j-journal .navigation.pagination .next .screen-reader-text,
.j-journal .blog-pagination .prev .screen-reader-text,
.j-journal .blog-pagination .next .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.j-journal .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 52px;
	padding: 0 26px;
	border-radius: var(--r-2);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.005em;
	white-space: nowrap;
	cursor: pointer;
	transition:
		transform 0.18s var(--ease),
		background-color 0.25s var(--ease),
		color 0.25s var(--ease),
		border-color 0.25s var(--ease);
}

.j-journal .btn-ghost {
	background: transparent;
	color: #14213d;
	border: 1px solid #14213d;
	border-radius: var(--r-pill) !important;
}

.j-journal .btn-ghost:hover {
	background: #14213d;
	border-color: #14213d;
	color: #fff;
}

/************************** Other categories ***********/

.j-journal #jc-other-cats {
	padding-bottom: 100px;
}

.j-journal .jc-other-cats-band.coll-band {
	margin-bottom: clamp(24px, 3vw, 40px);
	padding: 66px;
	border-radius: var(--r-2) !important;
	background: var(--bg-inset) !important;
}

.j-journal .jc-other-cats-band .ds-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	margin-bottom: 30px;
}

.j-journal .jc-other-cats-band .ds-head h2 {
	max-width: 34ch;
	margin: 12px 0 0 !important;
	font-family: var(--font-display) !important;
	font-weight: var(--display-weight, 400) !important;
	font-size: clamp(24px, 3vw, 36px) !important;
	line-height: 1.06 !important;
	letter-spacing: -0.01em !important;
	color: var(--fg) !important;
	text-wrap: balance;
}

.j-journal .jc-other-cats-band.coll-band .coll-list {
	border-top: 1px solid var(--line-soft) !important;
}

.j-journal .jc-other-cats-band .coll-row {
	display: grid;
	grid-template-columns: minmax(170px, 0.7fr) minmax(220px, 1.5fr) 108px 48px;
	align-items: center;
	gap: 15px;
	padding: clamp(14px, 1.5vw, 20px) 6px;
	border-bottom: 1px solid var(--line-soft) !important;
	text-decoration: none;
	color: inherit;
	transition: padding-left .4s cubic-bezier(.2, .7, .2, 1), background .35s ease;
}

.j-journal .jc-other-cats-band .coll-row:last-child,
.j-journal .jc-other-cats-band .coll-row.is-last-visible {
	border-bottom: 0 !important;
}

.j-journal .jc-other-cats-band .coll-row[hidden] {
	display: none !important;
}

.j-journal .jc-other-cats-band .coll-row:hover {
	padding-left: 20px;
}

.j-journal .jc-other-cats-band .coll-title {
	margin: 0 !important;
	font-family: var(--font-display);
	font-weight: 500 !important;
	font-size: clamp(22px, 2.1vw, 30px) !important;
	line-height: 1.08;
	color: var(--fg) !important;
	transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.j-journal .jc-other-cats-band .coll-desc {
	margin: 0 !important;
	font-size: 14.5px !important;
	line-height: 1.5;
	color: var(--fg-muted) !important;
}

.j-journal .jc-other-cats-band .coll-thumb {
	width: 108px;
	height: 76px;
	justify-self: start;
	overflow: hidden;
	border-radius: var(--r-2);
	background: #e0d9c8;
}

.j-journal .jc-other-cats-band .coll-thumb .img-wrap {
	position: relative;
	isolation: isolate;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: var(--r-2);
	background: #e0d9c8;
}

.j-journal .jc-other-cats-band .coll-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.j-journal .jc-other-cats-band .coll-arrow {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	justify-self: end;
	border: 1px solid var(--line) !important;
	border-radius: 999px;
	color: var(--fg) !important;
	transition:
		background 0.32s ease,
		color 0.32s ease,
		border-color 0.32s ease,
		transform 0.32s ease;
}

.j-journal .jc-other-cats-band .coll-row:hover .coll-arrow {
	background: var(--accent) !important;
	color: var(--accent-fg) !important;
	border-color: var(--accent) !important;
	transform: translateX(4px);
}

.j-journal .jc-other-cats-band .jc-viewmore {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.j-journal .jc-other-cats-band .coll-more {
	padding: 0 0 2px;
	border: 0;
	border-bottom: 1px solid var(--accent);
	border-radius: 0;
	background: transparent;
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 500;
	color: var(--fg);
	cursor: pointer;
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.j-journal .jc-other-cats-band .coll-more:hover {
	color: var(--accent);
	border-color: var(--fg);
}

/************************** Responsive *****************/

@media (max-width: 1000px) {
	.j-journal .jc-grid-section .cats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 820px) {
	.j-journal .jc-other-cats-band .coll-row {
		grid-template-columns: 1fr 44px !important;
	}

	.j-journal .jc-other-cats-band .coll-desc,
	.j-journal .jc-other-cats-band .coll-thumb {
		display: none;
	}

	.sd-collections .coll-desc {
        grid-column: 1;
        grid-row: 2;
		display: block !important;
    }
	.j-journal .jc-other-cats-band .coll-arrow{
        grid-row: 1 / span 2;
        align-self: center;
    }
}

@media (max-width: 760px) {
	.j-journal .jc-other-cats-band.coll-band {
		padding: 26px !important;
	}

	.j-journal #jc-other-cats {
		padding-bottom: 64px;
	}
}

@media (max-width: 640px) {
	.j-journal .jc-grid-section .cats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px !important;
	}

	.j-journal .jc-other-cats-band .ds-head {
		gap: 16px !important;
	}

	.j-journal .jc-other-cats-band .coll-row {
		row-gap: 12px !important;
		padding-top: calc(clamp(14px, 1.5vw, 20px) + 6px);
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.j-journal .refine-breadcrumb ol {
		margin-bottom: 18px;
	}

	.j-journal .jc-grid-section .sonder-blog-cat-card {
		min-height: 0;
	}

	.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-body {
		padding: 16px 16px 18px;
	}

	.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-body h3 {
		font-size: 18px;
	}

	.j-journal .jc-grid-section .sonder-blog-cat-card .sonder-blog-cat-foot {
		padding: 12px 16px;
	}

}

@media (max-width: 575px) {
	.j-journal .jc-grid-section .cats-grid {
		grid-template-columns: 1fr;
		gap: 16px !important;
	}

	.j-journal {
		padding-inline: 16px;
	}
}
