/**
 * Single blog post
 * Bright Horizons Psychiatry
 */

.bhp-post {
	position: relative;
}

.bhp-post-empty {
	padding-block: var(--bhp-section-y);
}

/* ——— Hero ——— */
.bhp-post__hero {
	position: relative;
	padding-top: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: clamp(2rem, 4vw, 3rem);
	background: transparent;
	overflow: hidden;
}

.bhp-post__hero-inner {
	position: relative;
	z-index: 1;
}

.bhp-post__hero-layout {
	display: grid;
	gap: var(--bhp-space-6);
	align-items: end;
}

@media (min-width: 992px) {
	.bhp-post__hero-layout {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		column-gap: 11rem;
		row-gap: var(--bhp-space-6);
		align-items: end;
	}
}

.bhp-post__hero-main {
	min-width: 0;
}

.bhp-post__hero-aside {
	min-width: 0;
}

.bhp-post__excerpt {
	margin: 0;
	font-size: var(--bhp-fs-base);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
}

.bhp-post__breadcrumb {
	margin-bottom: var(--bhp-space-6);
}

.bhp-post__back {
	display: inline-flex;
	align-items: center;
	gap: var(--bhp-space-2);
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
	text-decoration: none;
	transition: color var(--bhp-transition);
}

.bhp-post__back:hover,
.bhp-post__back:focus-visible {
	color: var(--bhp-primary);
	outline: none;
}

.bhp-post__back i {
	font-size: 0.75rem;
	transition: transform var(--bhp-transition);
}

.bhp-post__back:hover i,
.bhp-post__back:focus-visible i {
	transform: translateX(-3px);
}

.bhp-post__cats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bhp-space-2);
	margin: 0 0 var(--bhp-space-4);
	padding: 0;
	list-style: none;
}

.bhp-post__cat {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.75rem;
	font-size: var(--bhp-fs-xs);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--bhp-primary);
	background: rgba(1, 58, 101, 0.08);
	border-radius: var(--bhp-btn-radius);
	transition:
		background var(--bhp-transition),
		color var(--bhp-transition);
}

.bhp-post__cat:hover,
.bhp-post__cat:focus-visible {
	background: var(--bhp-primary);
	color: var(--bhp-white);
	outline: none;
}

.bhp-post__title {
	margin: 0 0 var(--bhp-space-5);
	font-size: clamp(1.85rem, 4.2vw, 2.85rem);
	font-weight: var(--bhp-fw-bold);
	line-height: var(--bhp-lh-tight);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink);
	text-wrap: balance;
}

.bhp-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--bhp-space-3) var(--bhp-space-4);
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-subtle);
}

.bhp-post__meta-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bhp-space-2);
}

.bhp-post__date,
.bhp-post__read {
	margin: 0;
}

.bhp-post__meta-sep {
	opacity: 0.6;
}

.bhp-post-share {
	display: flex;
	align-items: center;
	gap: var(--bhp-space-1);
	margin: 0;
	padding: 0;
	list-style: none;
	margin-left: auto;
}

.bhp-post-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--bhp-radius-full);
	color: var(--bhp-ink-muted);
	text-decoration: none;
	transition:
		background var(--bhp-transition),
		color var(--bhp-transition);
}

.bhp-post-share__link:hover,
.bhp-post-share__link:focus-visible {
	background: rgba(1, 58, 101, 0.08);
	color: var(--bhp-primary);
	outline: none;
}

.bhp-post-share__link i {
	font-size: 0.8125rem;
}

.bhp-post__media-wrap {
	position: relative;
	z-index: 1;
	margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.bhp-post__media {
	margin: 0;
	overflow: hidden;
	border-radius: var(--bhp-btn-radius);
	background: linear-gradient(160deg, #d5e3ee 0%, #b8cddc 100%);
}

.bhp-post__image,
.bhp-post__media img {
	width: 100%;
	height: auto;
	object-fit: unset;
}

@media (max-width: 767px) {
	.bhp-post__media {
		border-radius: var(--bhp-btn-radius);
	}
}

/* ——— Body / prose ——— */
.bhp-post__body {
	padding-top: clamp(2.25rem, 5vw, 3.5rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.bhp-post__body--toc {
	display: grid;
	gap: clamp(1.75rem, 3vw, 2.5rem);
	align-items: start;
}

@media (min-width: 1100px) {
	.bhp-post__body--toc {
		grid-template-columns: 20rem minmax(0, 42rem);
		justify-content: center;
		column-gap: clamp(2.5rem, 5vw, 4rem);
	}
}

.bhp-post__main {
	min-width: 0;
	max-width: 42rem;
	margin-inline: auto;
	width: 100%;
}

@media (min-width: 1100px) {
	.bhp-post__body--toc .bhp-post__main {
		margin-inline: 0;
	}
}

/* ——— Sticky TOC ——— */
.bhp-post-toc {
	position: relative;
	padding: var(--bhp-space-5);
	background: var(--bhp-surface-soft);
	border: 0;
	border-radius: var(--bhp-btn-radius);
}

@media (min-width: 1100px) {
	.bhp-post-toc {
		position: sticky;
		top: calc(5.75rem + 1rem);
		max-height: calc(100vh - 5.75rem - 2rem);
		overflow-y: auto;
		z-index: 1;
	}

	.admin-bar .bhp-post-toc {
		top: calc(5.75rem + 32px + 1rem);
		max-height: calc(100vh - 5.75rem - 32px - 2rem);
	}
}

.bhp-post-toc__title {
	margin: 0 0 var(--bhp-space-3);
	font-size: var(--bhp-fs-xs);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bhp-ink-subtle);
}

.bhp-post-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	counter-reset: none;
}

.bhp-post-toc__item {
	margin: 0;
}

.bhp-post-toc__link {
	display: block;
	padding: 0.2rem 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-snug);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
	text-decoration: none;
	transition: color var(--bhp-transition);
}

.bhp-post-toc__link:hover,
.bhp-post-toc__link:focus-visible {
	color: var(--bhp-primary);
	outline: none;
}

.bhp-post-toc__link.is-active {
	color: var(--bhp-primary);
	font-weight: var(--bhp-fw-semibold);
}

.bhp-post__content {
	font-size: var(--bhp-fs-base);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
}

.bhp-post__content > *:first-child {
	margin-top: 0;
}

.bhp-post__content > *:last-child {
	margin-bottom: 0;
}

.bhp-post__content h2,
.bhp-post__content h3,
.bhp-post__content h4,
.bhp-post__content h5,
.bhp-post__content h6 {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
	margin-bottom: var(--bhp-space-4);
	color: var(--bhp-ink);
	letter-spacing: var(--bhp-ls-tight);
	scroll-margin-top: calc(5.75rem + 1rem);
}

@media (min-width: 992px) {
	.admin-bar .bhp-post__content h2,
	.admin-bar .bhp-post__content h3,
	.admin-bar .bhp-post__content h4,
	.admin-bar .bhp-post__content h5,
	.admin-bar .bhp-post__content h6 {
		scroll-margin-top: calc(5.75rem + 32px + 1rem);
	}
}

.bhp-post__content h2 {
	font-size: clamp(1.4rem, 2.5vw, 1.75rem);
	line-height: var(--bhp-lh-snug);
}

.bhp-post__content h3 {
	font-size: clamp(1.2rem, 2vw, 1.4rem);
	line-height: var(--bhp-lh-snug);
}

.bhp-post__content h4 {
	font-size: var(--bhp-fs-xl);
}

.bhp-post__content p {
	margin: 0 0 var(--bhp-space-5);
}

.bhp-post__content a {
	color: var(--bhp-primary);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--bhp-transition);
}

.bhp-post__content a:hover,
.bhp-post__content a:focus-visible {
	color: var(--bhp-primary-dark);
}

.bhp-post__content ul,
.bhp-post__content ol {
	margin: 0 0 var(--bhp-space-5);
	padding-left: 1.35rem;
	list-style: revert;
}

.bhp-post__content li {
	margin-bottom: var(--bhp-space-2);
}

.bhp-post__content li::marker {
	color: var(--bhp-primary);
}

.bhp-post__content blockquote {
	margin: var(--bhp-space-8) 0;
	padding: var(--bhp-space-5) var(--bhp-space-6);
	border-left: 3px solid var(--bhp-sky);
	background: var(--bhp-surface-soft);
	border-radius: 0 var(--bhp-btn-radius) var(--bhp-btn-radius) 0;
	font-size: var(--bhp-fs-xl);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	color: var(--bhp-ink);
}

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

.bhp-post__content img,
.bhp-post__content figure {
	margin: var(--bhp-space-8) 0;
	border-radius: var(--bhp-btn-radius);
	max-width: 100%;
	height: auto;
}

.bhp-post__content figure img {
	margin: 0;
}

.bhp-post__content figcaption {
	margin-top: var(--bhp-space-3);
	font-size: var(--bhp-fs-sm);
	color: var(--bhp-ink-subtle);
	text-align: center;
}

.bhp-post__content pre,
.bhp-post__content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
}

.bhp-post__content code {
	padding: 0.15em 0.4em;
	background: var(--bhp-surface-soft);
	border-radius: var(--bhp-btn-radius);
	color: var(--bhp-ink);
}

.bhp-post__content pre {
	margin: var(--bhp-space-6) 0;
	padding: var(--bhp-space-5);
	overflow-x: auto;
	background: var(--bhp-surface-soft);
	border-radius: var(--bhp-btn-radius);
}

.bhp-post__content pre code {
	padding: 0;
	background: transparent;
}

.bhp-post__content hr {
	margin: var(--bhp-space-10) 0;
	border: 0;
	border-top: 1px solid var(--bhp-border);
}

.bhp-post__content table {
	width: 100%;
	margin: var(--bhp-space-6) 0;
	border-collapse: collapse;
	font-size: var(--bhp-fs-base);
}

.bhp-post__content th,
.bhp-post__content td {
	padding: var(--bhp-space-3) var(--bhp-space-4);
	border: 1px solid var(--bhp-border);
	text-align: left;
}

.bhp-post__content th {
	background: var(--bhp-surface-soft);
	color: var(--bhp-ink);
	font-weight: var(--bhp-fw-semibold);
}

.bhp-post__content .wp-block-embed,
.bhp-post__content iframe {
	margin: var(--bhp-space-8) 0;
	max-width: 100%;
}

.bhp-post__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bhp-space-3);
	margin-top: var(--bhp-space-8);
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-semibold);
}

.bhp-post__pages-label {
	color: var(--bhp-ink-subtle);
}

/* ——— Tags ——— */
.bhp-post__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bhp-space-3) var(--bhp-space-4);
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: var(--bhp-space-8);
	border-top: 1px solid var(--bhp-border);
}

.bhp-post__tags-label {
	font-size: var(--bhp-fs-xs);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bhp-ink-subtle);
}

.bhp-post__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bhp-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bhp-post__tag {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.85rem;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	letter-spacing: var(--bhp-ls-tight);
	text-decoration: none;
	color: var(--bhp-ink-muted);
	background: var(--bhp-surface-soft);
	border: 1px solid var(--bhp-border);
	border-radius: var(--bhp-btn-radius);
	transition:
		background var(--bhp-transition),
		border-color var(--bhp-transition),
		color var(--bhp-transition);
}

.bhp-post__tag:hover,
.bhp-post__tag:focus-visible {
	background: var(--bhp-primary);
	border-color: var(--bhp-primary);
	color: var(--bhp-white);
	outline: none;
}

/* ——— Author ——— */
.bhp-post-author {
	display: flex;
	flex-direction: column;
	gap: var(--bhp-space-5);
	margin-top: clamp(2rem, 4vw, 3rem);
	padding: clamp(1.5rem, 3vw, 2rem);
	background: var(--bhp-surface-soft);
	border: 1px solid var(--bhp-border);
	border-radius: var(--bhp-btn-radius);
}

@media (min-width: 576px) {
	.bhp-post-author {
		flex-direction: row;
		align-items: flex-start;
		gap: var(--bhp-space-6);
	}
}

.bhp-post-author__avatar {
	flex-shrink: 0;
}

.bhp-post-author__img {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: var(--bhp-radius-full);
	object-fit: cover;
	background: linear-gradient(160deg, #d5e3ee 0%, #b8cddc 100%);
}

.bhp-post-author__body {
	display: flex;
	flex-direction: column;
	gap: var(--bhp-space-2);
	min-width: 0;
}

.bhp-post-author__name {
	margin: 0;
	font-size: var(--bhp-fs-xl);
	font-weight: var(--bhp-fw-semibold);
	line-height: var(--bhp-lh-snug);
	letter-spacing: var(--bhp-ls-tight);
}

.bhp-post-author__name a {
	color: var(--bhp-ink);
	text-decoration: none;
	transition: color var(--bhp-transition);
}

.bhp-post-author__name a:hover,
.bhp-post-author__name a:focus-visible {
	color: var(--bhp-primary);
	outline: none;
}

.bhp-post-author__review {
	margin: var(--bhp-space-1) 0 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-subtle);
}

.bhp-post-author__bio {
	margin: var(--bhp-space-2) 0 0;
	font-size: var(--bhp-fs-base);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
}

/* ——— Related ——— */
.bhp-post-related {
	position: relative;
	padding-top: var(--bhp-section-y);
	padding-bottom: var(--bhp-section-y);
	background: var(--bhp-surface-soft);
	overflow: hidden;
}

.bhp-post-related::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 50% 45% at 100% 0%, rgba(75, 190, 221, 0.07), transparent 55%),
		radial-gradient(ellipse 40% 40% at 0% 100%, rgba(1, 58, 101, 0.05), transparent 55%);
}

.bhp-post-related__header {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--bhp-space-4);
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.bhp-post-related__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: var(--bhp-fw-bold);
	line-height: var(--bhp-lh-tight);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink);
}

.bhp-post-related__all {
	display: inline-flex;
	align-items: center;
	gap: var(--bhp-space-2);
	flex-shrink: 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-primary);
	text-decoration: none;
	transition: color var(--bhp-transition);
}

.bhp-post-related__all:hover,
.bhp-post-related__all:focus-visible {
	color: var(--bhp-primary-dark);
	outline: none;
}

.bhp-post-related__all i {
	font-size: 0.75rem;
	transition: transform var(--bhp-transition);
}

.bhp-post-related__all:hover i,
.bhp-post-related__all:focus-visible i {
	transform: translateX(3px);
}

.bhp-post-related__grid {
	position: relative;
	z-index: 1;
	display: grid;
	gap: clamp(1.5rem, 3vw, 2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.bhp-post-related__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.bhp-post-related__card {
	display: flex;
	flex-direction: column;
	gap: var(--bhp-space-4);
	height: 100%;
	color: inherit;
	text-decoration: none;
	transition: color var(--bhp-transition);
}

.bhp-post-related__card:hover,
.bhp-post-related__card:focus-visible {
	color: inherit;
	outline: none;
}

.bhp-post-related__card:focus-visible {
	box-shadow: 0 0 0 3px rgba(75, 190, 221, 0.45);
	border-radius: var(--bhp-btn-radius);
}

.bhp-post-related__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--bhp-btn-radius);
	background: linear-gradient(160deg, #d5e3ee 0%, #b8cddc 100%);
}

.bhp-post-related__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--bhp-transition-slow);
}

.bhp-post-related__card:hover .bhp-post-related__media img,
.bhp-post-related__card:focus-visible .bhp-post-related__media img {
	transform: scale(1.04);
}

.bhp-post-related__body {
	display: flex;
	flex-direction: column;
	gap: var(--bhp-space-3);
	flex: 1;
}

.bhp-post-related__meta {
	margin: 0;
	font-size: var(--bhp-fs-xs);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bhp-ink-subtle);
}

.bhp-post-related__card-title {
	margin: 0;
	font-size: var(--bhp-fs-lg);
	font-weight: var(--bhp-fw-semibold);
	line-height: var(--bhp-lh-snug);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink);
	text-wrap: balance;
	transition: color var(--bhp-transition);
}

.bhp-post-related__card:hover .bhp-post-related__card-title,
.bhp-post-related__card:focus-visible .bhp-post-related__card-title {
	color: var(--bhp-primary);
}

.bhp-post-related__excerpt {
	margin: 0;
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-medium);
	line-height: var(--bhp-lh-relaxed);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-ink-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bhp-post-related__more {
	display: inline-flex;
	align-items: center;
	gap: var(--bhp-space-2);
	margin-top: auto;
	padding-top: var(--bhp-space-2);
	font-size: var(--bhp-fs-sm);
	font-weight: var(--bhp-fw-semibold);
	letter-spacing: var(--bhp-ls-tight);
	color: var(--bhp-primary);
}

.bhp-post-related__more i {
	font-size: 0.75rem;
	transition: transform var(--bhp-transition);
}

.bhp-post-related__card:hover .bhp-post-related__more i,
.bhp-post-related__card:focus-visible .bhp-post-related__more i {
	transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
	.bhp-post__back i,
	.bhp-post-related__all i,
	.bhp-post-related__more i,
	.bhp-post-related__media img {
		transition: none;
	}

	.bhp-post__back:hover i,
	.bhp-post__back:focus-visible i,
	.bhp-post-related__all:hover i,
	.bhp-post-related__all:focus-visible i,
	.bhp-post-related__card:hover .bhp-post-related__more i,
	.bhp-post-related__card:focus-visible .bhp-post-related__more i {
		transform: none;
	}

	.bhp-post-related__card:hover .bhp-post-related__media img,
	.bhp-post-related__card:focus-visible .bhp-post-related__media img {
		transform: none;
	}
}
