/*--------------------------------------------------------------
# Single Post — Magazine-style single post template
# Full-width hero: featured image + bottom gradient overlay
# Category badge | Title | Author avatar + name + date
# Centered readable body column (--content-width)
# Tags, post navigation, comments inherit theme tokens
--------------------------------------------------------------*/

/* ---- Hero ---- */

.single-post-hero {
	position: relative;
	min-height: 28rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background-color: var(--color-surface-dark);
	overflow: hidden;
}

/* Featured image — absolute fill */
.single-post-hero__bg {
	position: absolute;
	inset: 0;
}

.single-post-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Bottom-heavy gradient for text readability */
.single-post-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.92) 0%,
		rgba(0, 0, 0, 0.68) 35%,
		rgba(0, 0, 0, 0.25) 65%,
		transparent 100%
	);
}

/* Container sits at the bottom via parent flexbox */
.single-post-hero .site-container {
	position: relative;
	z-index: 1;
	width: 100%;
}

/* Content column — flush left, max readable width */
.single-post-hero__content {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding-block: var(--section-gap);
	max-width: var(--content-width);
}

/* Category badge — same pill as hero slider */
.single-post-hero__category {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background-color: var(--color-primary-dark);
	border-radius: var(--radius-sm);
	font-size: 0.75rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	letter-spacing: 0.075em;
	color: var(--color-text-white);
	line-height: 1.333;
	text-decoration: none;
	width: fit-content;
	transition: background-color 0.2s ease;
}

.single-post-hero__category:hover,
.single-post-hero__category:focus {
	background-color: #8B2F0F;
	color: var(--color-text-white);
}

/* Post title */
.single-post-hero__title {
	font-size: 3rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	line-height: 1.05;
	color: var(--color-text-white);
	margin: 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Author + date meta row */
.single-post-hero__meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* Circular author avatar */
.single-post-hero__avatar {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--radius-full);
	border: 2px solid var(--color-primary);
	object-fit: cover;
	flex-shrink: 0;
}

.single-post-hero__meta-info {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.single-post-hero__author {
	font-size: 0.875rem;
	font-weight: var(--font-weight-bold);
	color: var(--color-text-white);
	text-decoration: none;
	transition: color 0.2s ease;
}

.single-post-hero__author:hover {
	color: var(--color-primary);
}

.single-post-hero__date {
	font-size: 0.75rem;
	font-weight: var(--font-weight-regular);
	color: rgba(255, 255, 255, 0.65);
}

/* No-image variant — dark gradient background */
.single-post-hero--no-image {
	background: linear-gradient(
		135deg,
		var(--color-surface-dark) 0%,
		rgba(207, 84, 23, 0.08) 100%
	);
}

.single-post-hero--no-image .single-post-hero__overlay {
	display: none;
}

/* ---- Post body wrap ---- */

.single-post-wrap {
	padding-block: var(--section-gap);
	background-color: var(--color-primary-dark);
}

/* The inner container becomes a single readable light panel that
   holds article, post-navigation, and comments — consistent surface
   and no surprise dark/light transitions between sections. */
.single-post-wrap > .site-container {
	max-width: 52rem;
	background-color: var(--color-article-bg);
	color: var(--color-article-text);
	padding: clamp(1.5rem, 4vw, 3rem);
	border-radius: var(--radius-lg);
	box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}

/* ---- Article: centered readable column ---- */

.single-post {
	margin-inline: auto;
}

/* ---- Page title (used on static pages that don't render a hero) ---- */

.single-post__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	letter-spacing: -0.0375rem;
	color: var(--color-article-heading);
	margin: 0 0 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 3px solid var(--color-primary-dark);
}

/* ---- Entry Content — article body typography ---- */

.single-post__content {
	font-size: 1.125rem;
	font-weight: var(--font-weight-regular);
	line-height: 1.75;
	color: var(--color-article-text);
}

.single-post__content h2 {
	font-size: 1.75rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	margin-block: 2rem 0.75rem;
	color: var(--color-article-heading);
}

.single-post__content h3 {
	font-size: 1.375rem;
	font-weight: var(--font-weight-bold);
	margin-block: 1.75rem 0.5rem;
	color: var(--color-article-heading);
}

.single-post__content h4 {
	font-size: 1.125rem;
	font-weight: var(--font-weight-bold);
	margin-block: 1.5rem 0.375rem;
	color: var(--color-article-heading);
}

.single-post__content p {
	margin-block: 0 1.25rem;
}

.single-post__content ul,
.single-post__content ol {
	margin-block: 0 1.25rem;
	padding-left: 1.5rem;
	list-style: revert;
}

.single-post__content li + li {
	margin-top: 0.375rem;
}

.single-post__content a {
	color: var(--color-article-link);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.single-post__content a:hover,
.single-post__content a:focus {
	color: var(--color-article-link-hover);
}

.single-post__content blockquote {
	margin-inline: 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--color-primary);
	background-color: rgba(207, 84, 23, 0.08);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	font-style: italic;
	color: var(--color-article-heading);
}

.single-post__content blockquote p:last-child {
	margin-bottom: 0;
}

.single-post__content img {
	border-radius: var(--radius-md);
	margin-block: 1.5rem;
}

.single-post__content figure {
	margin: 1.5rem 0;
}

.single-post__content figcaption {
	font-size: 0.8125rem;
	color: var(--color-article-muted);
	text-align: center;
	margin-top: 0.5rem;
}

.single-post__content pre {
	background-color: var(--color-surface-dark);
	color: var(--color-text-light);
	border: 1px solid var(--color-border-accent);
	border-radius: var(--radius-md);
	padding: 1.25rem;
	overflow-x: auto;
	font-size: 0.875rem;
}

.single-post__content code {
	font-size: 0.875em;
	background-color: rgba(207, 84, 23, 0.12);
	color: var(--color-article-link-hover);
	border-radius: 0.1875rem;
	padding: 0.125em 0.375em;
}

.single-post__content pre code {
	background: none;
	color: inherit;
	padding: 0;
}

.single-post__content hr {
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	margin-block: 2rem;
}

/* ---- Post footer: tags + edit link ---- */

.single-post__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	padding-bottom: 0;
}

.single-post__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.single-post__tags-label {
	font-size: 0.75rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-article-muted);
}

.single-post__tag {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	background-color: #E2E8F0;
	border-radius: var(--radius-full);
	font-size: 0.75rem;
	font-weight: var(--font-weight-medium);
	color: var(--color-article-heading);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.single-post__tag:hover,
.single-post__tag:focus {
	background-color: var(--color-primary-dark);
	color: var(--color-text-white);
}

.single-post__edit a {
	font-size: 0.75rem;
	font-weight: var(--font-weight-medium);
	color: var(--color-article-muted);
	text-decoration: underline;
	transition: color 0.2s ease;
}

.single-post__edit a:hover,
.single-post__edit a:focus {
	color: var(--color-article-link-hover);
}

/* ---- Post Navigation (prev / next) ---- */

.post-navigation {
	margin-inline: auto;
	margin-top: var(--section-gap);
	padding-top: var(--section-gap);
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	display: flex;
}

.post-navigation .nav-next {
	justify-content: flex-end;
}

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1.25rem;
	background-color: #F1F5F9;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: var(--radius-lg);
	text-decoration: none;
	color: inherit;
	max-width: 18rem;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.post-navigation a:hover,
.post-navigation a:focus {
	border-color: var(--color-article-link);
	background-color: #E2E8F0;
}

.post-navigation .nav-label {
	font-size: 0.6875rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	letter-spacing: 0.075em;
	color: var(--color-article-link);
}

.post-navigation .nav-title {
	font-size: 0.875rem;
	font-weight: var(--font-weight-medium);
	color: var(--color-article-heading);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---- Comments ---- */

.comments-area {
	max-width: var(--content-width);
	margin-inline: auto;
	margin-top: var(--section-gap);
	padding-top: var(--section-gap);
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	color: var(--color-article-text);
}

.comments-title,
.comment-reply-title {
	font-size: 1.25rem;
	font-weight: var(--font-weight-black);
	text-transform: uppercase;
	letter-spacing: -0.0375rem;
	color: var(--color-article-heading);
	margin-bottom: 1.5rem;
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--section-gap);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.comment-body {
	padding: 1.25rem var(--inner-padding);
	background-color: #F8FAFC;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: var(--radius-lg);
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.comment-meta .avatar {
	border-radius: var(--radius-full);
	border: 2px solid rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
}

.comment-author .fn {
	font-size: 0.875rem;
	font-weight: var(--font-weight-bold);
	color: var(--color-article-heading);
}

.comment-author a {
	color: inherit;
	text-decoration: underline;
}

.comment-metadata {
	margin-top: 0.125rem;
}

.comment-metadata a {
	font-size: 0.75rem;
	color: var(--color-article-muted);
	text-decoration: none;
}

.comment-content p {
	font-size: 0.9375rem;
	color: var(--color-article-text);
	line-height: 1.625;
	margin-bottom: 0;
}

.reply a {
	font-size: 0.75rem;
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	color: var(--color-article-link);
	text-decoration: underline;
	margin-top: 0.625rem;
	display: inline-block;
	transition: color 0.2s ease;
}

.reply a:hover,
.reply a:focus {
	color: var(--color-article-link-hover);
}

/* Comment form */
.comment-form label {
	display: block;
	font-size: 0.8125rem;
	font-weight: var(--font-weight-medium);
	color: var(--color-article-heading);
	margin-bottom: 0.375rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	background-color: #FFFFFF;
	border: 1px solid #94A3B8;
	border-radius: var(--radius-md);
	color: var(--color-article-text);
	font-family: var(--font-family);
	font-size: 0.875rem;
	transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--color-article-link);
	box-shadow: 0 0 0 2px rgba(184, 72, 15, 0.25);
}

.comment-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.comment-form .form-submit {
	margin-top: 1rem;
}

.comment-form .submit {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 2rem;
	background-color: var(--color-primary-dark);
	border: none;
	border-radius: var(--radius-md);
	font-family: var(--font-family);
	font-size: 1rem;
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	color: var(--color-text-white);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.comment-form .submit:hover,
.comment-form .submit:focus {
	background-color: #8B2F0F;
}

/* ---- Responsive ---- */

@media screen and (max-width: 768px) {
	.single-post-hero {
		min-height: 20rem;
	}

	.single-post-hero__title {
		font-size: 1.75rem;
		line-height: 1.1;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		justify-content: flex-start;
	}
}
