/**
 * Custom single-post Table of Contents (built by toc.js).
 * Collapsed = white icon box with heading count. Open = floating white panel.
 */

.bfe-toc {
	/* Pinned to the far right edge of the screen, follows scroll. */
	position: fixed;
	top: 120px;
	right: 24px;
	display: inline-block;
	z-index: 60;
	/* Hidden by default; shown only while reading the content (toc.js toggles
	   bfe-toc--inview). Stays visible when the panel is open. */
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.bfe-toc.bfe-toc--inview,
.bfe-toc.bfe-toc--open {
	opacity: 1;
	visibility: visible;
}

/* ---- Collapsed icon (white box: count + bars) ---- */
.bfe-toc__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #FFFFFF;
	border: 1px solid #ECECEF;
	border-radius: 12px;
	padding: 10px 14px;
	cursor: pointer;
	box-shadow: -2px 4px 52px rgba(0, 0, 0, 0.12);
	color: #1D1E20;
}
.bfe-toc__count {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	color: #1D1E20;
}
.bfe-toc__bars {
	display: inline-flex;
	color: #1D1E20;
}
.bfe-toc__bars svg { stroke: currentColor; }
/* Hover: blue box, white number + bars. */
.bfe-toc__toggle:hover { background: #5B4BFF !important; border-color: #5B4BFF !important; }
.bfe-toc__toggle:hover .bfe-toc__count,
.bfe-toc__toggle:hover .bfe-toc__bars { color: #FFFFFF !important; }
.bfe-toc__toggle:hover .bfe-toc__bars svg { stroke: #FFFFFF !important; }

/* ---- Open: floating white panel ---- */
.bfe-toc__panel {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	width: 360px;
	max-width: 84vw;
	/* Fit within the viewport from the icon's top position, scroll for long lists
	   so EVERY item is reachable. */
	max-height: calc(100vh - 150px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: -2px 4px 52px rgba(0, 0, 0, 0.12);
	padding: 24px 22px;
}
.bfe-toc--open .bfe-toc__panel {
	display: block;
}

.bfe-toc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.bfe-toc__title {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 700;
	font-size: 26px;
	line-height: 1.2;
	color: #1D1E20;
}
.bfe-toc__collapse {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #F3F3F5;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	color: #5B4BFF;
}
/* Collapse arrow = text glyph (theme-proof). Blue on the light box… */
.bfe-toc__chev { display: block; font-family: Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 700; line-height: 1; color: inherit; margin-top: -2px; }
/* …and white when the box is blue (hover). */
.bfe-toc__collapse:hover { background: #5B4BFF !important; color: #FFFFFF !important; }

/* ---- List ---- */
.bfe-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.bfe-toc__item {
	border-left: 2px solid #E7E7EA; /* continuous left rail */
	padding: 8px 0 8px 16px;
}
.bfe-toc__item.is-active {
	border-left-color: #5B4BFF; /* active segment */
}
.bfe-toc__item--h3 {
	padding-left: 30px;
}
.bfe-toc__link {
	font-family: 'Roboto', sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.4;
	color: #1D1E20;
	text-decoration: none;
	display: block;
}
.bfe-toc__item--h3 .bfe-toc__link {
	font-size: 18px;
}
.bfe-toc__link:hover {
	color: #5B4BFF;
}
.bfe-toc__num {
	color: #1D1E20;
}

/* On tablet/mobile the TOC drops inline (the column stacks). */
@media (max-width: 1024px) {
	.bfe-toc {
		position: static;
		display: block;
	}
	.bfe-toc__panel {
		position: static;
		width: 100%;
		max-width: 100%;
	}
}

/* Reliable featured image (shortcode) */
.bfe-featured { text-align:center; line-height:0; }
.bfe-featured__img { display:block; max-width:100%; height:auto; margin:0 auto; border-radius:10px; }

/* Single blog post: hide theme post navigation + comments, sit flush to footer */
.single-post .post-navigation,
.single-post .ast-navigation-links,
.single-post nav.navigation.post-navigation,
.single-post #comments,
.single-post .comments-area,
.single-post #respond,
.single-post .ast-comment-list,
.single-post .comment-respond { display: none !important; }
/* Flush to footer — kill Astra separate-container bottom spacing. */
body.single-post .ast-separate-container #primary,
body.single-post #primary { margin-bottom: 0 !important; padding-bottom: 0 !important; }
body.single-post .ast-separate-container .ast-article-single,
body.single-post .ast-article-single { padding-bottom: 0 !important; margin-bottom: 0 !important; }
body.single-post .site-content,
body.single-post .site-content > .ast-container { padding-bottom: 0 !important; margin-bottom: 0 !important; }

/* Hero post-info (category etc.) — no underline on links */
.elementor-widget-post-info a,
.elementor-post-info__item a,
.elementor-post-info__terms-list a,
.elementor-widget-theme-post-info a {
	text-decoration: none !important;
	border-bottom: 0 !important;
}
.elementor-widget-post-info a:hover,
.elementor-post-info__item a:hover { text-decoration: none !important; }
