/**
 * Single article detail — jcproto-style layout adapted for CNC.
 */

body.single-post,
body.single {
	--cnc-article-bg: #f7f7f5;
	background-color: var(--cnc-article-bg) !important;
	overflow-x: clip;
}

.single-post-main.cnc-article-main {
	padding: 0;
	margin-bottom: 0;
	background: var(--cnc-article-bg);
}

.cnc-article-shell {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 2vw, 1.5rem);
	box-sizing: border-box;
}

/* Title band */
.cnc-article__header {
	padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1rem, 2vw, 1.5rem);
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.cnc-article__eyebrow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.9rem;
}

.cnc-article__category {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(10, 10, 10, 0.14);
	border-radius: 999px;
	padding: 0.3rem 0.75rem;
	color: var(--color-black, #0a0a0a);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	background: #fff;
}

.cnc-article__category:hover {
	background: var(--color-black, #0a0a0a);
	color: #fff;
	text-decoration: none;
}

.cnc-article__title {
	margin: 0;
	color: var(--color-black, #0a0a0a);
	font-family: var(--font-heading, Montserrat, system-ui, sans-serif);
	font-size: clamp(1.85rem, 3.2vw, 2.5rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-wrap: pretty;
	overflow-wrap: break-word;
}

.cnc-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 1rem 0 0;
	color: #64748b;
	font-size: 0.92rem;
	line-height: 1.5;
}

.cnc-article__share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 1.15rem;
}

.cnc-article__share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.cnc-article__share-btn:hover {
	transform: translateY(-1px);
	opacity: 0.92;
	color: #fff;
	text-decoration: none;
}

.cnc-article__share-btn--facebook { background: #1877f2; }
.cnc-article__share-btn--twitter { background: #0f1419; color: #fff; }
.cnc-article__share-btn--linkedin { background: #0a66c2; }
.cnc-article__share-btn--whatsapp { background: #25d366; }
.cnc-article__share-btn--copy { background: #6b7280; }

.cnc-article__share-x {
	display: block;
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* 75 / 25 row */
.cnc-article-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0;
	margin: 0 -12px;
}

.cnc-article-layout__main {
	flex: 0 0 75%;
	max-width: 75%;
	width: 75%;
	padding: 0 12px;
	box-sizing: border-box;
	min-width: 0;
	order: 1;
}

.cnc-article-sidebar {
	flex: 0 0 25%;
	max-width: 25%;
	width: 25%;
	padding: 0 12px;
	box-sizing: border-box;
	order: 2;
	align-self: flex-start;
}

.cnc-article {
	margin: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.cnc-article__content {
	color: var(--color-gray, #555555);
	font-family: inherit;
	font-size: 1.125rem;
	line-height: 1.8;
}

.cnc-article__content > p:empty {
	display: none;
}

.cnc-article__content p {
	margin: 0 0 1.1em;
}

.cnc-article__content h2,
.cnc-article__content h3 {
	margin: 1.8em 0 0.7em;
	color: var(--color-black, #0a0a0a);
	font-family: var(--font-heading, Montserrat, system-ui, sans-serif);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.cnc-article__content h2 {
	font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.cnc-article__content h3 {
	font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.cnc-article__content a {
	color: var(--color-black, #0a0a0a);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.cnc-article__content ul,
.cnc-article__content ol {
	margin: 0 0 1.2em 1.35em;
	padding: 0;
}

.cnc-article__content li {
	margin-bottom: 0.45em;
}

.cnc-article__content img {
	max-width: 100%;
	width: 100%;
	height: auto !important;
	border-radius: 14px;
	contain-intrinsic-size: auto !important;
}

.cnc-article__content figure {
	margin: 1.5rem auto;
}

.cnc-article__content table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	border: 1px solid #e5e7eb;
	background: #fff;
	font-size: 0.95rem;
}

.cnc-article__content th,
.cnc-article__content td {
	border: 1px solid #e5e7eb;
	padding: 0.75rem 0.9rem;
	text-align: left;
	vertical-align: top;
}

.cnc-article__content th {
	background: #f1f5f9;
	font-weight: 700;
}

/* Sidebar modules */
.cnc-sidebar-module {
	margin-bottom: 1.25rem;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	padding: 1.1rem 1.15rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cnc-sidebar-module__title {
	margin: 0 0 0.8rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--color-black, #0a0a0a);
	color: var(--color-black, #0a0a0a);
	font-family: var(--font-heading, Montserrat, system-ui, sans-serif);
	font-size: 1.02rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.cnc-sidebar-module__list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.cnc-sidebar-module__list li {
	margin: 0 !important;
	padding: 0.55rem 0;
	list-style: none !important;
	border-bottom: 1px solid #e5e7eb;
}

.cnc-sidebar-module__list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.cnc-sidebar-module__list a {
	display: block;
	color: #334155 !important;
	font-size: 0.92rem;
	font-weight: 400 !important;
	line-height: 1.5;
	text-decoration: none !important;
}

.cnc-sidebar-module__list a:hover {
	color: var(--color-black, #0a0a0a) !important;
	text-decoration: underline !important;
	text-underline-offset: 0.18em;
}

.cnc-sidebar-module__empty {
	margin: 0;
	color: #94a3b8;
	font-size: 0.9rem;
}

/* Quote CTA band */
.cnc-article-quote-cta {
	margin-top: clamp(2rem, 4vw, 3.5rem);
	margin-bottom: 0;
	background: var(--color-dark-gray, #1a1a1a);
	color: #fff;
}

/* Remove light gap between dark CTA and dark footer. */
body.single .footer,
body.single-post .footer {
	margin-top: 0 !important;
	border-top: 0;
}

.cnc-article-quote-cta__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
}

.cnc-article-quote-cta__copy h2 {
	margin: 0 0 0.4rem;
	color: #fff;
	font-family: var(--font-heading, Montserrat, system-ui, sans-serif);
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.cnc-article-quote-cta__copy p {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 1rem;
	line-height: 1.5;
	max-width: 42rem;
}

.cnc-article-quote-cta .btn {
	flex-shrink: 0;
	white-space: nowrap;
}

@media (max-width: 991px) {
	.cnc-article-layout__main,
	.cnc-article-sidebar {
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
	}

	.cnc-article-sidebar {
		order: 3;
		margin-top: 1.5rem;
	}
}

@media (max-width: 640px) {
	.cnc-article__title {
		font-size: 1.65rem;
	}

	.cnc-article-quote-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}
