/* ==========================================================================
   Jinw Blog Module — 前台样式
   配色取自站点现有视觉：米色底 #f5f5eb / 墨色字 #20252d / 主色蓝 #0a7aff
   ========================================================================== */

.jb-section,
.jb-single-wrap,
.jb-post,
.jb-widget,
.jb-card {
	--jb-bg: #f5f5eb;
	--jb-card: #ffffff;
	--jb-ink: #20252d;
	--jb-text: #575a7b;
	--jb-muted: #8a8fa3;
	--jb-blue: #0a7aff;
	--jb-blue-dark: #0861cc;
	--jb-line: rgba(32, 37, 45, 0.09);
	--jb-radius: 16px;
}

.jb-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

.jb-section,
.jb-single-wrap {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: var(--jb-text);
	-webkit-font-smoothing: antialiased;
}

.jb-section {
	background: transparent;
	padding: 70px 0 96px;
}

.jb-section *,
.jb-single-wrap * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- 筛选栏 */
.jb-filter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.jb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.jb-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--jb-line);
	color: #4a4f66;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.22s ease;
}

.jb-chip:hover {
	color: var(--jb-blue);
	border-color: rgba(10, 122, 255, 0.45);
	background: #f5f9ff;
}

.jb-chip.is-active {
	background: var(--jb-blue);
	border-color: var(--jb-blue);
	color: #fff;
	box-shadow: 0 8px 18px rgba(10, 122, 255, 0.24);
}

.jb-chip-count {
	font-size: 11.5px;
	opacity: 0.62;
}

.jb-search {
	position: relative;
	width: 290px;
	max-width: 100%;
	margin: 0;
}

.jb-filter > .jb-search {
	margin-left: auto;
}

.jb-search input[type='search'] {
	width: 100%;
	padding: 12px 46px 12px 18px;
	border-radius: 999px;
	border: 1px solid var(--jb-line);
	background: #fff;
	font-size: 13.5px;
	color: var(--jb-ink);
	outline: none;
	transition: all 0.22s ease;
	font-family: inherit;
}

.jb-search input[type='search']::placeholder {
	color: #a5a9b8;
}

.jb-search input[type='search']:focus {
	border-color: var(--jb-blue);
	box-shadow: 0 0 0 4px rgba(10, 122, 255, 0.1);
}

.jb-search button {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #7b8098;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.jb-search button:hover {
	background: #eef5ff;
	color: var(--jb-blue);
}

.jb-result-note {
	font-size: 14px;
	color: var(--jb-muted);
	margin: -18px 0 28px;
}

.jb-result-note a {
	color: var(--jb-blue);
	margin-left: 8px;
	font-weight: 600;
	text-decoration: none;
}

/* ------------------------------------------------------------------ 卡片 */
.jb-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.jb-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--jb-card);
	border: 1px solid var(--jb-line);
	border-radius: var(--jb-radius);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(32, 37, 45, 0.03);
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.jb-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 44px rgba(32, 37, 45, 0.11);
	border-color: rgba(10, 122, 255, 0.2);
}

.jb-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #eceae0;
	text-decoration: none;
}

.jb-card-thumb img,
.jb-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.jb-card:hover .jb-card-thumb img {
	transform: scale(1.055);
}

.jb-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #bdb9a7;
	background: linear-gradient(135deg, #eeece2, #e4e2d5);
}

.jb-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 26px 26px;
}

.jb-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: var(--jb-muted);
	letter-spacing: 0.02em;
	margin-bottom: 12px;
}

.jb-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
	display: inline-block;
}

.jb-card-title {
	margin: 0 0 10px;
	font-size: 19px;
	line-height: 1.45;
	font-weight: 700;
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.jb-card-title a {
	color: var(--jb-ink);
	text-decoration: none;
	transition: color 0.2s ease;
}

.jb-card-title a:hover {
	color: var(--jb-blue);
}

.jb-card-excerpt {
	margin: 0 0 18px;
	font-size: 14.5px;
	line-height: 1.72;
	color: #6f7488;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.jb-card-more {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--jb-blue);
	text-decoration: none;
	letter-spacing: 0.01em;
}

.jb-card-more svg {
	transition: transform 0.25s ease;
}

.jb-card-more:hover svg {
	transform: translateX(4px);
}

/* ---------------------------------------------------------------- 分页 */
.jb-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 54px;
	flex-wrap: wrap;
}

.jb-page {
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--jb-line);
	color: #4a4f66;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.jb-page:hover {
	border-color: rgba(10, 122, 255, 0.5);
	color: var(--jb-blue);
	background: #f5f9ff;
}

.jb-page.is-active {
	background: var(--jb-blue);
	border-color: var(--jb-blue);
	color: #fff;
	box-shadow: 0 8px 18px rgba(10, 122, 255, 0.24);
}

.jb-page-dots {
	color: #9aa0b0;
	padding: 0 2px;
}

/* ---------------------------------------------------------------- 空状态 */
.jb-empty {
	text-align: center;
	padding: 70px 20px 40px;
}

.jb-empty svg {
	color: #cbc8b8;
	margin-bottom: 8px;
}

.jb-empty h3 {
	font-size: 22px;
	color: var(--jb-ink);
	margin: 12px 0 10px;
	font-weight: 700;
}

.jb-empty p {
	max-width: 460px;
	margin: 0 auto 24px;
	font-size: 15px;
	color: #6f7488;
	line-height: 1.7;
}

.jb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 28px;
	border-radius: 999px;
	background: var(--jb-blue);
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	transition: all 0.25s ease;
	white-space: nowrap;
}

.jb-btn:hover {
	background: var(--jb-blue-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(10, 122, 255, 0.28);
}

/* ================================================================ 详情页 */
.jb-single-hero {
	padding: 56px 0 46px;
}

.jb-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--jb-muted);
}

.jb-breadcrumb a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.jb-breadcrumb a:hover {
	color: var(--jb-blue);
}

.jb-single-title {
	font-size: clamp(28px, 3.2vw, 42px);
	line-height: 1.26;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--jb-ink);
	margin: 14px 0 20px;
	max-width: 940px;
}

.jb-single-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13.5px;
	color: var(--jb-muted);
}

.jb-badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 13px;
	border-radius: 999px;
	background: rgba(10, 122, 255, 0.1);
	color: var(--jb-blue);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: all 0.2s ease;
}

.jb-badge:hover {
	background: var(--jb-blue);
	color: #fff;
}

.jb-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 46px;
	align-items: start;
}

.jb-post {
	background: #fff;
	border: 1px solid var(--jb-line);
	border-radius: 18px;
	padding: 40px;
	box-shadow: 0 10px 32px rgba(32, 37, 45, 0.05);
	min-width: 0;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.jb-post-thumb {
	margin: 0 0 32px;
	border-radius: 12px;
	overflow: hidden;
}

.jb-post-thumb img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
}

/* 正文排版 */
.jb-content {
	font-size: 16.5px;
	line-height: 1.85;
	color: #4a4f63;
	word-break: break-word;
}

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

.jb-content p {
	margin: 0 0 20px;
}

.jb-content h2 {
	font-size: 25px;
	line-height: 1.38;
	font-weight: 700;
	color: var(--jb-ink);
	margin: 42px 0 14px;
	letter-spacing: -0.01em;
}

.jb-content h3 {
	font-size: 20px;
	line-height: 1.45;
	font-weight: 700;
	color: var(--jb-ink);
	margin: 32px 0 12px;
}

.jb-content h4 {
	font-size: 17.5px;
	font-weight: 700;
	color: var(--jb-ink);
	margin: 26px 0 10px;
}

.jb-content a {
	color: var(--jb-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jb-content a:hover {
	color: var(--jb-blue-dark);
}

.jb-content ul,
.jb-content ol {
	margin: 0 0 22px;
	padding-left: 22px;
}

.jb-content li {
	margin-bottom: 10px;
}

.jb-content li > ul,
.jb-content li > ol {
	margin: 10px 0 0;
}

.jb-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	display: block;
	margin: 26px auto;
}

.jb-content figure {
	margin: 26px 0;
}

.jb-content figcaption {
	font-size: 13px;
	color: var(--jb-muted);
	text-align: center;
	margin-top: 10px;
}

.jb-content blockquote {
	margin: 30px 0;
	padding: 22px 26px;
	border-left: 4px solid var(--jb-blue);
	background: #f4f8ff;
	border-radius: 0 12px 12px 0;
	color: #35405c;
	font-size: 16.5px;
	line-height: 1.8;
}

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

.jb-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 26px 0;
	font-size: 15px;
}

.jb-content th,
.jb-content td {
	border: 1px solid var(--jb-line);
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}

.jb-content th {
	background: #f7f7ef;
	font-weight: 700;
	color: var(--jb-ink);
}

.jb-content hr {
	border: 0;
	border-top: 1px solid var(--jb-line);
	margin: 34px 0;
}

.jb-content strong {
	color: var(--jb-ink);
	font-weight: 700;
}

.jb-content code {
	background: #f4f4ec;
	padding: 2px 6px;
	border-radius: 5px;
	font-size: 0.92em;
}

/* 标签 */
.jb-tags {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1px solid var(--jb-line);
}

.jb-tags-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--jb-muted);
}

.jb-tag {
	font-size: 12.5px;
	padding: 6px 13px;
	border-radius: 999px;
	background: #f6f6ee;
	color: #5a5f73;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.2s ease;
}

.jb-tag:hover {
	background: var(--jb-blue);
	color: #fff;
}

/* 正文底部 CTA */
.jb-post-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	flex-wrap: wrap;
	margin-top: 34px;
	padding: 26px 28px;
	border-radius: 14px;
	background: linear-gradient(120deg, #20252d 0%, #2c3342 100%);
}

.jb-post-cta strong {
	display: block;
	font-size: 16.5px;
	color: #fff;
	margin-bottom: 6px;
}

.jb-post-cta p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.72);
	max-width: 420px;
}

/* 上一篇 / 下一篇 */
.jb-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 30px;
}

.jb-post-nav-item {
	display: block;
	padding: 16px 18px;
	border: 1px solid var(--jb-line);
	border-radius: 12px;
	background: #fbfbf5;
	text-decoration: none;
	transition: all 0.22s ease;
}

.jb-post-nav-item:hover {
	border-color: rgba(10, 122, 255, 0.4);
	background: #f5f9ff;
}

.jb-post-nav-item.next {
	text-align: right;
}

.jb-post-nav-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	color: var(--jb-muted);
	margin-bottom: 7px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jb-post-nav-item.next .jb-post-nav-label {
	justify-content: flex-end;
}

.jb-post-nav-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--jb-ink);
}

.jb-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 30px;
	font-size: 14px;
	font-weight: 700;
	color: var(--jb-blue);
	text-decoration: none;
}

.jb-back svg {
	transition: transform 0.22s ease;
}

.jb-back:hover svg {
	transform: translateX(-4px);
}

/* ------------------------------------------------------------------ 侧栏 */
.jb-sidebar {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 22px;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.jb-widget {
	background: #fff;
	border: 1px solid var(--jb-line);
	border-radius: var(--jb-radius);
	padding: 24px;
	box-shadow: 0 6px 20px rgba(32, 37, 45, 0.04);
}

.jb-widget-title {
	position: relative;
	margin: 0 0 18px;
	padding-bottom: 13px;
	font-size: 15px;
	font-weight: 800;
	color: var(--jb-ink);
	letter-spacing: 0.01em;
	border-bottom: 1px solid var(--jb-line);
}

.jb-widget-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 44px;
	height: 2px;
	background: var(--jb-blue);
}

.jb-search-full {
	width: 100%;
}

.jb-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jb-cat-list li + li {
	margin-top: 2px;
}

.jb-cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 14px;
	color: #5a5f73;
	text-decoration: none;
	transition: all 0.2s ease;
}

.jb-cat-list a:hover {
	background: #f5f9ff;
	color: var(--jb-blue);
}

.jb-count {
	font-size: 12px;
	color: #9aa0b0;
	background: #f4f4ec;
	border-radius: 999px;
	padding: 2px 9px;
}

.jb-recent {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jb-recent li + li {
	margin-top: 15px;
}

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

.jb-recent-thumb {
	flex: 0 0 66px;
	width: 66px;
	height: 54px;
	border-radius: 8px;
	overflow: hidden;
	background: #eeece2;
}

.jb-recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jb-recent-body {
	min-width: 0;
}

.jb-recent-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13.8px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--jb-ink);
	transition: color 0.2s ease;
}

.jb-recent a:hover .jb-recent-title {
	color: var(--jb-blue);
}

.jb-recent-date {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #9aa0b0;
}

/* 侧栏推广块 */
.jb-widget.jb-cta {
	background: linear-gradient(150deg, #0a7aff 0%, #0b5fd0 100%);
	border: 0;
	color: #fff;
}

.jb-cta-eyebrow {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.85;
	margin-bottom: 8px;
}

.jb-widget.jb-cta h3 {
	margin: 0 0 10px;
	font-size: 19px;
	line-height: 1.35;
	font-weight: 700;
	color: #fff;
}

.jb-widget.jb-cta p {
	margin: 0 0 18px;
	font-size: 13.5px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.86);
}

.jb-btn-light {
	background: #fff;
	color: #0a5fc8;
}

.jb-btn-light:hover {
	background: #eef5ff;
	color: #0a5fc8;
}

/* 相关文章 */
.jb-related {
	margin-top: 68px;
}

.jb-related-title {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--jb-ink);
	margin: 0 0 28px;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1100px) {
	.jb-single-grid {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 30px;
	}
	.jb-grid {
		gap: 24px;
	}
}

@media (max-width: 980px) {
	.jb-single-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.jb-sidebar {
		position: static;
	}
	.jb-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.jb-post {
		padding: 30px;
	}
}

@media (max-width: 767px) {
	.jb-section {
		padding: 44px 0 64px;
	}
	.jb-container {
		padding: 0 18px;
	}
	.jb-filter {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		margin-bottom: 28px;
	}
	.jb-search {
		width: 100%;
	}
	.jb-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}
	.jb-single-hero {
		padding: 34px 0 28px;
	}
	.jb-post {
		padding: 22px 18px;
		border-radius: 14px;
	}
	.jb-content {
		font-size: 16px;
	}
	.jb-content h2 {
		font-size: 22px;
		margin-top: 32px;
	}
	.jb-content h3 {
		font-size: 18.5px;
	}
	.jb-post-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 22px;
	}
	.jb-post-nav {
		grid-template-columns: minmax(0, 1fr);
	}
	.jb-post-nav-item.next {
		text-align: left;
	}
	.jb-post-nav-item.next .jb-post-nav-label {
		justify-content: flex-start;
	}
	.jb-related {
		margin-top: 48px;
	}
	.jb-related-title {
		font-size: 22px;
	}
	.jb-page {
		min-width: 38px;
		height: 38px;
		padding: 0 11px;
	}
}
