/* ================================================================
   Heritage Mansion — Single Blog Post
================================================================ */

.single-post { padding-bottom: 80px; }

/* ── Post Header ───────────────────────────────────────────── */
.post-header {
	text-align: center;
	padding: 56px 24px 40px;
	border-bottom: 1px solid var(--light-gray);
}
.post-header-inner {
	max-width: 760px;
	margin: 0 auto;
}

.post-cat-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.2em;
	color: var(--mid-gray);
	text-transform: uppercase;
	margin-bottom: 18px;
	transition: color .2s;
}
.post-cat-tag:hover { color: var(--black); }

.post-title {
	font-family: var(--serif);
	font-size: clamp(28px, 4.5vw, 52px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin-bottom: 20px;
}

.post-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 12px;
	color: var(--mid-gray);
	letter-spacing: 0.06em;
}
.post-meta-sep { opacity: .4; }

/* ── Hero Image ────────────────────────────────────────────── */
.post-hero {
	width: 100%;
	max-height: 600px;
	/* overflow:hidden is removed — it clips Pinterest pin buttons from
	   the Easy Social Share Buttons plugin. The img uses object-fit
	   itself to crop, so the container overflow isn't needed.      */
	overflow: visible;
	margin-bottom: 0;
	position: relative; /* anchor for any plugin overlays */
}
.post-hero img {
	width: 100%;
	height: 600px;
	object-fit: cover;
	display: block;
	animation: postHeroIn .6s ease both;
}
@keyframes postHeroIn {
	from { opacity: 0; transform: scale(1.03); }
	to   { opacity: 1; transform: scale(1); }
}

/* ── Article Body ──────────────────────────────────────────── */
.post-body-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: 56px 24px 0;
}

.post-body {
	font-family: var(--sans);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.85;
	color: var(--dark-gray);
}

/* Typography inside post content */
.post-body h2 {
	font-family: var(--serif);
	font-size: clamp(20px, 2.5vw, 26px);
	font-weight: 400;
	color: var(--black);
	margin: 48px 0 16px;
	line-height: 1.3;
}
.post-body h3 {
	font-family: var(--serif);
	font-size: clamp(17px, 2vw, 20px);
	font-weight: 400;
	color: var(--black);
	margin: 36px 0 12px;
}
.post-body p { margin-bottom: 24px; }
.post-body p:last-child { margin-bottom: 0; }

.post-body a {
	color: var(--black);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity .2s;
}
.post-body a:hover { opacity: .6; }

.post-body ul,
.post-body ol {
	padding-left: 24px;
	margin-bottom: 24px;
}
.post-body li { margin-bottom: 8px; }

.post-body blockquote {
	border-left: 2px solid var(--black);
	margin: 36px 0;
	padding: 4px 0 4px 28px;
	font-family: var(--serif);
	font-style: italic;
	font-size: 19px;
	color: var(--dark-gray);
	line-height: 1.6;
}

.post-body img {
	width: 100%;
	height: auto;
	display: block;
	margin: 36px 0;
}

/* ── Third-party embed resets ──────────────────────────────── */
/* Getty Images, Instagram, Twitter etc. set their own dimensions —
   don't override them with our global img rules.               */
.post-body .gie-single,
.post-body .gie-slideshow,
.post-body [id*="gie-"],
.post-body .getty-embed,
.post-body .wp-block-embed,
.post-body .wp-block-embed__wrapper,
.post-body .wp-block-embed__wrapper iframe {
	width: 100% !important;
	max-width: 100% !important;
}

/* Images *inside* Getty / embed wrappers must not be forced to 100% width
   because the widget sets specific pixel dimensions via JS              */
.post-body .gie-single img,
.post-body .gie-slideshow img,
.post-body [id*="gie-"] img,
.post-body .getty-embed img,
.post-body .wp-block-embed img,
.post-body figure.wp-block-embed img {
	display: inline !important;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 !important;
}

/* The Getty anchor fallback link — keep it as a block-level wrapper */
a.gie-single {
	display: inline-block;
	margin: 32px 0;
}

.post-body figure { margin: 36px 0; }
.post-body figcaption {
	font-size: 12px;
	color: var(--mid-gray);
	text-align: center;
	margin-top: 8px;
	font-style: italic;
}

/* ── Tags ──────────────────────────────────────────────────── */
.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--light-gray);
}
.post-tag {
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--dark-gray);
	border: 1px solid var(--light-gray);
	padding: 5px 12px;
	transition: border-color .2s, color .2s;
}
.post-tag:hover {
	border-color: var(--black);
	color: var(--black);
}

/* ── Author Bio Box ────────────────────────────────────────── */
.post-author-bio {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: 32px 0;
	border-top: 1px solid var(--light-gray);
	border-bottom: 1px solid var(--light-gray);
	margin-top: 40px;
}

/* Avatar — WordPress wraps it in <a> sometimes */
.author-bio-avatar { flex-shrink: 0; }
.author-avatar-img,
.author-bio-avatar img {
	width: 72px !important;
	height: 72px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	display: block;
}

.author-bio-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.author-bio-label {
	font-family: var(--sans);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dark-gray);
}

.author-bio-name {
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 400;
	letter-spacing: 0.01em;
	color: var(--black);
}

.author-bio-desc {
	font-size: 14px;
	color: var(--dark-gray);
	line-height: 1.75;
	max-width: 560px;
}

.author-bio-link {
	font-family: var(--sans);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--black);
	text-decoration: none;
	margin-top: 4px;
	transition: opacity .2s;
	align-self: flex-start;
}
.author-bio-link:hover { opacity: .5; }

@media ( max-width: 600px ) {
	.post-author-bio { flex-direction: column; gap: 16px; }
	.author-bio-avatar img { width: 56px !important; height: 56px !important; }
}

/* ── Related Posts ─────────────────────────────────────────── */
.post-related {
	margin-top: 80px;
	padding-top: 56px;
	border-top: 1px solid var(--light-gray);
}
.post-related-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 40px;
}
.post-related-inner > .section-eyebrow { margin-bottom: 28px; }

.related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.related-card { display: block; }
.related-card-link { display: block; color: var(--black); }

.related-card-img-wrap {
	position: relative;
	overflow: hidden;
}
.related-card-img-wrap img {
	width: 100%;
	aspect-ratio: 4/5;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.related-card-link:hover .related-card-img-wrap img { transform: scale(1.04); }

.related-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background .25s ease;
	pointer-events: none;
}
.related-card-link:hover .related-card-overlay { background: rgba(0,0,0,.08); }

.related-img-placeholder {
	width: 100%;
	aspect-ratio: 4/5;
	background: var(--light-gray);
}

.related-card-body { padding: 14px 0 0; }

.related-title {
	font-family: var(--serif);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--black);
	margin-top: 6px;
	transition: opacity .2s;
}
.related-card-link:hover .related-title { opacity: .7; }

/* ── Content + Sidebar Layout ─────────────────────────────── */
.post-content-with-sidebar {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 60px;
	align-items: start;
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 40px;
}

/* Remove self-centering — the grid handles width */
.post-content-with-sidebar .post-body-wrap {
	max-width: none;
	margin: 0;
	padding-left: 0;
	padding-right: 0;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.post-sidebar {
	position: sticky;
	top: 100px;
	padding-top: 56px; /* aligns with article body start */
}

.sidebar-section-label {
	font-family: var(--sans);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mid-gray);
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--light-gray);
}

.sidebar-related-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.sidebar-card { display: block; }

.sidebar-card-link {
	display: flex;
	gap: 14px;
	color: var(--black);
	text-decoration: none;
	align-items: flex-start;
}

.sidebar-card-img-wrap {
	flex-shrink: 0;
	width: 90px;
	overflow: hidden;
}

/* Override the global .post-body img rule (margin / width) */
.sidebar-card-img-wrap img {
	width: 90px !important;
	height: 110px !important;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
	margin: 0 !important;
}

.sidebar-card-link:hover .sidebar-card-img-wrap img { transform: scale(1.04); }

.sidebar-img-placeholder {
	width: 90px;
	height: 110px;
	background: var(--light-gray);
}

.sidebar-card-body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding-top: 2px;
}

.sidebar-card-cat {
	font-family: var(--sans);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mid-gray);
}

.sidebar-card-title {
	font-family: var(--serif);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--black);
	transition: opacity .2s;
}

.sidebar-card-link:hover .sidebar-card-title { opacity: .65; }

/* ── Sidebar Ad Placeholder ──────────────────────────────── */
.sidebar-ad-placeholder {
	margin-top: 36px;
	width: 100%;
	min-height: 250px;
	background: var(--light-gray);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sidebar-ad-placeholder::after {
	content: 'Advertisement';
	font-family: var(--sans);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mid-gray);
}

/* ── Responsive ────────────────────────────────────────────── */
@media ( max-width: 900px ) {
	.post-content-with-sidebar {
		grid-template-columns: 1fr;
		gap: 0;
		padding: 0 24px;
	}
	.post-sidebar {
		position: static;
		padding-top: 40px;
		border-top: 1px solid var(--light-gray);
	}
	/* Show sidebar related posts as a 2-col row on tablet */
	.sidebar-related-list {
		display: grid;
		grid-template-columns: repeat( 2, 1fr );
		gap: 20px;
	}
	.sidebar-card-link { flex-direction: column; gap: 10px; }
	.sidebar-card-img-wrap { width: 100%; }
	.sidebar-card-img-wrap img {
		width: 100% !important;
		height: 160px !important;
	}
	.sidebar-img-placeholder {
		width: 100%;
		height: 160px;
	}
	.sidebar-ad-placeholder { display: none; }
}

@media ( max-width: 768px ) {
	.post-hero img { height: 360px; }
	.post-content-with-sidebar { padding: 0 20px; }
}

@media ( max-width: 480px ) {
	.sidebar-related-list { grid-template-columns: 1fr; }
}
