/* ==========================================================================
   Long-form layout – single.php (articles) and templates/page-pathisi.php
   (condition / treatment pages): hero meta, featured image, content + sticky
   TOC / appointment aside, FAQ, author box. Loaded by inc/enqueue.php for the
   page keys in bethree_child_longform_keys().
   ========================================================================== */

/* Hero */
.be_article-hero .be_page-hero-text {
	max-width: 960px;
}

.be_article-title {
	font-size: calc(var(--be-h1-size) - 8px);
	line-height: 1.12;
}

.be_article-cat {
	align-self: flex-start;
	text-decoration: none;
}

.be_article-cat:hover {
	color: var(--be-olive);
}

.be_article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 24px;
	padding-top: 22px;
	border-top: 1px solid var(--be-line-2);
	font-size: 14px;
	line-height: 1.5;
	color: var(--be-muted);
}

.be_article-author {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--be-text);
	font-weight: 600;
	text-decoration: none;
	transition: color .25s;
}

.be_article-author:hover {
	color: var(--be-olive);
}

.be_article-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center 15%;
}

/* Body */
.be_article-figure {
	margin-bottom: 56px;
}

.be_article-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1600 / 760;
	object-fit: cover;
	border-radius: 24px;
}

.be_article-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
	gap: 64px;
	align-items: start;
}

.be_article-main {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 56px;
	min-width: 0;
}

.be_article-aside {
	grid-column: 2;
	grid-row: 1;
	position: sticky;
	top: calc(var(--be-header-h) + var(--wp-admin--admin-bar--height, 0px) + 16px);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Article text (normal WordPress editor output) */
.be_article-content {
	max-width: none; /* the text fills the main column (main.css caps .be_prose at 860px) */
}

.be_article-content h2 {
	margin-top: 20px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--be-text);
}

.be_article-content h3 {
	margin-top: 8px;
}

.be_article-content li + li {
	margin-top: 8px;
}

.be_article-content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

.be_article-content figure {
	margin: 8px 0;
}

.be_article-content figcaption {
	margin-top: 8px;
	font-size: 14px;
	color: var(--be-muted);
}

.be_article-content blockquote {
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--be-brown);
	font-size: 19px;
	color: var(--be-text);
}

.be_article-content table {
	width: 100%;
	font-size: 15px;
}

.be_article-content th,
.be_article-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--be-line);
	text-align: left;
}

/* Table of contents */
.be_toc {
	padding: 24px;
	border-radius: var(--be-radius);
	background: var(--be-cream);
}

.be_toc-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	list-style: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--be-brown);
}

.be_toc-title::-webkit-details-marker {
	display: none;
}

.be_toc[open] .be_chev {
	transform: rotate(180deg);
}

.be_toc-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 14px;
	padding: 0;
	list-style: none;
	counter-reset: toc;
}

.be_toc-list li {
	counter-increment: toc;
}

.be_toc-list a {
	display: flex;
	gap: 10px;
	padding: 8px 0;
	color: var(--be-text);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.45;
	font-weight: 500;
	transition: color .25s;
}

.be_toc-list a::before {
	content: counter(toc, decimal-leading-zero);
	flex-shrink: 0;
	font-weight: 700;
	color: var(--be-olive);
}

.be_toc-list a:hover {
	color: var(--be-brown);
}

/* Appointment card in the aside */
.be_aside-cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 28px 24px;
	border-radius: var(--be-radius);
	background: var(--be-olive);
	color: var(--be-cream-light);
}

.be_aside-cta-title {
	font-size: 22px;
	line-height: 1.25;
	font-weight: 600;
	color: var(--be-white);
}

.be_aside-cta-text {
	font-size: 15px;
	line-height: 1.55;
	color: var(--be-sage-light);
}

a.be_aside-cta-tel {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--be-white);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}

a.be_aside-cta-tel .be_icon {
	color: var(--be-sage);
}

a.be_aside-cta-tel:hover {
	color: var(--be-sand);
}

.be_aside-cta .be_btn {
	margin-top: 8px;
}

/* FAQ */
.be_article-faq {
	width: 100%;
}

.be_article-faq-title {
	margin-bottom: 8px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Author box */
.be_author {
	display: flex;
	gap: 24px;
	align-items: center;
	padding: 24px;
	border: 1px solid var(--be-line);
	border-radius: var(--be-radius);
	background: var(--be-cream);
	color: var(--be-text);
	text-decoration: none;
}

.be_author:hover {
	background: var(--be-sand);
	color: var(--be-text);
}

.be_author-img {
	flex-shrink: 0;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center 15%;
}

.be_author-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.be_author-name {
	font-size: 22px;
	line-height: 1.25;
	font-weight: 600;
}

.be_author-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--be-muted);
}

/* Responsive: TOC above the text, appointment card after it */
@media (max-width: 1024px) {
	.be_article-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.be_article-aside {
		display: contents;
	}

	.be_toc {
		grid-row: 1;
	}

	.be_article-main {
		grid-row: 2;
	}

	.be_aside-cta {
		grid-row: 3;
	}

	.be_toc:not([open]) .be_toc-list {
		display: none;
	}
}

@media (max-width: 700px) {
	.be_article-title {
		font-size: 32px;
	}

	.be_article-figure {
		margin-bottom: 40px;
	}

	.be_article-img {
		aspect-ratio: 4 / 3;
		border-radius: 18px;
	}

	.be_article-content h2,
	.be_article-faq-title {
		font-size: 24px;
	}

	.be_author {
		flex-direction: column;
		align-items: flex-start;
	}

	.be_author-img {
		width: 88px;
		height: 88px;
	}
}
