/**
 * Single post template — reading experience + social share
 */

/* --------------------------------------------------------------------------
   Breadcrumb / đường dẫn — căn lề theo khung bài, màu dịu
   -------------------------------------------------------------------------- */
body.bmn-single-post .main-header-bar.ast-header-breadcrumb,
body.single-post .main-header-bar.ast-header-breadcrumb,
body.bmn-single-post .ast-breadcrumbs-wrapper,
body.single-post .ast-breadcrumbs-wrapper {
	background: #f7f9f7 !important;
	background-color: #f7f9f7 !important;
	border: none !important;
	box-shadow: none !important;
	padding-top: 0.65rem !important;
	padding-bottom: 0.65rem !important;
	width: 100%;
	text-align: left !important;
}

body.bmn-single-post .ast-header-breadcrumb .ast-container,
body.single-post .ast-header-breadcrumb .ast-container,
body.bmn-single-post .ast-breadcrumbs-wrapper .ast-breadcrumbs-inner,
body.single-post .ast-breadcrumbs-wrapper .ast-breadcrumbs-inner {
	max-width: 1120px !important;
	margin-inline: auto !important;
	padding-inline: var(--bmn-gutter, 1.25rem) !important;
	width: 100%;
	box-sizing: border-box;
}

body.bmn-single-post .ast-breadcrumbs,
body.single-post .ast-breadcrumbs,
body.bmn-single-post .breadcrumb-trail,
body.single-post .breadcrumb-trail {
	font-size: 0.8125rem !important;
	line-height: 1.5 !important;
	font-weight: 400 !important;
}

body.bmn-single-post .ast-breadcrumbs a,
body.single-post .ast-breadcrumbs a,
body.bmn-single-post .trail-items a,
body.single-post .trail-items a,
body.bmn-single-post .ast-breadcrumbs-wrapper a,
body.single-post .ast-breadcrumbs-wrapper a {
	color: #8a9a8e !important;
	text-decoration: none !important;
	font-weight: 400 !important;
	background: none !important;
}

body.bmn-single-post .ast-breadcrumbs a:hover,
body.single-post .ast-breadcrumbs a:hover,
body.bmn-single-post .trail-items a:hover,
body.single-post .trail-items a:hover {
	color: #5c6b62 !important;
	text-decoration: underline !important;
}

/* Mục hiện tại — xám trung tính, không xanh nổi */
body.bmn-single-post .ast-breadcrumbs-wrapper .trail-items .trail-end,
body.single-post .ast-breadcrumbs-wrapper .trail-items .trail-end,
body.bmn-single-post .trail-end,
body.single-post .trail-end,
body.bmn-single-post .trail-end span,
body.single-post .trail-end span {
	color: #6b7c70 !important;
	font-weight: 500 !important;
}

/* Dấu phân cách / */
body.bmn-single-post .trail-items li::after,
body.single-post .trail-items li::after,
body.bmn-single-post .ast-breadcrumbs-wrapper .trail-items li::after,
body.single-post .ast-breadcrumbs-wrapper .trail-items li::after {
	color: #b8c4bc !important;
	padding: 0 0.4em !important;
	font-weight: 400 !important;
}

/* Rank Math breadcrumb (nếu bật) */
body.bmn-single-post .rank-math-breadcrumb,
body.single-post .rank-math-breadcrumb {
	font-size: 0.8125rem !important;
	color: #8a9a8e !important;
}

body.bmn-single-post .rank-math-breadcrumb a,
body.single-post .rank-math-breadcrumb a {
	color: #8a9a8e !important;
	text-decoration: none !important;
	font-weight: 400 !important;
}

body.bmn-single-post .rank-math-breadcrumb .last,
body.single-post .rank-math-breadcrumb .last {
	color: #6b7c70 !important;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.bmn-single-hero {
	position: relative;
	min-height: 380px;
	display: flex;
	align-items: flex-end;
	background: #0a2e1c;
	color: #ffffff;
	overflow: hidden;
}

.bmn-single-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.bmn-single-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bmn-single-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(8, 28, 18, 0.92) 0%,
		rgba(8, 28, 18, 0.72) 38%,
		rgba(8, 28, 18, 0.35) 68%,
		rgba(8, 28, 18, 0.18) 100%
	);
}

.bmn-single-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 3rem var(--bmn-gutter) 2.5rem;
	max-width: var(--bmn-container);
	margin-inline: auto;
}

.bmn-single-hero__content .bmn-badge {
	margin-bottom: 0.7rem;
	display: inline-flex;
	padding: 0.22em 0.6em;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	background: rgba(255, 255, 255, 0.16) !important;
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.4);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(4px);
}

.bmn-single-hero__content .bmn-badge:hover {
	background: rgba(255, 255, 255, 0.26) !important;
	color: #ffffff !important;
}

.bmn-single-hero__title {
	margin: 0;
	color: #ffffff !important;
	font-size: clamp(1.5rem, 3.2vw, 2.25rem);
	max-width: 42rem;
	line-height: 1.28;
	font-weight: 800;
	letter-spacing: -0.015em;
	text-wrap: balance;
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.55),
		0 2px 12px rgba(0, 0, 0, 0.45),
		0 0 1px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------------------------------------------
   Meta dưới ảnh
   -------------------------------------------------------------------------- */
.bmn-single-meta-bar {
	background: #fff;
	border-bottom: 1px solid rgba(27, 174, 112, 0.12);
	box-shadow: 0 2px 12px rgba(20, 38, 28, 0.04);
}

.bmn-single-meta-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.65rem;
	max-width: 760px;
	margin-inline: auto;
	padding: 0.95rem var(--bmn-gutter);
	font-size: 0.9375rem;
	color: #5c6b62;
	line-height: 1.4;
}

.bmn-single-meta-bar__author {
	font-weight: 600;
	color: #143528;
}

.bmn-single-meta-bar__sep {
	color: #a8b5ad;
	user-select: none;
}

.bmn-single-meta-bar__date {
	color: #6b7c70;
	font-weight: 500;
}

/* --------------------------------------------------------------------------
   Body: left sidebar + main content
   -------------------------------------------------------------------------- */
.bmn-single-body {
	background: #f7f9f7;
	padding-block: clamp(1.75rem, 4vw, 3rem);
}

.bmn-single-shell {
	display: grid;
	gap: 1.5rem;
	/* Khung tổng cân đối — nội dung rộng, sidebar gọn bên phải */
	max-width: 1080px;
	margin-inline: auto;
	padding-inline: var(--bmn-gutter);
	align-items: start;
	grid-template-columns: 1fr;
}

/* Desktop: content trái | sidebar phải */
@media (min-width: 960px) {
	.bmn-single-shell {
		grid-template-columns: minmax(0, 1fr) 280px;
		gap: 1.75rem;
		max-width: 1100px;
	}

	.bmn-single-main {
		order: 1;
	}

	.bmn-single-sidebar {
		order: 2;
	}
}

@media (min-width: 1100px) {
	.bmn-single-shell {
		grid-template-columns: minmax(0, 720px) 300px;
		justify-content: center;
		gap: 2rem;
		max-width: 1120px;
	}
}

/* Meta bar aligns with shell width */
.bmn-single-meta-bar__inner--wide {
	max-width: 1120px;
}

/* Main column — độ rộng bài viết dễ đọc */
.bmn-single-main {
	background: #ffffff;
	border-radius: 16px;
	padding: clamp(1.5rem, 3.5vw, 2.35rem) clamp(1.25rem, 3vw, 2.25rem);
	box-shadow: 0 4px 24px rgba(20, 38, 28, 0.06);
	border: 1px solid rgba(20, 38, 28, 0.06);
	min-width: 0;
	order: 1; /* mobile: nội dung trước */
}

/* Sidebar phải (desktop) */
.bmn-single-sidebar {
	min-width: 0;
	order: 2; /* mobile: sidebar dưới */
}

.bmn-single-sidebar__sticky {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 960px) {
	.bmn-single-sidebar__sticky {
		position: sticky;
		top: calc(var(--bmn-header-h, 72px) + 1rem);
	}
}

.bmn-sidebar-card {
	background: #fff;
	border-radius: 14px;
	padding: 1.15rem 1.2rem;
	border: 1px solid rgba(20, 38, 28, 0.07);
	box-shadow: 0 3px 14px rgba(20, 38, 28, 0.05);
}

.bmn-sidebar-card--cta {
	background: linear-gradient(155deg, #0f6b45 0%, #1bae70 70%, #3ecf8e 100%);
	border: none;
	color: #fff;
}

.bmn-sidebar-card--cta .bmn-sidebar-card__title {
	color: #fff !important;
}

.bmn-sidebar-card--cta .bmn-sidebar-card__text {
	color: rgba(255, 255, 255, 0.92);
}

.bmn-sidebar-card__title {
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
	font-weight: 800;
	color: #143528 !important;
	letter-spacing: 0.01em;
}

.bmn-sidebar-card__text {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #5c6b62;
}

.bmn-sidebar-card--cta .bmn-btn {
	width: 100%;
	justify-content: center;
}

/* Categories list */
.bmn-sidebar-cats {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bmn-sidebar-cats li {
	margin: 0;
	border-bottom: 1px solid #eef2ef;
}

.bmn-sidebar-cats li:last-child {
	border-bottom: none;
}

.bmn-sidebar-cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: #2f3a34 !important;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.bmn-sidebar-cats a:hover {
	color: #1bae70 !important;
}

.bmn-sidebar-cats__count {
	flex-shrink: 0;
	min-width: 1.5rem;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 700;
	color: #1bae70;
	background: rgba(27, 174, 112, 0.1);
	border-radius: 999px;
	padding: 0.15em 0.5em;
}

/* Recent posts */
.bmn-sidebar-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bmn-sidebar-posts li {
	margin: 0;
}

.bmn-sidebar-posts li + li {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #eef2ef;
}

.bmn-sidebar-posts__item {
	display: flex;
	gap: 0.7rem;
	align-items: flex-start;
	text-decoration: none !important;
	color: inherit;
}

.bmn-sidebar-posts__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: #e8f5e9;
}

.bmn-sidebar-posts__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bmn-sidebar-posts__thumb--empty {
	background: linear-gradient(135deg, #c8e6c9, #e8f5e9);
}

.bmn-sidebar-posts__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.bmn-sidebar-posts__title {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: #143528;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.bmn-sidebar-posts__item:hover .bmn-sidebar-posts__title {
	color: #1bae70;
}

.bmn-sidebar-posts__date {
	font-size: 0.75rem;
	color: #8a9a8e;
}

/* Widgets in sidebar */
.bmn-sidebar-widgets .bmn-sidebar-widget,
.bmn-sidebar-widgets .widget {
	background: #fff;
	border-radius: 14px;
	padding: 1.15rem 1.2rem;
	border: 1px solid rgba(20, 38, 28, 0.07);
	box-shadow: 0 3px 14px rgba(20, 38, 28, 0.05);
	margin-bottom: 1rem;
}

.bmn-sidebar-widget__title,
.bmn-sidebar-widgets .widget-title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 800;
	color: #143528;
}

/* Legacy layout classes (keep safe) */
.bmn-single-layout {
	display: grid;
	gap: 1.75rem;
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: var(--bmn-gutter);
}

/* --------------------------------------------------------------------------
   Typography — chuẩn đọc, tương phản tốt
   -------------------------------------------------------------------------- */
.bmn-single-content,
.bmn-single-content.entry-content {
	font-family: var(--bmn-font-body, "Be Vietnam Pro", "Inter", system-ui, sans-serif);
	font-size: 1.0625rem; /* 17px — dễ đọc, không lấn át tiêu đề */
	line-height: 1.7;
	color: #2f3a34 !important;
	-webkit-font-smoothing: antialiased;
}

.bmn-single-content > *:first-child {
	margin-top: 0;
}

.bmn-single-content p,
.bmn-single-content li,
.bmn-single-content td,
.bmn-single-content span,
.bmn-single-content div {
	color: #2f3a34;
}

.bmn-single-content p {
	margin: 0 0 1.1em;
}

.bmn-single-content h2,
.bmn-single-content h3,
.bmn-single-content h4 {
	margin-top: 1.55em;
	margin-bottom: 0.5em;
	color: #143528 !important;
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -0.015em;
}

.bmn-single-content h2 { font-size: 1.375rem; } /* ~22px */
.bmn-single-content h3 { font-size: 1.1875rem; } /* ~19px */
.bmn-single-content h4 { font-size: 1.0625rem; } /* ~17px */

.bmn-single-content strong,
.bmn-single-content b {
	color: #1a2a22;
	font-weight: 700;
}

.bmn-single-content a {
	color: #1bae70 !important;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	font-weight: 500;
}

.bmn-single-content a:hover {
	color: #15945e !important;
}

.bmn-single-content ul,
.bmn-single-content ol {
	margin: 0 0 1.25em;
	padding-left: 1.35em;
}

.bmn-single-content li {
	margin-bottom: 0.4em;
}

.bmn-single-content img {
	border-radius: 10px;
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5em auto;
}

.bmn-single-content figure {
	margin: 1.5em 0;
}

.bmn-single-content figcaption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	color: #6b7c70;
	text-align: center;
}

.bmn-single-content .wp-block-gallery,
.bmn-single-content .gallery {
	margin: 1.75rem 0;
}

.bmn-single-content blockquote {
	margin: 1.75rem 0;
	padding: 1.15rem 1.35rem;
	border-left: 4px solid #1bae70;
	background: #f0f7f3;
	border-radius: 0 10px 10px 0;
	font-style: italic;
	color: #2f3a34 !important;
}

.bmn-single-content blockquote p {
	color: #2f3a34 !important;
	margin-bottom: 0.5em;
}

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

/* Reset common inline junk from old editors if light gray */
.bmn-single-content [style*="color:#999"],
.bmn-single-content [style*="color: #999"],
.bmn-single-content [style*="color:#666"],
.bmn-single-content [style*="color: #666"],
.bmn-single-content [style*="color:#888"],
.bmn-single-content [style*="color: #888"] {
	color: #2f3a34 !important;
}

/* --------------------------------------------------------------------------
   Tags — gọn, cân đối, không quá to
   -------------------------------------------------------------------------- */
.bmn-single-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	padding-top: 1.1rem;
	margin-top: 0.25rem;
	border-top: 1px solid #e8eee9;
}

.bmn-single-tags .bmn-badge {
	padding: 0.18em 0.55em;
	font-size: 0.72rem; /* ~11.5px */
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.01em;
	background: #f0f4f1;
	color: #4a5c52;
	border: 1px solid #e0e8e2;
	border-radius: 6px; /* bo nhẹ, không pill quá to */
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bmn-single-tags .bmn-badge:hover {
	background: rgba(27, 174, 112, 0.1);
	color: #15945e;
	border-color: rgba(27, 174, 112, 0.25);
}

/* --------------------------------------------------------------------------
   Social share
   -------------------------------------------------------------------------- */
.bmn-share {
	margin-top: 0.25rem;
	padding: 1.35rem 1.25rem;
	background: #f4faf6;
	border: 1px solid rgba(27, 174, 112, 0.15);
	border-radius: 12px;
}

.bmn-share__label {
	margin: 0 0 0.85rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #143528;
}

.bmn-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.bmn-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	border: 1px solid #dce6df;
	background: #fff;
	color: #2f3a34 !important;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
	line-height: 1.2;
	font-family: inherit;
}

.bmn-share__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(20, 38, 28, 0.1);
}

.bmn-share__btn svg {
	flex-shrink: 0;
}

.bmn-share__btn--facebook:hover {
	background: #1877f2;
	border-color: #1877f2;
	color: #fff !important;
}

.bmn-share__btn--twitter:hover {
	background: #111;
	border-color: #111;
	color: #fff !important;
}

.bmn-share__btn--linkedin:hover {
	background: #0a66c2;
	border-color: #0a66c2;
	color: #fff !important;
}

.bmn-share__btn--zalo:hover {
	background: #0068ff;
	border-color: #0068ff;
	color: #fff !important;
}

.bmn-share__btn--copy:hover,
.bmn-share__btn--copy.is-copied {
	background: #1bae70;
	border-color: #1bae70;
	color: #fff !important;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.bmn-single-external-cta {
	margin-top: 0.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e8eee9;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Related — 6 bài, lưới 3×2 (desktop) / 2 cột (tablet) / 1 cột (mobile)
   -------------------------------------------------------------------------- */
.bmn-related {
	padding-block: clamp(2rem, 4vw, 3.25rem);
	background: #eef5f0;
}

.bmn-related__header,
.bmn-related .bmn-section__header {
	text-align: center;
	margin-inline: auto;
	max-width: 40rem;
	margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.bmn-related .bmn-section__title {
	color: #143528;
	font-size: clamp(1.25rem, 2.3vw, 1.6rem);
	line-height: 1.28;
	letter-spacing: -0.015em;
	margin: 0;
}

.bmn-related__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: stretch;
}

@media (min-width: 600px) {
	.bmn-related__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.1rem 1rem;
	}
}

@media (min-width: 960px) {
	.bmn-related__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.25rem 1.15rem;
	}
}

/* Card trong related: tỉ lệ gọn, chiều cao đồng đều */
.bmn-related__grid > * {
	min-width: 0;
	height: 100%;
}

.bmn-related .bmn-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 16px rgba(20, 38, 28, 0.05);
	border: 1px solid rgba(20, 38, 28, 0.08);
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.bmn-related .bmn-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(20, 38, 28, 0.1);
}

.bmn-related .bmn-card__media {
	aspect-ratio: 16 / 10;
	flex-shrink: 0;
}

.bmn-related .bmn-card__body {
	padding: 0.95rem 1.05rem 1.1rem;
	gap: 0.4rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.bmn-related .bmn-card__meta {
	font-size: 0.72rem;
	line-height: 1.35;
}

.bmn-related .bmn-card__title {
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
	margin: 0;
}

.bmn-related .bmn-card__title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	color: #143528 !important;
	text-decoration: none !important;
}

.bmn-related .bmn-card__title a:hover {
	color: #148a58 !important;
}

.bmn-related .bmn-card__excerpt {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #5c6b62;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin: 0;
	flex: 1;
}

.bmn-related .bmn-card__footer {
	margin-top: auto;
	padding-top: 0.45rem;
}

.bmn-related .bmn-card__more {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #148a58 !important;
	text-decoration: none !important;
}

.bmn-related .bmn-card__more:hover {
	color: #0f6b45 !important;
}

@media (max-width: 599px) {
	.bmn-related .bmn-card__media {
		aspect-ratio: 16 / 9;
	}
}

/* Sidebar leftovers */
.bmn-single-aside__card {
	background: #fff;
	border-radius: 14px;
	padding: 1.35rem;
	border: 1px solid #e8eee9;
	box-shadow: 0 4px 16px rgba(20, 38, 28, 0.05);
	margin-bottom: 1.25rem;
}

.bmn-single-aside__card h3 {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	color: #143528;
}
