/* ── Post Hero ───────────────────────────────────────────── */
.post-hero {
	padding-block: 80px;
}

.post-hero__card {
	background: var(--color-beige);
	border-radius: var(--radius-card);
	padding: 48px 52px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.post-hero__meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.post-hero__category {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
	background: var(--color-beige-dark);
	font-size: var(--text-xs);
	font-weight: 500;
	line-height: 1.6;
	color: var(--color-dark-brown);
	transition: background-color 0.2s ease;
}

.post-hero__category:hover {
	background-color: var(--color-beige-warm);
}

.post-hero__date {
	font-size: var(--text-xs);
	font-weight: 400;
	line-height: 1.6;
	color: var(--color-gray);
}

.post-hero__title {
	font-size: 42px;
	font-weight: 600;
	line-height: var(--lh-h1);
	letter-spacing: -0.84px;
	color: var(--color-dark-brown);
	max-width: 860px;
}

/* ── Post Thumbnail ──────────────────────────────────────── */
.post-thumb {
	margin-bottom: 60px;
}

.post-thumb__img {
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--radius-card);
	display: block;
}

/* ── Post Content ────────────────────────────────────────── */
.post-content {
	padding-bottom: 80px;
}

.post-content__inner {
	max-width: 760px;
	margin: 0 auto;
}

/* Typography inside post content */
.post-content__inner h2 {
	font-size: var(--text-h2);
	font-weight: 600;
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-h2);
	color: var(--color-dark-brown);
	margin: 48px 0 20px;
}

.post-content__inner h3 {
	font-size: var(--text-h3);
	font-weight: 600;
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-h3);
	color: var(--color-dark-brown);
	margin: 36px 0 16px;
}

.post-content__inner h4 {
	font-size: var(--text-h4);
	font-weight: 600;
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-h4);
	color: var(--color-dark-brown);
	margin: 28px 0 12px;
}

.post-content__inner p {
	font-size: 16px;
	font-weight: 400;
	line-height: var(--lh-body);
	color: rgba(24, 31, 31, 0.85);
	margin: 0 0 20px;
}

.post-content__inner p:last-child {
	margin-bottom: 0;
}

.post-content__inner a {
	color: var(--color-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 0.2s ease;
}

.post-content__inner a:hover {
	opacity: 0.75;
}

/* Lists */
.post-content__inner ul,
.post-content__inner ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.post-content__inner ul {
	list-style: none;
	padding-left: 0;
}

.post-content__inner ul li {
	position: relative;
	padding-left: 20px;
	font-size: 16px;
	font-weight: 400;
	line-height: var(--lh-body);
	color: rgba(24, 31, 31, 0.85);
	margin-bottom: 8px;
}

.post-content__inner ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 10px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--color-beige-warm);
}

.post-content__inner ol li {
	font-size: 16px;
	font-weight: 400;
	line-height: var(--lh-body);
	color: rgba(24, 31, 31, 0.85);
	margin-bottom: 8px;
}

/* Blockquote */
.post-content__inner blockquote {
	border-left: 3px solid var(--color-beige-warm);
	margin: 32px 0;
	padding: 20px 28px;
	background: var(--color-beige);
	border-radius: 0 var(--radius-card-sm) var(--radius-card-sm) 0;
}

.post-content__inner blockquote p {
	font-size: var(--text-quote);
	font-weight: 500;
	line-height: var(--lh-quote);
	color: var(--color-dark-brown);
	font-style: italic;
	margin: 0;
}

/* Images */
.post-content__inner img {
	width: 100%;
	height: auto;
	border-radius: var(--radius-card-sm);
	margin: 8px 0;
}

/* Tables */
.post-content__inner table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: var(--text-body-s);
}

.post-content__inner table thead th {
	padding: 10px 14px;
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	line-height: 1.35;
	color: var(--color-gray-light);
	border-bottom: 1px solid var(--color-stroke);
}

.post-content__inner table tbody td {
	padding: 12px 14px;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(24, 31, 31, 0.85);
	border-bottom: 1px solid var(--color-stroke);
}

.post-content__inner table tbody tr:nth-child(even) td {
	background: var(--color-beige);
}

/* Horizontal rule */
.post-content__inner hr {
	border: none;
	border-top: 1px solid var(--color-stroke);
	margin: 40px 0;
}

/* First heading — no extra top gap */
.post-content__inner > h2:first-child,
.post-content__inner > h3:first-child,
.post-content__inner > h4:first-child {
	margin-top: 0;
}

/* Tables — allow horizontal scroll on small screens */
.post-content__inner .table-wrap {
	overflow-x: auto;
	margin: 24px 0;
}

/* ── Post Navigation ─────────────────────────────────────── */
.post-nav {
	padding-bottom: 100px;
	border-top: 1px solid var(--color-stroke);
}

.post-nav .container {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 40px;
}

/* Back to all posts */
.post-nav__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--text-body-s);
	font-weight: 500;
	line-height: 1.2;
	color: var(--color-dark-brown);
	transition: color 0.2s ease;
}

.post-nav__back:hover {
	color: var(--color-black);
}

.post-nav__back svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.post-nav__back:hover svg {
	transform: translateX(-3px);
}

/* Prev / Next cards */
.post-nav__posts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.post-nav__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
	background: var(--color-white);
	border: 1px solid rgba(24, 31, 31, 0.08);
	border-radius: var(--radius-card);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-nav__item:hover {
	box-shadow: 0 4px 20px rgba(24, 31, 31, 0.07);
	border-color: rgba(24, 31, 31, 0.14);
}

.post-nav__item--next {
	justify-content: space-between;
}

.post-nav__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-beige);
	color: var(--color-dark-brown);
	flex-shrink: 0;
	transition: background-color 0.2s ease;
}

.post-nav__item:hover .post-nav__arrow {
	background: var(--color-beige-dark);
}

.post-nav__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.post-nav__dir {
	font-size: var(--text-xs);
	font-weight: 400;
	line-height: 1.6;
	color: var(--color-gray);
}

.post-nav__title {
	font-size: var(--text-body-s);
	font-weight: 600;
	line-height: 1.35;
	color: var(--color-dark-brown);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* If only one nav item — span full width */
.post-nav__posts:has(.post-nav__item:only-child) .post-nav__item {
	grid-column: 1 / -1;
}

/* ── Tablet: ≤ 1023px ──────────────────────────────────── */
@media (max-width: 1023px) {
	.post-hero {
		padding-block: 60px;
	}

	.post-hero__card {
		padding: 36px 32px;
	}

	.post-hero__title {
		font-size: 34px;
		letter-spacing: -0.68px;
	}

	.post-thumb {
		margin-bottom: 48px;
	}

	.post-content__inner h2 {
		font-size: 30px;
		margin: 40px 0 18px;
	}

	.post-content__inner h3 {
		font-size: 22px;
		margin: 32px 0 14px;
	}

	.post-nav__item {
		padding: 20px;
	}
}

/* ── Mobile: ≤ 767px ───────────────────────────────────── */
@media (max-width: 767px) {
	.post-hero {
		padding-block: 40px;
	}

	.post-hero__card {
		padding: 24px 20px;
		border-radius: 16px;
		gap: 12px;
	}

	.post-hero__title {
		font-size: 22px;
		letter-spacing: -0.44px;
	}

	.post-thumb {
		margin-bottom: 32px;
	}

	.post-thumb__img {
		border-radius: 16px;
		max-height: 260px;
	}

	.post-content {
		padding-bottom: 60px;
	}

	.post-content__inner h2 {
		font-size: 22px;
		letter-spacing: -0.44px;
		margin: 32px 0 14px;
	}

	.post-content__inner h3 {
		font-size: 18px;
		letter-spacing: -0.18px;
		margin: 24px 0 10px;
	}

	.post-content__inner h4 {
		font-size: 16px;
		margin: 20px 0 8px;
	}

	.post-content__inner p,
	.post-content__inner ul li,
	.post-content__inner ol li {
		font-size: 15px;
	}

	.post-content__inner blockquote {
		padding: 16px 20px;
		margin: 24px 0;
	}

	.post-content__inner blockquote p {
		font-size: 17px;
	}

	.post-content__inner table {
		display: block;
		overflow-x: auto;
	}

	.post-content__inner hr {
		margin: 28px 0;
	}

	.post-nav {
		padding-bottom: 60px;
	}

	.post-nav .container {
		gap: 24px;
		padding-top: 32px;
	}

	.post-nav__posts {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.post-nav__item {
		padding: 18px;
		border-radius: 16px;
	}

	.post-nav__arrow {
		width: 36px;
		height: 36px;
	}

	.post-nav__title {
		white-space: normal;
	}
}
