/*
 * BuildBarn editorial system.
 * Covers post archives, blog home, single posts and non-product search results.
 */

html body.bb-page-family-blog #main {
	background:
		radial-gradient(circle at top right, rgba(143, 95, 53, 0.07), transparent 28%),
		var(--bb-bg-page, #f5f5f3) !important;
}

html body.bb-page-family-blog .page-top {
	background: transparent !important;
	border-bottom: 0 !important;
	padding-top: clamp(1.15rem, 2.8vw, 1.8rem) !important;
	padding-bottom: clamp(0.95rem, 2.2vw, 1.35rem) !important;
}

html body.bb-page-family-blog .page-top .page-title {
	font-size: clamp(1.8rem, 3vw, 2.7rem) !important;
	line-height: 1.08 !important;
	letter-spacing: -0.03em !important;
	color: var(--bb-text-primary, #221d18) !important;
}

html body.bb-page-family-blog .page-top .breadcrumbs-wrap,
html body.bb-page-family-blog .page-top .breadcrumbs-wrap a {
	color: var(--bb-text-secondary, #66594b) !important;
}

html body.bb-page-family-blog .bb-entry-shell {
	width: var(--bb-container-width, min(1320px, calc(100% - 32px)));
	margin: 0 auto clamp(2rem, 5vw, 3rem);
}

html body.bb-page-family-blog .bb-entry-shell--article {
	padding: clamp(1.25rem, 2.5vw, 1.9rem);
	border-radius: var(--bb-radius-hero, 28px);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, #faf8f5 100%);
	border: 1px solid var(--bb-border-soft, rgba(69, 69, 69, 0.12));
	box-shadow: var(--bb-shadow-lg);
}

html body.bb-page-family-blog .bb-entry-shell--article .bb-entry-shell__content {
	max-width: min(760px, 100%);
	margin: 0 auto;
}

html body.bb-page-family-blog.single-post article.post,
html body.bb-page-family-blog.single-post .post-item,
html body.bb-page-family-blog.single-post .blog-posts article,
html body.bb-page-family-blog.single-post .posts-container article {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

html body.bb-page-family-blog.single-post .bb-entry-shell--article {
	width: 100%;
	margin: 0 auto clamp(2rem, 5vw, 3rem);
}

html body.bb-page-family-blog.single-post .post-meta,
html body.bb-page-family-blog.single-post .entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.7rem;
	margin-bottom: 1rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid rgba(69, 69, 69, 0.1);
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content h2 {
	margin-top: 2rem;
	font-size: clamp(1.45rem, 2.4vw, 1.95rem);
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content h3 {
	margin-top: 1.45rem;
	font-size: clamp(1.12rem, 1.8vw, 1.4rem);
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content ul,
html body.bb-page-family-blog.single-post .bb-entry-shell__content ol {
	padding-left: 1.25rem;
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content table {
	width: 100%;
	border-collapse: collapse;
	overflow: hidden;
	border-radius: var(--bb-radius-md, 16px);
	border: 1px solid rgba(69, 69, 69, 0.1);
	box-shadow: var(--bb-shadow-sm);
	background: #ffffff;
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content table th,
html body.bb-page-family-blog.single-post .bb-entry-shell__content table td {
	padding: 0.85rem 0.95rem;
	border-bottom: 1px solid rgba(69, 69, 69, 0.08);
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content table th {
	background: rgba(69, 69, 69, 0.04);
	color: var(--bb-text-primary, #221d18);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

html body.bb-page-family-blog.single-post #respond,
html body.bb-page-family-blog.single-post .related-posts {
	padding: clamp(1rem, 2vw, 1.25rem);
	border-radius: var(--bb-radius-xl, 22px);
	background: linear-gradient(180deg, #ffffff 0%, #fafaf8 100%);
	border: 1px solid rgba(69, 69, 69, 0.12);
	box-shadow: var(--bb-shadow-sm);
}

html body.bb-page-family-blog.single-post #respond input,
html body.bb-page-family-blog.single-post #respond textarea {
	border-radius: 12px;
	border: 1px solid rgba(69, 69, 69, 0.16);
}

html body.bb-page-family-blog article.post,
html body.bb-page-family-blog .post-item,
html body.bb-page-family-blog .blog-posts article,
html body.bb-page-family-blog .posts-container article {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	column-gap: 1rem;
	row-gap: 0.7rem;
	align-items: start;
	margin-bottom: 1.2rem;
	padding: clamp(1rem, 2vw, 1.25rem);
	border-radius: var(--bb-radius-xl, 22px);
	background: var(--bb-bg-section, linear-gradient(180deg, #ffffff 0%, #fafaf8 100%));
	border: 1px solid var(--bb-border-soft, rgba(69, 69, 69, 0.12));
	box-shadow: var(--bb-shadow-md);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

html body.bb-page-family-blog .post-date {
	grid-column: 1;
	grid-row: 1 / span 3;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 64px;
	min-height: 84px;
	padding: 0.45rem 0.25rem;
	border-radius: var(--bb-radius-lg, 18px);
	background: linear-gradient(180deg, rgba(143, 95, 53, 0.12) 0%, rgba(143, 95, 53, 0.04) 100%);
	border: 1px solid rgba(143, 95, 53, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

html body.bb-page-family-blog .post-date .day {
	color: var(--bb-text-primary, #221d18);
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1;
}

html body.bb-page-family-blog .post-date .month {
	margin-top: 0.2rem;
	color: var(--bb-brand-accent-strong, #6f4521);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
}

html body.bb-page-family-blog .post-content,
html body.bb-page-family-blog .post-meta,
html body.bb-page-family-blog article.post > a.btn,
html body.bb-page-family-blog article.post > a.button {
	grid-column: 2;
	min-width: 0;
}

html body.bb-page-family-blog .post-content {
	display: grid;
	gap: 0.6rem;
}

html body.bb-page-family-blog article.post:hover,
html body.bb-page-family-blog .post-item:hover,
html body.bb-page-family-blog .blog-posts article:hover,
html body.bb-page-family-blog .posts-container article:hover {
	transform: translateY(-3px);
	box-shadow: var(--bb-shadow-md);
}

html body.bb-page-family-blog article.post .entry-title,
html body.bb-page-family-blog article.post .post-title,
html body.bb-page-family-blog .post-item .entry-title,
html body.bb-page-family-blog .blog-posts article .entry-title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.2rem, 2vw, 1.65rem);
	line-height: 1.14;
	letter-spacing: -0.03em;
}

html body.bb-page-family-blog article.post .entry-title a,
html body.bb-page-family-blog article.post .post-title a,
html body.bb-page-family-blog .post-item .entry-title a,
html body.bb-page-family-blog .blog-posts article .entry-title a {
	color: var(--bb-text-primary, #221d18) !important;
	text-decoration: none;
}

html body.bb-page-family-blog .post-meta,
html body.bb-page-family-blog .entry-meta,
html body.bb-page-family-blog .post-date,
html body.bb-page-family-blog .post-author,
html body.bb-page-family-blog .post-category {
	color: var(--bb-text-muted, #7a6d61) !important;
	font-size: 0.82rem !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

html body.bb-page-family-blog .post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.7rem;
	padding-top: 0.15rem;
	border-top: 1px solid rgba(69, 69, 69, 0.08);
}

html body.bb-page-family-blog .post-meta a,
html body.bb-page-family-blog .entry-meta a {
	color: inherit !important;
	text-decoration: none;
}

html body.bb-page-family-blog .entry-content p,
html body.bb-page-family-blog .post-content p,
html body.bb-page-family-blog .bb-entry-shell__content p,
html body.bb-page-family-blog .bb-entry-shell__content li {
	color: var(--bb-text-secondary, #66594b);
	line-height: 1.8;
}

html body.bb-page-family-blog .post-excerpt {
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

html body.bb-page-family-blog .more-link,
html body.bb-page-family-blog a.read-more,
html body.bb-page-family-blog .read-more a,
html body.bb-page-family-blog article.post > a.btn,
html body.bb-page-family-blog article.post > a.button {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	justify-self: start;
	min-height: 38px;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	color: var(--bb-brand-accent-strong, #6f4521) !important;
	font-weight: 700 !important;
	text-decoration: none;
	background: rgba(143, 95, 53, 0.08);
	border: 1px solid rgba(143, 95, 53, 0.14);
}

html body.bb-page-family-blog .more-link::after,
html body.bb-page-family-blog a.read-more::after,
html body.bb-page-family-blog .read-more a::after,
html body.bb-page-family-blog article.post > a.btn::after,
html body.bb-page-family-blog article.post > a.button::after {
	content: "→";
}

html body.bb-page-family-blog .widget,
html body.bb-page-family-blog .sidebar .widget {
	padding: 1rem 1.05rem;
	border-radius: var(--bb-radius-lg, 18px);
	background: var(--bb-bg-section, linear-gradient(180deg, #ffffff 0%, #fafaf8 100%));
	border: 1px solid var(--bb-border-soft, rgba(69, 69, 69, 0.12));
	box-shadow: var(--bb-shadow-sm);
}

html body.bb-page-family-blog .widget + .widget {
	margin-top: 1rem;
}

html body.bb-page-family-blog .widget-title,
html body.bb-page-family-blog .sidebar .widget-title {
	margin-top: 0;
	margin-bottom: 0.8rem;
	color: var(--bb-text-primary, #221d18);
	font-size: 1rem;
	letter-spacing: -0.02em;
}

@media (min-width: 768px) and (max-width: 991px) {
	html body.bb-page-family-blog .bb-entry-shell {
		width: min(100% - 24px, 1320px);
	}

	html body.bb-page-family-blog article.post,
	html body.bb-page-family-blog .post-item,
	html body.bb-page-family-blog .blog-posts article,
	html body.bb-page-family-blog .posts-container article {
		grid-template-columns: 68px minmax(0, 1fr);
		column-gap: 0.9rem;
		row-gap: 0.6rem;
		padding: 1rem;
		border-radius: var(--bb-radius-xl, 22px);
	}

	html body.bb-page-family-blog .post-date {
		width: 58px;
		min-height: 78px;
		border-radius: var(--bb-radius-md, 16px);
	}

	html body.bb-page-family-blog .post-date .day {
		font-size: 1.04rem;
	}

	html body.bb-page-family-blog .post-date .month {
		font-size: 0.66rem;
	}

	html body.bb-page-family-blog article.post .entry-title,
	html body.bb-page-family-blog article.post .post-title,
	html body.bb-page-family-blog .post-item .entry-title,
	html body.bb-page-family-blog .blog-posts article .entry-title {
		font-size: 1.28rem;
	}

	html body.bb-page-family-blog .post-meta {
		gap: 0.3rem 0.55rem;
		font-size: 0.76rem !important;
	}
}

@media (min-width: 1200px) {
	html body.bb-page-family-blog .bb-entry-shell {
		width: var(--bb-container-width, min(1320px, calc(100% - 32px)));
	}

	html body.bb-page-family-blog article.post,
	html body.bb-page-family-blog .post-item,
	html body.bb-page-family-blog .blog-posts article,
	html body.bb-page-family-blog .posts-container article {
		padding: 1.15rem 1.2rem;
	}

	html body.bb-page-family-blog article.post .entry-title,
	html body.bb-page-family-blog article.post .post-title,
	html body.bb-page-family-blog .post-item .entry-title,
	html body.bb-page-family-blog .blog-posts article .entry-title {
		max-width: 24ch;
	}
}

@media (max-width: 767px) {
	html body.bb-page-family-blog .bb-entry-shell {
		width: min(100% - 20px, 1320px);
	}

	html body.bb-page-family-blog article.post,
	html body.bb-page-family-blog .post-item,
	html body.bb-page-family-blog .blog-posts article,
	html body.bb-page-family-blog .posts-container article {
		grid-template-columns: 60px minmax(0, 1fr);
		column-gap: 0.75rem;
		row-gap: 0.55rem;
		padding: 0.9rem;
		border-radius: 18px;
	}

	html body.bb-page-family-blog .post-date {
		width: 52px;
		min-height: 72px;
		border-radius: 16px;
	}

	html body.bb-page-family-blog .post-date .day {
		font-size: 1rem;
	}

	html body.bb-page-family-blog .post-date .month {
		font-size: 0.64rem;
	}

	html body.bb-page-family-blog article.post .entry-title,
	html body.bb-page-family-blog article.post .post-title,
	html body.bb-page-family-blog .post-item .entry-title,
	html body.bb-page-family-blog .blog-posts article .entry-title {
		font-size: 1.12rem;
	}

	html body.bb-page-family-blog .post-meta {
		gap: 0.28rem 0.5rem;
		font-size: 0.74rem !important;
	}

	html body.bb-page-family-blog article.post > a.btn,
	html body.bb-page-family-blog article.post > a.button {
		min-height: 36px;
		padding: 0.5rem 0.8rem;
		font-size: 0.76rem;
	}

	html body.bb-page-family-blog .bb-entry-shell--article {
		padding: 1rem;
		border-radius: var(--bb-radius-xl, 22px);
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell {
		width: min(100% - 12px, 1320px);
	}

	html body.bb-page-family-blog.single-post article.post,
	html body.bb-page-family-blog.single-post .post-item,
	html body.bb-page-family-blog.single-post .blog-posts article,
	html body.bb-page-family-blog.single-post .posts-container article {
		display: block;
	}

	html body.bb-page-family-blog.single-post .post-content,
	html body.bb-page-family-blog.single-post .entry-content {
		display: block;
		width: 100%;
		min-width: 0;
	}

	html body.bb-page-family-blog.single-post .post-date {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 0.35rem;
		width: auto;
		min-height: 0;
		margin: 0 0 0.9rem;
		padding: 0.45rem 0.7rem;
		border-radius: 12px;
	}

	html body.bb-page-family-blog.single-post .post-date .month {
		margin-top: 0;
	}

	html body.bb-page-family-blog.single-post article.post .entry-title,
	html body.bb-page-family-blog.single-post article.post .post-title {
		font-size: 1.95rem;
		line-height: 1.08;
		letter-spacing: -0.04em;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	html body.bb-page-family-blog.single-post .post-meta,
	html body.bb-page-family-blog.single-post .entry-meta {
		display: flex !important;
		width: 100%;
		float: none;
		clear: both;
		gap: 0.35rem 0.6rem;
		margin: 0 0 0.95rem;
		padding-bottom: 0.8rem;
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell--article {
		padding: 0.9rem;
		border-radius: var(--bb-radius-xl, 22px);
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell__content {
		max-width: 100%;
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell__content h2 {
		font-size: 1.24rem;
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell__content h3 {
		font-size: 1.06rem;
	}

	html body.bb-page-family-blog.single-post .page-top .page-title,
	html body.bb-page-family-blog.single-post .page-top .breadcrumbs-wrap {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	html body.bb-page-family-blog.single-post .bb-entry-shell__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	html body.bb-page-family-blog.single-post #respond,
	html body.bb-page-family-blog.single-post .related-posts {
		padding: 0.9rem;
		border-radius: var(--bb-radius-lg, 18px);
	}
}

/* --------------------------------------------------------------------------
 * Brand unification layer (blog/editorial)
 * -------------------------------------------------------------------------- */
html body.bb-page-family-blog {
	font-family: var(--bb-font-sans, inherit);
}

html body.bb-page-family-blog .page-title,
html body.bb-page-family-blog h1,
html body.bb-page-family-blog h2,
html body.bb-page-family-blog h3 {
	font-family: var(--bb-font-heading, inherit);
}

html body.bb-page-family-blog .post-date {
	background: linear-gradient(180deg, rgba(69, 69, 69, 0.13) 0%, rgba(69, 69, 69, 0.05) 100%);
	border-color: rgba(69, 69, 69, 0.24);
}

html body.bb-page-family-blog .post-date .month,
html body.bb-page-family-blog .post-meta a,
html body.bb-page-family-blog .entry-meta a {
	color: var(--bb-brand-primary, #454545) !important;
}

html body.bb-page-family-blog a:hover {
	color: var(--bb-brand-accent-strong, #6f6358) !important;
}

/* --------------------------------------------------------------------------
 * Phase 3: page shell alignment to footer tone
 * -------------------------------------------------------------------------- */
html body.bb-page-family-blog #main {
	background: linear-gradient(180deg, var(--bb-shell-bg, #1f1a16) 0%, var(--bb-shell-bg-2, #18130f) 100%) !important;
}

html body.bb-page-family-blog .page-top {
	background: rgba(255, 255, 255, 0.03) !important;
	border-bottom: 1px solid var(--bb-shell-border-soft, rgba(255, 255, 255, 0.1)) !important;
}

html body.bb-page-family-blog .bb-entry-shell,
html body.bb-page-family-blog .bb-entry-shell--article,
html body.bb-page-family-blog article.post,
html body.bb-page-family-blog .post-item,
html body.bb-page-family-blog .blog-posts article,
html body.bb-page-family-blog .posts-container article,
html body.bb-page-family-blog .widget,
html body.bb-page-family-blog .sidebar .widget {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
	border-color: var(--bb-shell-border, rgba(255, 255, 255, 0.12)) !important;
}

html body.bb-page-family-blog .page-title,
html body.bb-page-family-blog h1,
html body.bb-page-family-blog h2,
html body.bb-page-family-blog h3,
html body.bb-page-family-blog article.post .entry-title a,
html body.bb-page-family-blog article.post .post-title a {
	color: var(--bb-shell-text-strong, #fff8f0) !important;
}

html body.bb-page-family-blog .post-meta,
html body.bb-page-family-blog .entry-meta,
html body.bb-page-family-blog .post-content p,
html body.bb-page-family-blog .entry-content p,
html body.bb-page-family-blog .bb-entry-shell__content p,
html body.bb-page-family-blog .bb-entry-shell__content li {
	color: var(--bb-shell-text-muted, rgba(247, 239, 231, 0.76)) !important;
}

/* --------------------------------------------------------------------------
 * Phase 4: component-level convergence to footer tone
 * -------------------------------------------------------------------------- */
html body.bb-page-family-blog.single-post .bb-entry-shell__content table,
html body.bb-page-family-blog.single-post #respond,
html body.bb-page-family-blog.single-post .related-posts,
html body.bb-page-family-blog .post-date {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
	border-color: var(--bb-shell-border, rgba(255, 255, 255, 0.12)) !important;
}

html body.bb-page-family-blog.single-post .bb-entry-shell__content table th {
	background: rgba(255, 255, 255, 0.08) !important;
	color: var(--bb-shell-text-strong, #fff8f0) !important;
}

html body.bb-page-family-blog.single-post #respond input,
html body.bb-page-family-blog.single-post #respond textarea {
	background: rgba(255, 255, 255, 0.05) !important;
	color: var(--bb-shell-text-strong, #fff8f0) !important;
	border-color: var(--bb-shell-border, rgba(255, 255, 255, 0.12)) !important;
}

html body.bb-page-family-blog .post-date .day,
html body.bb-page-family-blog .post-date .month,
html body.bb-page-family-blog .post-meta a,
html body.bb-page-family-blog .entry-meta a {
	color: var(--bb-shell-text-strong, #fff8f0) !important;
}
