/* ==========================================================================
   Premium Single Post Stylesheet (Mockup-aligned)
   ========================================================================== */

.ms-single-post {
	padding: 30px 0 20px;
	background-color: #F8FCFB;
}

/* Breadcrumbs */
.ms-breadcrumbs {
	margin-bottom: 25px;
	font-size: 13.5px;
	line-height: 1.45;
	color: #6E7C7A;
	font-weight: 500;
}

.ms-breadcrumbs a,
.ms-breadcrumbs__sep,
.ms-breadcrumbs__current {
	font-size: inherit !important;
	line-height: inherit;
}

.ms-breadcrumbs a {
	color: inherit;
	text-decoration: none;
	transition: var(--ms-transition);
}

.ms-breadcrumbs a:hover {
	color: var(--ms-primary);
}

.ms-breadcrumbs__sep {
	margin: 0 8px;
	color: #C0CDC9;
}

.ms-breadcrumbs__current {
	color: #2F3E3B;
	font-weight: inherit;
}

/* Layout Grid */
.ms-single-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 10px;
	align-items: start;
}

/* Main Article Column */
.ms-single-post__main {
	background-color: #F8F8F6;
	border: 1px solid rgba(11, 111, 120, 0.08);
	border-radius: 20px;
	padding: 40px 44px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Category Badge Pill */
.ms-single-post__badge {
	margin-bottom: 16px;
}

.ms-single-post__badge a {
	display: inline-block;
	background: var(--ms-primary-dark);
	color: #FFFFFF !important;
	font-size: 11.5px;
	font-weight: 700;
	padding: 6px 16px;
	border-radius: 99px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(10, 92, 115, 0.15);
	transition: var(--ms-transition);
}

.ms-single-post__badge a:hover {
	background: var(--ms-accent);
	box-shadow: 0 4px 12px rgba(255, 126, 0, 0.25);
}

/*
 * Editorial type scale
 *
 * Defaults mirror the WordPress editor's article scale rather than theme
 * headings. Browser conversion from points to pixels is intentional; authored
 * editor values still override these fallbacks.
 */
#page #content .ms-single-post {
	--ms-article-h1: 24pt;
	/* The page title is the document H1; it must sit clearly above the
	 * 18pt article H2 while editor headings retain their supplied scale. */
	--ms-article-title: 32px;
	--ms-article-section-title: 24px;
	/* Editor article scale converted to CSS pixels: 18pt = 24px,
	 * 14pt = about 18px, and 12pt body copy = 16px. */
	--ms-article-h2: 24px;
	--ms-article-h3: 18px;
	--ms-article-h4: 16px;
	--ms-article-body: 16px;
}

/* Title: independent from the larger global page-H1 scale. */
#page #content .ms-single-post__title {
	display: block;
	width: 100%;
	max-width: none;
	font-size: var(--ms-article-title) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: var(--ms-heading) !important;
	margin: 0 0 16px 0 !important;
	text-transform: none !important;
	text-wrap: wrap;
	white-space: normal !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	hyphens: none;
}

/* Lead/Subtitle */
.ms-single-post__lead {
	font-size: var(--ms-article-body);
	line-height: 1.6;
	color: #556663;
	margin-bottom: 20px;
	font-weight: 500;
}

/* Meta Row */
.ms-single-post__meta-row {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 30px;
	padding-bottom: 18px;
	border-bottom: 1px solid #EAF2F1;
}

.ms-single-post__meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	color: #6E7C7A;
	font-weight: 600;
}

.ms-single-post__meta-icon {
	width: 17px;
	height: 17px;
	color: #0C8592;
}

/* Featured Image */
.ms-single-post__featured-wrapper {
	margin-bottom: 32px;
	border-radius: 12px;
	overflow: hidden;
	background: #F0F5F4;
}

.ms-single-post__featured-img {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	display: block;
}

.ms-single-post__featured-caption {
	padding: 10px 16px;
	background-color: #F8FCFB;
	border-top: 1px solid #EAF2F1;
	font-size: 13px;
	color: #6E7C7A;
	text-align: center;
	font-style: italic;
}

/* Highlight Box (Quote Box style) */
.ms-single-post__highlight-box {
	display: flex;
	gap: 16px;
	background: linear-gradient(145deg, #F5FAFA, #ECF5F4);
	border: 1px solid rgba(13, 143, 151, 0.12);
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 32px;
}

.ms-single-post__highlight-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(13, 143, 151, 0.08);
	color: var(--ms-primary);
	flex-shrink: 0;
}

.ms-single-post__highlight-icon {
	width: 22px;
	height: 22px;
}

.ms-single-post__highlight-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ms-primary-dark);
	font-weight: 600;
}

/* Table of Contents (TOC) */
.ms-post-toc {
	background: #FFFFFF;
	border: 1px solid rgba(11, 111, 120, 0.14);
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 4px !important;
	transition: padding 300ms ease, margin 300ms ease, border-color 300ms ease;
}

/* Desktop uses the sidebar TOC; this copy is available on mobile. */
.ms-post-toc--article {
	display: none;
}

.ms-post-toc--sidebar {
	margin-bottom: 0 !important;
}

.ms-post-toc--sidebar .ms-post-toc__grid {
	grid-template-columns: 1fr;
}

/* Easy Table of Contents: keep the plugin-generated TOC in the sidebar only. */
.ms-single-post__content #ez-toc-container,
.ms-single-post__content .ez-toc-container {
	display: none !important;
}

.ms-sidebar-easy-toc #ez-toc-container,
.ms-sidebar-easy-toc .ez-toc-container {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid rgba(11, 111, 120, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 77, 91, 0.04) !important;
}

.ms-sidebar-easy-toc .ez-toc-title-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
    padding: 0 0 12px !important;
    border-bottom: 2px solid #ecf5f4 !important;
}

#page #content .ms-sidebar-easy-toc .ez-toc-title,
#page #content .ms-sidebar-widget__title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-family: var(--ms-font-heading) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.05em !important;
    color: var(--ms-primary-dark) !important;
}

#page #content .ms-sidebar-widget__title {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #ecf5f4 !important;
}

.ms-sidebar-easy-toc .ez-toc-title-toggle {
    flex: 0 0 auto !important;
}

.ms-sidebar-easy-toc .ez-toc-title-toggle a,
.ms-sidebar-easy-toc .ez-toc-title-toggle label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    color: var(--ms-primary) !important;
    background: #f8fcfb !important;
    border: 1px solid rgba(11, 111, 120, 0.14) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.ms-sidebar-easy-toc nav,
.ms-sidebar-easy-toc nav > ul {
    margin: 0 !important;
    padding: 0 !important;
}

.ms-sidebar-easy-toc ul,
.ms-sidebar-easy-toc li {
    list-style: none !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li {
    margin: 0 0 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f8fcfb !important;
    border: 1px solid rgba(11, 111, 120, 0.09) !important;
    border-radius: 10px !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li:last-child {
    margin-bottom: 0 !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > a {
    display: block !important;
    margin: 0 !important;
    padding: 11px 12px !important;
    font-family: var(--ms-font-body) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: var(--ms-primary-dark) !important;
    text-decoration: none !important;
    overflow-wrap: anywhere !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > a:hover,
.ms-sidebar-easy-toc .ez-toc-list > li > a:focus-visible {
    color: var(--ms-accent) !important;
    background: #fff !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > ul {
    margin: 0 12px 10px !important;
    padding: 0 !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > ul > li {
    margin: 0 !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid rgba(11, 111, 120, 0.08) !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > ul > li + li {
    margin-top: 8px !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > ul a {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--ms-font-body) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    color: var(--ms-text-light) !important;
    text-decoration: none !important;
    overflow-wrap: anywhere !important;
}

.ms-sidebar-easy-toc .ez-toc-list > li > ul a:hover,
.ms-sidebar-easy-toc .ez-toc-list > li > ul a:focus-visible {
    color: var(--ms-primary) !important;
}

.ms-sidebar-easy-toc .ez-toc-counter nav ul li a::before,
.ms-sidebar-easy-toc nav ul li a::before {
    content: none !important;
    display: none !important;
}

.ms-post-toc__title {
	font-size: 13.5px !important;
	font-weight: 800 !important;
	letter-spacing: 0.05em;
	color: var(--ms-primary-dark);
	margin: 0 0 16px 0 !important;
	border-bottom: 1px solid #EAF2F1;
	padding-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: margin 300ms ease, padding 300ms ease, border-color 300ms ease;
}

.ms-post-toc__toggle {
	background: none;
	border: none;
	padding: 4px 8px;
	color: var(--ms-primary-medium);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 6px;
	transition: var(--ms-transition);
}

.ms-post-toc__toggle:hover {
	color: var(--ms-accent);
	background: rgba(11, 111, 120, 0.06);
}

.ms-post-toc__toggle-icon {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	stroke-width: 2.5;
	fill: none;
	transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-post-toc.collapsed .ms-post-toc__toggle-icon {
	transform: rotate(180deg);
}

.ms-post-toc.collapsed {
	padding: 16px 24px;
}

.ms-post-toc.collapsed .ms-post-toc__title {
	margin-bottom: 0 !important;
	border-bottom-color: transparent;
	padding-bottom: 0;
}

.ms-post-toc__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px 24px;
	list-style: none !important;
	counter-reset: none !important;
	transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms ease, visibility 250ms ease;
	max-height: 1500px;
	opacity: 1;
	visibility: visible;
	overflow: hidden;
}

.ms-post-toc.collapsed .ms-post-toc__grid {
	max-height: 0 !important;
	opacity: 0 !important;
	visibility: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
}

.ms-post-toc__item {
	display: flex;
	gap: 6px;
	font-size: 14.5px;
	color: var(--ms-primary-dark);
	text-decoration: none;
	line-height: 1.4;
	transition: var(--ms-transition);
}

/* The TOC mirrors author headings exactly; it never generates numbers. */
.ms-post-toc__item::before,
.ms-post-toc__item::after,
.ms-post-toc__text::before,
.ms-post-toc__text::after {
	content: none !important;
	display: none !important;
}

.ms-post-toc__item--level-3 {
	padding-left: 12px;
}

.ms-post-toc__item--level-4 {
	padding-left: 24px;
	font-size: 13.5px;
}

.ms-post-toc__item:hover {
	color: var(--ms-accent);
}

.ms-post-toc__text {
	font-weight: 500;
}

/* Editorial Post Content */
.ms-single-post__content {
	color: #2F3E3B;
	font-size: var(--ms-article-body);
	line-height: 1.7;
	text-align: justify;
	text-justify: inter-word;
}

.ms-single-post__content h1,
.ms-single-post__content h2,
.ms-single-post__content h3,
	.ms-single-post__content h4,
	.ms-single-post__content h5,
	.ms-single-post__content h6 {
	display: block;
	width: 100%;
	/* Do not clear floated editorial images: the heading and following text
	 * should naturally flow beside an alignleft/alignright image. Authors can
	 * insert a clear block when they deliberately want to resume full width. */
	clear: none;
	box-sizing: border-box;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-family: var(--ms-font-heading) !important;
	color: var(--ms-heading) !important;
	font-weight: var(--ms-font-heading-weight) !important;
	font-synthesis: none;
	line-height: 1.3;
	margin-bottom: 12px !important;
	text-align: left !important;
	text-justify: auto;
}

/* Headings collected in the article TOC are peer section titles even when an
 * older post was authored with a mixture of H2, H3 and H4 elements. */
.ms-single-post__content h2[id^="chude-"],
.ms-single-post__content h3[id^="chude-"],
.ms-single-post__content h4[id^="chude-"] {
	font-size: var(--ms-article-section-title) !important;
	line-height: 1.32 !important;
	margin-top: 30px !important;
	margin-bottom: 12px !important;
}

/* Soft editorial defaults. Values chosen in Classic Editor or Gutenberg
 * deliberately override these rules, so authors control final article type. */
.ms-single-post__content h1:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: var(--ms-article-h1);
	line-height: 1.25;
}

.ms-single-post__content h2:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: var(--ms-article-h2);
	line-height: 1.3;
}

.ms-single-post__content h3:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: var(--ms-article-h3);
	line-height: 1.35;
}

.ms-single-post__content h4:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: var(--ms-article-h4);
	line-height: 1.4;
}

.ms-single-post__content h5:not([style*="font-size"]):not([class*="font-size"]),
.ms-single-post__content h6:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: var(--ms-article-body);
	line-height: 1.5;
}

/* Keep the theme heading identity in rich-text spans inside a heading. */
.ms-single-post__content h1 *,
.ms-single-post__content h2 *,
.ms-single-post__content h3 *,
.ms-single-post__content h4 *,
.ms-single-post__content h5 *,
.ms-single-post__content h6 * {
	font-family: inherit !important;
	color: inherit !important;
	/* Rich-text bold inside an already-bold heading must not become bolder. */
	font-weight: inherit !important;
}

.ms-single-post__content > *:first-child,
.ms-single-post__content > div:first-child > *:first-child,
.ms-single-post__content > p:first-child {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.ms-single-post__content p {
	margin-bottom: 16px !important;
	line-height: 1.7 !important;
	text-align: justify;
	text-justify: inter-word;
}

.ms-single-post__content p:not([style*="font-size"]):not([class*="font-size"]) {
	font-size: inherit;
}

/*
 * Editorial tables
 *
 * These defaults make grid lines legible without overwriting inline styles
 * pasted from a document or added through the editor. Most importantly,
 * tables opt out of the article's justified-copy rule: justified text in a
 * narrow cell is what caused the large, uneven spaces between Vietnamese
 * words in pasted tables.
 */
.ms-single-post__content .wp-block-table,
.ms-single-post__content .ms-responsive-table {
	width: 100%;
	max-width: 100%;
	margin: 18px 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.ms-single-post__content .ms-table-scroll-shell {
	width: 100%;
	max-width: 100%;
	margin: 18px 0;
}

.ms-single-post__content .ms-table-scroll-shell > .wp-block-table,
.ms-single-post__content .ms-table-scroll-shell > .ms-responsive-table {
	margin: 0;
}

.ms-table-scroll-progress {
	display: none;
	margin-top: 8px;
}

.ms-table-scroll-progress__track {
	position: relative;
	display: block;
	width: 100%;
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: #DDE9E7;
	cursor: ew-resize;
	touch-action: none;
}

.ms-table-scroll-progress__thumb {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--ms-primary, #0B6F78);
	box-shadow: 0 1px 3px rgba(7, 91, 120, 0.25);
	transition: left 0.12s ease;
}

.ms-single-post__content table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: auto;
	color: inherit;
	text-align: start;
	background: transparent;
}

.ms-single-post__content th,
.ms-single-post__content td {
	min-width: 0;
	padding: 0.72em 0.86em;
	vertical-align: top;
	border: 1px solid rgba(11, 111, 120, 0.28);
	overflow-wrap: anywhere;
	word-break: normal;
	hyphens: auto;
	line-height: 1.55;
	text-align: inherit;
	background-clip: padding-box;
}

.ms-single-post__content th {
	font-weight: 700;
}

.ms-single-post__content table p {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	text-align: inherit;
}

@media (max-width: 767px) {
	.ms-single-post__content .wp-block-table,
	.ms-single-post__content .ms-responsive-table {
		margin: 14px 0;
	}

	.ms-single-post__content .ms-table-scroll-shell {
		margin: 14px 0;
	}

	.ms-table-scroll-shell.is-scrollable .ms-table-scroll-progress {
		display: block;
	}

	.ms-single-post__content th,
	.ms-single-post__content td {
		padding: 0.62em 0.7em;
		font-size: var(--ms-article-body);
	}
}

/*
 * WordPress image alignment classes from both the Classic Editor and
 * Gutenberg. Keep these rules scoped to article content so editor choices
 * are reproduced on the public post without affecting cards or the sidebar.
 */
.ms-single-post__content img {
	max-width: 100%;
	height: auto;
}

.ms-single-post__content .alignleft {
	float: left;
	margin: 0.5em 1.5em 1em 0;
}

.ms-single-post__content .alignright {
	float: right;
	margin: 0.5em 0 1em 1.5em;
}

.ms-single-post__content .aligncenter {
	display: block;
	clear: both;
	margin: 0.5em auto 1em;
}

.ms-single-post__content figure,
.ms-single-post__content .wp-caption {
	max-width: 100%;
	height: auto;
	box-sizing: border-box;
}

.ms-single-post__content figure img,
.ms-single-post__content .wp-caption img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ms-single-post__content figcaption,
.ms-single-post__content .wp-caption-text {
	display: block;
	width: 100%;
	margin-top: 0.5em;
	text-align: center;
}

.ms-single-post__content::after {
	content: "";
	display: table;
	clear: both;
}

/* Synchronize top and bottom margins for embed blocks, cards and iframes. */
.ms-single-post__content .wp-block-embed,
.ms-single-post__content iframe.wp-embedded-content,
.ms-single-post__content .wp-embedded-content,
.ms-single-post__content blockquote.wp-embedded-content,
.ms-single-post__content .wp-block-embed__wrapper,
.ms-single-post__content .wp-block-group,
.ms-single-post__content .wp-block-columns,
.ms-single-post__content iframe {
	margin-top: 10px !important;
	margin-bottom: 10px !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

/* Force 100% responsive width on iframe and preview card elements */
.ms-single-post__content iframe.wp-embedded-content,
.ms-single-post__content .wp-embedded-content,
.ms-single-post__content .wp-block-embed iframe,
.ms-single-post__content iframe {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	border-radius: 12px;
	border: 1px solid rgba(11, 111, 120, 0.12) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ms-single-post__content .wp-block-embed + h2,
.ms-single-post__content .wp-block-embed + h3,
.ms-single-post__content iframe.wp-embedded-content + h2,
.ms-single-post__content iframe.wp-embedded-content + h3,
.ms-single-post__content .wp-embedded-content + h2,
.ms-single-post__content .wp-embedded-content + h3,
.ms-single-post__content div + h2,
.ms-single-post__content div + h3,
.ms-single-post__content p + h2,
.ms-single-post__content p + h3,
.ms-single-post__content figure + h2,
.ms-single-post__content figure + h3 {
	margin-top: 30px !important;
}

.ms-single-post__content ul,
.ms-single-post__content ol {
	margin-bottom: 22px;
	padding-left: 20px;
}

.ms-single-post__content li {
	margin-bottom: 8px;
	line-height: 1.7;
}

/* Premium Blockquote styling */
.ms-single-post__content blockquote {
	margin: 32px 0 !important;
	padding: 24px 30px !important;
	border-left: 4px solid var(--ms-accent) !important;
	background: linear-gradient(to right, rgba(255, 126, 0, 0.05), rgba(255, 126, 0, 0.01)) !important;
	border-radius: 0 12px 12px 0;
	font-style: italic;
	font-size: 17px;
	color: #1A3E39;
	line-height: 1.6;
}

.ms-single-post__content blockquote p {
	margin-bottom: 0 !important;
	font-weight: 400;
}

/* Preserve the editor's bold selection inside quotes. Only strong/b text is
   bold, and it keeps the same typeface as the surrounding quote content. */
.ms-single-post__content blockquote strong,
.ms-single-post__content blockquote b {
	font-family: inherit !important;
	font-weight: 700 !important;
}

.ms-single-post__content blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 13.5px;
	font-weight: 700;
	color: #6E7C7A;
	font-style: normal;
}

/* Footer tags and share row */
.ms-single-post__footer-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #EAF2F1;
}

.ms-single-post__tags {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	align-items: start;
	gap: 8px;
	width: 100%;
	text-align: left;
}

.ms-single-post__tags-label {
	font-size: 13.5px;
	font-weight: 700;
	color: #6E7C7A;
}

.ms-single-post__tags-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
}

.ms-single-post__tag-link {
	font-size: 13px;
	color: var(--ms-primary-dark);
	background-color: #F0F5F4;
	padding: 4px 12px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: var(--ms-transition);
}

.ms-single-post__tag-link:hover {
	background-color: var(--ms-primary);
	color: #FFFFFF;
}

.ms-single-post__shares {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	width: 100%;
}

.ms-single-post__share-label {
	font-size: 13.5px;
	font-weight: 700;
	color: #6E7C7A;
}

.ms-single-post__share-icon-link {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	transition: filter .2s ease, transform .2s ease;
}

.ms-single-post__share-icon-link:hover {
	filter: drop-shadow(0 6px 8px rgba(5, 94, 101, .19));
	transform: translateY(-3px);
}

.ms-single-post__share-icon-link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Share Toast Notification */
.ms-share-toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translate(-50%, 20px);
	background-color: var(--ms-primary-dark);
	color: #fff;
	padding: 12px 24px;
	border-radius: 99px;
	font-size: 14.5px;
	font-weight: 600;
	z-index: 9999;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease, transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-share-toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Sidebar Styling */
.ms-single-post__sidebar {
	display: flex;
	flex-direction: column;
	gap: 30px;
	position: sticky;
	top: 110px;
	align-self: start;
}

.ms-sidebar-widget {
	background: #FFFFFF;
	border: 1px solid rgba(11, 111, 120, 0.08);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 10px 24px rgba(5, 62, 67, 0.02);
}

.ms-sidebar-widget__title {
	font-size: 13.5px !important;
	font-weight: 800 !important;
	letter-spacing: 0.05em;
	color: var(--ms-primary-dark);
	margin: 0 0 16px 0 !important;
	border-bottom: 2px solid #ECF5F4;
	padding-bottom: 12px;
}

/* Widget: Category List */
.ms-sidebar-widget__cats {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ms-cat-widget-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: #F8FCFB;
	border: 1px solid rgba(11, 111, 120, 0.04);
	border-radius: 10px;
	text-decoration: none;
	transition: var(--ms-transition);
}

.ms-cat-widget-item:hover {
	background: #FFFFFF;
	border-color: rgba(11, 111, 120, 0.2);
	box-shadow: 0 4px 12px rgba(11, 111, 120, 0.06);
	transform: translateX(4px);
}



.ms-cat-widget-item__name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ms-primary-dark);
}

.ms-cat-widget-item__arrow {
	width: 14px;
	height: 14px;
	color: #C0CDC9;
	transition: var(--ms-transition);
}

.ms-cat-widget-item:hover .ms-cat-widget-item__arrow {
	color: var(--ms-accent);
}

/* Sidebar: article table of contents and tags */
.ms-sidebar-toc__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ms-sidebar-toc__link {
	display: flex;
	gap: 8px;
	padding: 8px 0;
	color: var(--ms-primary-dark);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
	border-bottom: 1px solid #ECF5F4;
}

.ms-sidebar-toc__link:last-child {
	border-bottom: 0;
}

.ms-sidebar-toc__link > span {
	flex: 0 0 auto;
	color: var(--ms-accent);
}

.ms-sidebar-toc__link:hover {
	color: var(--ms-accent);
}

.ms-sidebar-tags__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ms-sidebar-tags__link {
	padding: 7px 10px;
	border-radius: 999px;
	background: #F1F8F7;
	color: var(--ms-primary-dark);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.ms-sidebar-tags__link:hover {
	background: var(--ms-primary);
	color: #FFFFFF;
}

/* Widget: Related List in Sidebar */
.ms-sidebar-widget--related {
	padding: 20px;
}

#page #content .ms-sidebar-widget--related > .ms-sidebar-widget__title {
	margin-bottom: 14px !important;
	padding-bottom: 10px;
	font-size: 16px !important;
	line-height: 1.3 !important;
	letter-spacing: 0.04em;
}

.ms-sidebar-widget__related-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ms-sidebar-related-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 68px;
	padding: 8px;
	border: 1px solid rgba(11, 111, 120, 0.08);
	border-radius: 12px;
	background: #F8FCFB;
	position: relative;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ms-sidebar-related-item:hover {
	border-color: rgba(11, 111, 120, 0.2);
	background: #FFFFFF;
	box-shadow: 0 7px 18px rgba(5, 62, 67, 0.07);
	transform: translateY(-2px);
}

.ms-sidebar-related-item__thumb {
	width: 92px;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 9px;
	overflow: hidden;
	flex-shrink: 0;
	background: #F0F5F4;
}

.ms-sidebar-related-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: var(--ms-transition);
}

.ms-sidebar-related-item:hover .ms-sidebar-related-item__thumb img {
	transform: scale(1.06);
}

.ms-sidebar-related-item__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 1 auto;
	gap: 4px;
	min-width: 0;
}

#page #content .ms-single-post .ms-sidebar-related-item__title {
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	margin: 0 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ms-sidebar-related-item__title a {
	color: var(--ms-primary-dark);
	text-decoration: none;
}

.ms-sidebar-related-item:hover .ms-sidebar-related-item__title a {
	color: var(--ms-primary);
}

.ms-sidebar-related-item__title a::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}

.ms-sidebar-related-item__date {
	font-size: 10.75px;
	color: #8C9C98;
	font-weight: 500;
	line-height: 1.25;
}

/* CTA Consultation Banner (Full Width Horizontal) */
.ms-single-cta-banner {
	background: linear-gradient(135deg, #0A5366 0%, #053C4B 100%);
	border-radius: 16px;
	padding: 28px 40px;
	color: #FFFFFF;
	box-shadow: 0 12px 28px rgba(5, 60, 75, 0.15);
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	margin-top: 30px;
	margin-bottom: 10px;
}

.ms-single-cta-banner::before {
	content: "";
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(13, 143, 151, 0.12) 0%, transparent 70%);
	pointer-events: none;
}

.ms-single-cta-banner__left {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-grow: 1;
}

.ms-single-cta-banner__icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: var(--ms-accent);
	border: 1px solid rgba(255, 255, 255, 0.04);
	flex-shrink: 0;
}

.ms-single-cta-banner__icon {
	width: 28px;
	height: 28px;
}

.ms-single-cta-banner__text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-align: left;
}

.ms-single-cta-banner__title {
	font-size: 16px !important;
	font-weight: 800 !important;
	color: #FFFFFF !important;
	margin: 0 !important;
	letter-spacing: 0.05em;
}

.ms-single-cta-banner__desc {
	font-size: 14px;
	line-height: 1.5;
	color: #BDD2CE;
	margin: 0;
}

.ms-single-cta-banner__btn {
	background: var(--ms-accent);
	color: #FFFFFF !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	padding: 14px 28px;
	border-radius: 99px;
	letter-spacing: 0.05em;
	box-shadow: 0 6px 16px rgba(255, 126, 0, 0.3);
	transition: all 250ms ease;
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	white-space: nowrap;
}

.ms-single-cta-banner__btn:hover {
	background: #FF9000;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(255, 126, 0, 0.45);
}

/* Related Posts Section (Bottom 3 columns) */
.ms-related-posts {
	background-color: #F0F6F5;
	border-top: 1px solid #E2EDEC;
	padding: 25px 0 30px 0;
}

.ms-related-posts__heading {
	margin-bottom: 36px;
	text-align: center;
	position: relative;
}

.ms-related-posts__heading h2 {
	font-size: 22px !important;
	font-weight: 800 !important;
	color: var(--ms-primary-dark) !important;
	margin: 0 0 10px 0 !important;
	letter-spacing: 0.03em;
}

.ms-related-posts__heading-bar {
	display: block;
	width: 48px;
	height: 3.5px;
	background: var(--ms-accent);
	margin: 0 auto;
	border-radius: 2px;
}

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

.ms-related-post {
	background: #FFFFFF;
	border: 1px solid rgba(11, 111, 120, 0.08);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 8px 20px rgba(5, 62, 67, 0.02);
	transition: all 300ms ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.ms-related-post:hover {
	transform: translateY(-6px);
	box-shadow: 0 15px 30px rgba(5, 62, 67, 0.08);
	border-color: rgba(11, 111, 120, 0.2);
}

.ms-related-post__image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #F0F5F4;
}

.ms-related-post__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 450ms ease;
}

.ms-related-post:hover .ms-related-post__image img {
	transform: scale(1.04);
}

.ms-related-post__body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.ms-related-post__category {
	font-size: 11px;
	font-weight: 700;
	color: var(--ms-primary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
}

.ms-related-post h3 {
	font-size: 15.5px !important;
	font-weight: 700 !important;
	line-height: 1.45 !important;
	color: var(--ms-primary-dark);
	margin: 0 0 16px 0 !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 44px;
}

.ms-related-post h3 a {
	color: inherit;
	text-decoration: none;
}

.ms-related-post h3 a::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}

.ms-related-post__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid #F0F5F4;
}

.ms-related-post__date {
	font-size: 12.5px;
	color: #8C9C98;
	font-weight: 500;
}

.ms-related-post__link {
	font-size: 12px;
	font-weight: 700;
	color: var(--ms-primary) !important;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: var(--ms-transition);
}

.ms-related-post:hover .ms-related-post__link {
	color: var(--ms-accent) !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */

@media (max-width: 991px) {
	.ms-single-layout-grid {
		display: block;
		width: 100%;
	}
	
	.ms-single-post__main {
		width: 100%;
		box-sizing: border-box;
		padding: 24px 18px !important;
		border-radius: 16px;
	}

	/* Keep only the compact related-post list below the article on mobile.
	 * TOC and taxonomy widgets already have dedicated in-article equivalents. */
	.ms-single-post__sidebar {
		display: block !important;
		position: static;
		width: 100%;
		margin-top: 20px;
	}

	.ms-single-post__sidebar > :not(.ms-sidebar-widget--related) {
		display: none !important;
	}

	.ms-post-toc--article {
		display: block;
	}

	.ms-single-post__meta-row {
		flex-wrap: wrap;
		gap: 12px 20px;
		margin-bottom: 20px;
	}
	
	.ms-post-toc__grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.ms-single-cta-banner {
		flex-direction: column;
		padding: 24px;
		gap: 20px;
		text-align: center;
	}

	.ms-single-cta-banner__left {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}

	.ms-single-cta-banner__text {
		text-align: center;
	}

	.ms-single-cta-banner__btn {
		width: 100%;
		text-align: center;
	}
	
	.ms-related-posts__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

@media (max-width: 576px) {
	#page #content .ms-single-post {
		padding: 16px 0 30px;
	}

	/* Keep the breadcrumb on the current line for as long as space remains. */
	.ms-breadcrumbs {
		display: block;
		margin-bottom: 16px;
		font-size: 11.5px;
		line-height: 1.45;
	}

	.ms-breadcrumbs__current {
		display: inline;
		margin: 0;
		padding: 0;
		line-height: 1.45;
		white-space: normal;
		overflow-wrap: break-word;
		font-weight: inherit;
	}
	
	.ms-single-post__main {
		padding: 18px 14px !important;
		border-radius: 14px;
	}

	/* Do not inherit justified body copy for default editorial headings.
	 * Explicit alignment selected in the editor remains authoritative. */
	.ms-single-post__content h1:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]),
	.ms-single-post__content h2:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]),
	.ms-single-post__content h3:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]),
	.ms-single-post__content h4:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]),
	.ms-single-post__content h5:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]),
	.ms-single-post__content h6:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not([style*="text-align"]):not([align]) {
		text-align: left !important;
		text-justify: auto;
	}

	/* Preserve the desktop heading format while allowing natural mobile wraps. */
	.ms-single-post__content h1 {
		letter-spacing: normal;
		text-wrap: wrap;
		white-space: normal;
		word-break: normal;
		overflow-wrap: normal;
		hyphens: none;
	}

	/* Author, date and reading time remain one compact information row. */
	.ms-single-post__meta-row {
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 8px;
		margin-bottom: 18px;
		padding-bottom: 14px;
	}

	.ms-single-post__meta-item {
		flex: 0 1 auto;
		min-width: 0;
		gap: 4px;
		font-size: 11.5px;
		white-space: nowrap;
	}

	.ms-single-post__meta-icon {
		width: 14px;
		height: 14px;
		flex: 0 0 14px;
	}

	.ms-single-post__featured-wrapper img {
		max-width: 100%;
		height: auto;
		border-radius: 10px;
	}

	/* Article images keep the exact native WordPress/editor presentation. */
	.ms-single-post__content img {
		max-width: 100%;
		height: auto;
	}

	/* Compact horizontal related-post cards on phones. */
	.ms-related-posts {
		padding: 22px 0 26px;
	}

	.ms-related-posts__heading {
		margin-bottom: 18px;
	}

	.ms-related-posts__grid {
		gap: 12px;
	}

	.ms-related-post {
		display: grid;
		grid-template-columns: 42% minmax(0, 1fr);
		align-items: start;
		border-radius: 12px;
	}

	.ms-related-post__image {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.ms-related-post__body {
		min-width: 0;
		padding: 9px 11px;
	}

	.ms-related-post__category {
		margin-bottom: 4px;
		font-size: 9.5px;
		line-height: 1.25;
	}

	#page #content .ms-related-post h3 {
		min-height: 0;
		margin-bottom: 7px !important;
		font-size: 13px !important;
		line-height: 1.35 !important;
	}

	.ms-related-post__footer {
		margin-top: 0;
		padding-top: 7px;
	}

	.ms-related-post__date,
	.ms-related-post__link {
		font-size: 10.5px;
	}

	.ms-related-post:hover {
		transform: none;
	}

}

/* ==========================================================================
   Consultation Modal Popup Styles
   ========================================================================== */

/* ==========================================================================
   Consultation Modal Popup Styles (Responsive Desktop & Mobile)
   ========================================================================== */

.ms-consult-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ms-consult-modal.active {
	display: flex;
}

.ms-consult-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(3, 53, 61, 0.65);
	backdrop-filter: blur(4px);
}

.ms-consult-modal__box {
	position: relative;
	background: #FFFFFF;
	width: min(100%, 720px);
	max-height: min(90vh, 780px);
	overflow-y: auto;
	border-radius: 20px;
	padding: 32px 36px;
	box-shadow: 0 20px 48px rgba(3, 53, 61, 0.25);
	z-index: 10;
	animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

/* Custom Scrollbar for Modal Box */
.ms-consult-modal__box::-webkit-scrollbar {
	width: 6px;
}
.ms-consult-modal__box::-webkit-scrollbar-track {
	background: #F0F5F4;
	border-radius: 99px;
}
.ms-consult-modal__box::-webkit-scrollbar-thumb {
	background: #B0C4C1;
	border-radius: 99px;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(12px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.ms-consult-modal__close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: transparent;
	border: none;
	font-size: 32px;
	color: #8C9C98;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 50%;
	transition: var(--ms-transition);
	z-index: 20;
}

.ms-consult-modal__close:hover {
	color: var(--ms-accent);
	background: #F0F5F4;
}

.ms-consult-modal__header {
	margin-bottom: 24px;
	text-align: center;
	padding-right: 20px;
}

.ms-consult-modal__title {
	font-size: 20px !important;
	font-weight: 600 !important;
	color: var(--ms-primary-dark) !important;
	margin: 0 0 8px 0 !important;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ms-consult-modal__subtitle {
	font-size: 14px;
	line-height: 1.5;
	color: #556663;
	margin: 0;
}

/* 2-Column Responsive Form Layout */
.ms-consult-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
	margin-bottom: 24px;
}

.ms-consult-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ms-consult-form-group--full {
	grid-column: 1 / -1;
}

.ms-consult-form-group label {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ms-primary-dark);
}

.ms-consult-form-group .required {
	color: #FF5A5F;
}

.ms-consult-form-group input[type="text"],
.ms-consult-form-group input[type="tel"],
.ms-consult-form-group input[type="email"],
.ms-consult-form-group select,
.ms-consult-form-group textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #C0CDC9;
	border-radius: 10px;
	background: #F8FCFB;
	font-size: 14.5px;
	color: #2F3E3B;
	box-sizing: border-box;
	transition: var(--ms-transition);
}

.ms-consult-form-group select {
	appearance: auto;
	cursor: pointer;
}

.ms-consult-form-group input:focus,
.ms-consult-form-group select:focus,
.ms-consult-form-group textarea:focus {
	outline: none;
	border-color: var(--ms-primary);
	background: #FFFFFF;
	box-shadow: 0 0 0 3px rgba(11, 111, 120, 0.12);
}

.ms-consult-form-submit {
	width: 100%;
	background: var(--ms-accent);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	padding: 14px;
	border: none;
	border-radius: 99px;
	letter-spacing: 0.05em;
	box-shadow: 0 6px 18px rgba(242, 140, 0, 0.3);
	cursor: pointer;
	transition: all 250ms ease;
}

.ms-consult-form-submit:hover {
	background: #FF9000;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(242, 140, 0, 0.45);
}

/* Mobile Stacked Responsive Layout */
@media (max-width: 767px) {
	.ms-consult-modal__box {
		padding: 24px 20px;
		width: 100%;
		border-radius: 16px;
	}
	.ms-consult-form-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.ms-consult-modal__title {
		font-size: 17px !important;
	}
	.ms-consult-modal__subtitle {
		font-size: 13px;
	}
}
