/**
 * Register Corp BD — Blog Single Post styles.
 *
 * Builds on the design tokens defined in registercorp-home.css
 * (--rcbd-*). Only blog-specific additions live here; shared shell,
 * hero, card, panel, and button styles are inherited from the home CSS.
 */

/* ---------------------------------------------------------------------
 * Reveal safety net.
 *
 * The shared .rcbd-reveal* classes start at opacity:0 and rely on the
 * home page's IntersectionObserver (threshold 0.15) to add .is-active.
 * A long article card is taller than the viewport, so 15% of it is never
 * visible at once and the reveal never fires — leaving the body blank.
 * On the blog single page we force these elements visible regardless of
 * JS so content is NEVER hidden. Any reveal animation is purely additive.
 * ------------------------------------------------------------------- */
.rcbd-blog-single-main .rcbd-reveal,
.rcbd-blog-single-main .rcbd-reveal-left,
.rcbd-blog-single-main .rcbd-reveal-right,
.rcbd-blog-single-main .rcbd-blog-article,
.rcbd-blog-single-main .rcbd-page-sidebar {
	opacity: 1 !important;
	transform: none !important;
}

/* ---------------------------------------------------------------------
 * Hero byline
 * ------------------------------------------------------------------- */
.rcbd-blog-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	margin-top: 22px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.95rem;
}

.rcbd-blog-byline .rcbd-blog-byline-author {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 600;
	color: #ffffff;
}

.rcbd-blog-byline-avatar img,
.rcbd-blog-byline-avatar .avatar {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid rgba(201, 168, 76, 0.6);
	object-fit: cover;
}

.rcbd-blog-byline-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rcbd-blog-byline-item i {
	color: var(--rcbd-secondary);
	font-size: 0.9rem;
}

.rcbd-blog-byline-item a {
	color: inherit;
	text-decoration: none;
}

.rcbd-blog-byline-item a:hover {
	color: #ffffff;
}

.rcbd-blog-byline-sep {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
}

/* ---------------------------------------------------------------------
 * Article body — long-form reading typography
 * ------------------------------------------------------------------- */
.rcbd-blog-article .rcbd-page-richtext {
	font-size: 1.075rem;
	line-height: 1.85;
	color: var(--rcbd-text);
}

.rcbd-blog-article .rcbd-page-richtext > *:first-child {
	margin-top: 0;
}

.rcbd-blog-article .rcbd-page-richtext h2 {
	font-family: 'Playfair Display', serif;
	font-size: 1.85rem;
	line-height: 1.25;
	color: var(--rcbd-primary);
	margin: 2.4rem 0 1rem;
	scroll-margin-top: calc(var(--rcbd-admin-offset, 0px) + 110px);
	position: relative;
	padding-left: 18px;
}

.rcbd-blog-article .rcbd-page-richtext h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	bottom: 0.2em;
	width: 5px;
	border-radius: 4px;
	background: var(--rcbd-gradient-2);
}

.rcbd-blog-article .rcbd-page-richtext h3 {
	font-family: 'Playfair Display', serif;
	font-size: 1.4rem;
	line-height: 1.3;
	color: var(--rcbd-primary-light);
	margin: 2rem 0 0.85rem;
	scroll-margin-top: calc(var(--rcbd-admin-offset, 0px) + 110px);
}

.rcbd-blog-article .rcbd-page-richtext h4 {
	font-size: 1.15rem;
	color: var(--rcbd-primary-light);
	margin: 1.6rem 0 0.7rem;
}

.rcbd-blog-article .rcbd-page-richtext p {
	margin: 0 0 1.4rem;
}

.rcbd-blog-article .rcbd-page-richtext a {
	color: var(--rcbd-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease;
}

.rcbd-blog-article .rcbd-page-richtext a:hover {
	color: var(--rcbd-primary);
}

.rcbd-blog-article .rcbd-page-richtext ul,
.rcbd-blog-article .rcbd-page-richtext ol {
	margin: 0 0 1.5rem;
	padding-left: 1.4rem;
}

.rcbd-blog-article .rcbd-page-richtext li {
	margin-bottom: 0.6rem;
}

.rcbd-blog-article .rcbd-page-richtext img,
.rcbd-blog-article .rcbd-page-richtext figure {
	max-width: 100%;
	height: auto;
	border-radius: var(--rcbd-radius);
	margin: 1.8rem 0;
}

.rcbd-blog-article .rcbd-page-richtext figure img {
	margin: 0;
}

.rcbd-blog-article .rcbd-page-richtext figcaption {
	font-size: 0.9rem;
	color: var(--rcbd-text-light);
	text-align: center;
	margin-top: 0.6rem;
}

.rcbd-blog-article .rcbd-page-richtext blockquote {
	margin: 1.8rem 0;
	padding: 1.4rem 1.6rem;
	border-left: 4px solid var(--rcbd-secondary);
	background: var(--rcbd-light);
	border-radius: 0 var(--rcbd-radius) var(--rcbd-radius) 0;
	font-size: 1.15rem;
	font-style: italic;
	color: var(--rcbd-primary);
}

.rcbd-blog-article .rcbd-page-richtext blockquote p:last-child {
	margin-bottom: 0;
}

.rcbd-blog-article .rcbd-page-richtext pre {
	background: var(--rcbd-dark);
	color: #f1f5f9;
	padding: 1.2rem 1.4rem;
	border-radius: var(--rcbd-radius);
	overflow-x: auto;
	font-size: 0.92rem;
	margin: 1.6rem 0;
}

.rcbd-blog-article .rcbd-page-richtext code {
	font-family: 'Courier New', monospace;
	background: rgba(11, 29, 58, 0.07);
	color: var(--rcbd-accent-2);
	padding: 0.15em 0.4em;
	border-radius: 6px;
	font-size: 0.92em;
}

.rcbd-blog-article .rcbd-page-richtext pre code {
	background: none;
	color: inherit;
	padding: 0;
}

.rcbd-blog-article .rcbd-page-richtext table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.6rem 0;
	font-size: 0.98rem;
}

.rcbd-blog-article .rcbd-page-richtext th,
.rcbd-blog-article .rcbd-page-richtext td {
	border: 1px solid var(--rcbd-border);
	padding: 0.7rem 0.9rem;
	text-align: left;
}

.rcbd-blog-article .rcbd-page-richtext th {
	background: var(--rcbd-light);
	color: var(--rcbd-primary);
	font-weight: 600;
}

/* ---------------------------------------------------------------------
 * Tags + Share row
 * ------------------------------------------------------------------- */
.rcbd-blog-footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	margin-top: 2rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--rcbd-border);
}

.rcbd-blog-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.rcbd-blog-tags-label {
	font-weight: 600;
	color: var(--rcbd-primary);
	margin-right: 4px;
}

.rcbd-blog-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--rcbd-light);
	border: 1px solid var(--rcbd-border);
	color: var(--rcbd-accent-2);
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
	transition: var(--rcbd-transition);
}

.rcbd-blog-tag:hover {
	background: var(--rcbd-primary);
	border-color: var(--rcbd-primary);
	color: #ffffff;
}

.rcbd-blog-share {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rcbd-blog-share-label {
	font-weight: 600;
	color: var(--rcbd-primary);
}

.rcbd-blog-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--rcbd-light);
	border: 1px solid var(--rcbd-border);
	color: var(--rcbd-primary);
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
	transition: var(--rcbd-transition);
}

.rcbd-blog-share-btn:hover {
	transform: translateY(-3px);
	background: var(--rcbd-primary);
	border-color: var(--rcbd-primary);
	color: #ffffff;
	box-shadow: var(--rcbd-shadow-md);
}

.rcbd-blog-share-btn.is-copied {
	background: var(--rcbd-secondary);
	border-color: var(--rcbd-secondary);
	color: var(--rcbd-primary);
}

/* ---------------------------------------------------------------------
 * Author bio card
 * ------------------------------------------------------------------- */
.rcbd-blog-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
}

.rcbd-blog-author-avatar img,
.rcbd-blog-author-avatar .avatar {
	display: block;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--rcbd-light);
	box-shadow: var(--rcbd-shadow-sm);
}

.rcbd-blog-author-body {
	flex: 1;
	min-width: 0;
}

.rcbd-blog-author-kicker {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--rcbd-secondary);
	margin: 0 0 4px;
}

.rcbd-blog-author-name {
	font-family: 'Playfair Display', serif;
	font-size: 1.35rem;
	color: var(--rcbd-primary);
	margin: 0 0 8px;
}

.rcbd-blog-author-bio {
	color: var(--rcbd-text-light);
	margin: 0 0 12px;
	line-height: 1.7;
}

.rcbd-blog-author-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rcbd-accent);
	font-weight: 600;
	text-decoration: none;
	font-size: 0.92rem;
}

.rcbd-blog-author-link:hover {
	color: var(--rcbd-primary);
}

/* ---------------------------------------------------------------------
 * Prev / next post navigation
 * ------------------------------------------------------------------- */
.rcbd-blog-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.rcbd-blog-postnav-link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	border: 1px solid var(--rcbd-border);
	border-radius: var(--rcbd-radius);
	background: var(--rcbd-white);
	text-decoration: none;
	transition: var(--rcbd-transition);
}

.rcbd-blog-postnav-link:hover {
	border-color: var(--rcbd-primary);
	box-shadow: var(--rcbd-shadow-md);
	transform: translateY(-2px);
}

.rcbd-blog-postnav-link.is-next {
	text-align: right;
	align-items: flex-end;
}

.rcbd-blog-postnav-dir {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	color: var(--rcbd-secondary);
}

.rcbd-blog-postnav-title {
	font-weight: 600;
	color: var(--rcbd-primary);
	line-height: 1.4;
}

/* ---------------------------------------------------------------------
 * Related posts grid
 * ------------------------------------------------------------------- */
.rcbd-blog-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.rcbd-blog-related-card {
	display: flex;
	flex-direction: column;
	background: var(--rcbd-white);
	border: 1px solid var(--rcbd-border);
	border-radius: var(--rcbd-radius);
	overflow: hidden;
	text-decoration: none;
	transition: var(--rcbd-transition);
	height: 100%;
}

.rcbd-blog-related-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rcbd-shadow-lg);
	border-color: transparent;
}

.rcbd-blog-related-media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--rcbd-light);
}

.rcbd-blog-related-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.rcbd-blog-related-card:hover .rcbd-blog-related-media img {
	transform: scale(1.06);
}

.rcbd-blog-related-media-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rcbd-gradient-3);
	color: rgba(255, 255, 255, 0.55);
	font-size: 1.8rem;
}

.rcbd-blog-related-body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.rcbd-blog-related-cat {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 600;
	color: var(--rcbd-secondary);
}

.rcbd-blog-related-title {
	font-family: 'Playfair Display', serif;
	font-size: 1.12rem;
	line-height: 1.35;
	color: var(--rcbd-primary);
	margin: 0;
}

.rcbd-blog-related-date {
	margin-top: auto;
	font-size: 0.82rem;
	color: var(--rcbd-text-light);
}

/* ---------------------------------------------------------------------
 * Sidebar — Table of contents
 * ------------------------------------------------------------------- */
.rcbd-blog-toc {
	position: sticky;
	top: calc(var(--rcbd-admin-offset, 0px) + 100px);
}

.rcbd-blog-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rcbd-blog-toc-list li {
	margin: 0;
}

.rcbd-blog-toc-list a {
	display: block;
	padding: 7px 12px;
	border-left: 2px solid var(--rcbd-border);
	color: var(--rcbd-text-light);
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.45;
	transition: var(--rcbd-transition);
}

.rcbd-blog-toc-list a:hover,
.rcbd-blog-toc-list a.is-active {
	border-left-color: var(--rcbd-secondary);
	color: var(--rcbd-primary);
	background: var(--rcbd-light);
}

.rcbd-blog-toc-list .rcbd-blog-toc-h3 a {
	padding-left: 24px;
	font-size: 0.86rem;
}

/* ---------------------------------------------------------------------
 * Sidebar — Recent posts
 * ------------------------------------------------------------------- */
.rcbd-blog-recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.rcbd-blog-recent-item a {
	display: flex;
	gap: 12px;
	align-items: center;
	text-decoration: none;
}

.rcbd-blog-recent-thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--rcbd-light);
}

.rcbd-blog-recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcbd-blog-recent-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rcbd-gradient-3);
	color: rgba(255, 255, 255, 0.5);
}

.rcbd-blog-recent-meta {
	min-width: 0;
}

.rcbd-blog-recent-title {
	font-weight: 600;
	color: var(--rcbd-primary);
	font-size: 0.95rem;
	line-height: 1.4;
	margin: 0 0 3px;
	transition: color 0.2s ease;
}

.rcbd-blog-recent-item a:hover .rcbd-blog-recent-title {
	color: var(--rcbd-accent);
}

.rcbd-blog-recent-date {
	font-size: 0.8rem;
	color: var(--rcbd-text-light);
}

/* ---------------------------------------------------------------------
 * Comments
 * ------------------------------------------------------------------- */
.rcbd-blog-comments .comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rcbd-blog-comments .comment-list ol.children {
	list-style: none;
	margin: 0 0 0 32px;
	padding: 0;
}

.rcbd-blog-comments .ast-comment {
	padding: 20px 0;
	border-bottom: 1px solid var(--rcbd-border);
}

.rcbd-blog-comments .ast-comment-info {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 10px;
}

.rcbd-blog-comments .ast-comment-avatar-wrap img {
	border-radius: 50%;
}

.rcbd-blog-comments .ast-comment-author .fn {
	color: var(--rcbd-primary);
	font-style: normal;
}

.rcbd-blog-comments .ast-comment-time {
	font-size: 0.82rem;
	color: var(--rcbd-text-light);
}

.rcbd-blog-comments .comment-respond {
	margin-top: 28px;
	padding: 26px;
	background: var(--rcbd-light);
	border-radius: var(--rcbd-radius);
}

.rcbd-blog-comments .comment-reply-title {
	font-family: 'Playfair Display', serif;
	color: var(--rcbd-primary);
	margin-top: 0;
}

.rcbd-blog-comments input[type="text"],
.rcbd-blog-comments input[type="email"],
.rcbd-blog-comments input[type="url"],
.rcbd-blog-comments textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--rcbd-border);
	border-radius: 10px;
	font-family: inherit;
	font-size: 0.95rem;
	margin-bottom: 14px;
	background: var(--rcbd-white);
}

.rcbd-blog-comments input:focus,
.rcbd-blog-comments textarea:focus {
	outline: none;
	border-color: var(--rcbd-accent);
	box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.12);
}

.rcbd-blog-comments .form-submit .submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 26px;
	border: none;
	border-radius: 999px;
	background: var(--rcbd-gradient-1);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: var(--rcbd-transition);
}

.rcbd-blog-comments .form-submit .submit:hover {
	box-shadow: var(--rcbd-shadow-md);
	transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
 * Section card heads shared with the article
 * ------------------------------------------------------------------- */
.rcbd-blog-section-title {
	font-family: 'Playfair Display', serif;
	font-size: 1.5rem;
	color: var(--rcbd-primary);
	margin: 0 0 1.3rem;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.rcbd-blog-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rcbd-blog-toc {
		position: static;
	}
}

@media (max-width: 768px) {
	.rcbd-blog-related-grid {
		grid-template-columns: 1fr;
	}

	.rcbd-blog-postnav {
		grid-template-columns: 1fr;
	}

	.rcbd-blog-postnav-link.is-next {
		text-align: left;
		align-items: flex-start;
	}

	.rcbd-blog-footer-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.rcbd-blog-author {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}

	.rcbd-blog-article .rcbd-page-richtext {
		font-size: 1.02rem;
	}

	.rcbd-blog-article .rcbd-page-richtext h2 {
		font-size: 1.55rem;
	}
}

/* Collapsible TOC on mobile via <details> */
.rcbd-blog-toc-details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--rcbd-primary);
	list-style: none;
}

.rcbd-blog-toc-details summary::-webkit-details-marker {
	display: none;
}
