/* ===================== 文章页 / 归档页 / 侧边栏 / 评论 ===================== */

/* ---- 页面头部 ---- */
.page-hero {
	padding: 40px 0 32px;
	background: var(--c-bg);
	border-bottom: 1px solid var(--c-line);
}

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

.breadcrumb a {
	color: var(--c-muted);
	text-decoration: none;
	transition: color 0.2s var(--ease);
}

.breadcrumb a:hover {
	color: var(--c-primary);
}

.breadcrumb span {
	color: var(--c-muted);
}

.page-title {
	font-size: clamp(24px, 3.5vw, 32px);
	font-weight: 800;
	color: var(--c-light);
	line-height: 1.35;
	margin: 0 0 16px;
	letter-spacing: -0.01em;
}

.page-desc {
	font-size: 15px;
	color: var(--c-muted-2);
	line-height: 1.7;
	margin: 0;
	max-width: 680px;
}

/* 文章页元信息 */
.entry-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 13px;
	margin-top: 4px;
}

.entry-meta .archive-card-cat {
	padding: 3px 10px;
	border-radius: var(--r-pill);
	background: rgba(121, 166, 90, 0.10);
	color: var(--c-primary);
	font-size: 12px;
	font-weight: 600;
}

.entry-meta .meta-date,
.entry-meta .meta-author {
	color: var(--c-muted);
	font-weight: 500;
}

.entry-meta .meta-sep {
	color: var(--c-line-strong);
}

/* ---- 内容区域布局 ---- */
.content-area {
	padding: 48px 0 64px;
	background: var(--c-bg);
	min-height: 400px;
}

.content-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 56px;
	align-items: start;
}

.entry-main {
	min-width: 0;
}

/* ---- 文章正文排版 ---- */
.entry-content {
	font-size: 16px;
	line-height: 1.9;
	color: var(--c-light-2);
}

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

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--c-light);
	font-weight: 700;
	line-height: 1.4;
	margin: 2em 0 1em;
	letter-spacing: -0.01em;
}

.entry-content h2 {
	font-size: 22px;
}

.entry-content h3 {
	font-size: 19px;
}

.entry-content h4 {
	font-size: 16px;
}

.entry-content p {
	margin: 0 0 1.5em;
}

.entry-content a {
	color: var(--c-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(121, 166, 90, 0.3);
	transition: text-decoration-color 0.2s var(--ease);
}

.entry-content a:hover {
	text-decoration-color: var(--c-primary);
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.5em;
	padding-left: 1.5em;
}

.entry-content li {
	margin: 0.5em 0;
}

.entry-content ul li {
	list-style: disc;
}

.entry-content ol li {
	list-style: decimal;
}

.entry-content blockquote {
	margin: 1.8em 0;
	padding: 18px 28px;
	border-left: 4px solid var(--c-primary);
	background: rgba(121, 166, 90, 0.05);
	border-radius: 0 var(--r-md) var(--r-md) 0;
	font-size: 16px;
	color: var(--c-light);
}

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

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--r-md);
	margin: 1.5em 0;
}

.entry-content pre {
	background: var(--c-light);
	color: #e3e3e3;
	padding: 20px 24px;
	border-radius: var(--r-md);
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
	margin: 1.5em 0;
}

.entry-content code {
	font-size: 0.9em;
	background: rgba(37, 39, 38, 0.06);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: 'SF Mono', Consolas, monospace;
}

.entry-content pre code {
	background: none;
	padding: 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 14px;
}

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

.entry-content th {
	background: var(--c-surface-2);
	font-weight: 700;
	color: var(--c-light);
}

.entry-content hr {
	border: none;
	border-top: 1px solid var(--c-line);
	margin: 2em 0;
}

/* 特色图片 */
.post-card-thumb img {
	width: 100%;
	height: auto;
	border-radius: var(--r-lg);
	display: block;
}

/* 分页链接 */
.page-links {
	margin: 28px 0;
	padding: 16px 0;
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
	font-size: 14px;
}

.page-links a {
	color: var(--c-primary);
	text-decoration: none;
	margin: 0 4px;
}

.page-links a:hover {
	text-decoration: underline;
}

/* 标签 */
.entry-tags {
	padding: 20px 0 0;
	border-top: 1px solid var(--c-line);
	margin-top: 36px;
	font-size: 14px;
}

.entry-tags a {
	display: inline-block;
	padding: 4px 12px;
	margin: 4px 4px 0 0;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--r-pill);
	color: var(--c-light-2);
	text-decoration: none;
	font-size: 13px;
	transition: all 0.2s var(--ease);
}

.entry-tags a:hover {
	background: var(--c-primary);
	color: #fff;
	border-color: var(--c-primary);
}

/* ---- 相关推荐 ---- */
.related-posts {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--c-line);
}

.related-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--c-light);
	margin: 0 0 24px;
}

/* ---- 侧边栏 ---- */
.sidebar {
	position: sticky;
	top: 88px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.widget {
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	padding: 24px;
}

.widget-title {
	font-size: 14px;
	font-weight: 800;
	color: var(--c-light);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--c-primary);
	display: inline-block;
	letter-spacing: 0.02em;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget ul li {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--c-line);
}

.widget ul li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.widget ul li a {
	color: var(--c-light-2);
	text-decoration: none;
	font-size: 14px;
	line-height: 1.6;
	transition: color 0.2s var(--ease);
}

.widget ul li a:hover {
	color: var(--c-primary);
}

/* WordPress 搜索 widget */
.widget_search .search-form,
.widget_search form {
	display: flex;
	gap: 8px;
}

.widget_search .search-field,
.widget_search input[type="search"] {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--r-md);
	background: var(--c-bg);
	color: var(--c-light);
	font-size: 14px;
	font-family: inherit;
}

.widget_search .search-field:focus,
.widget_search input[type="search"]:focus {
	outline: none;
	border-color: var(--c-primary);
}

.widget_search .search-submit,
.widget_search button[type="submit"] {
	padding: 10px 18px;
	background: var(--c-primary);
	color: #fff;
	border: none;
	border-radius: var(--r-md);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s var(--ease);
	white-space: nowrap;
}

.widget_search .search-submit:hover,
.widget_search button[type="submit"]:hover {
	background: var(--c-accent-2);
}

/* WordPress 近期文章 widget */
.widget_recent_entries ul li {
	padding: 12px 0;
}

.widget_recent_entries .post-date {
	display: block;
	font-size: 12px;
	color: var(--c-muted);
	margin-top: 4px;
}

/* WordPress 分类 widget */
.widget_categories ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.widget_categories ul li {
	border: none !important;
	padding: 0 !important;
}

.widget_categories ul li a {
	display: inline-block;
	padding: 4px 12px;
	background: var(--c-surface-2);
	border: 1px solid var(--c-line);
	border-radius: var(--r-pill);
	font-size: 13px;
}

.widget_categories ul li a:hover {
	background: var(--c-primary);
	color: #fff;
	border-color: var(--c-primary);
}

/* WordPress 自定义 HTML widget */
.widget_custom_html .textwidget,
.widget_text .textwidget {
	font-size: 14px;
	line-height: 1.7;
	color: var(--c-light-2);
}

.widget_custom_html .textwidget p,
.widget_text .textwidget p {
	margin: 0 0 12px;
}

.widget_custom_html .textwidget p:last-child,
.widget_text .textwidget p:last-child {
	margin-bottom: 0;
}

/* ---- 归档/首页文章卡片 ---- */
.archive-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.archive-card {
	border-radius: var(--r-lg);
	border: 1px solid var(--c-line);
	background: var(--c-surface);
	overflow: hidden;
	transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.archive-card:hover {
	transform: translateY(-4px);
	border-color: var(--c-primary);
	box-shadow: var(--sh-lg);
}

.archive-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.archive-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--c-surface-2);
}

.archive-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--ease);
}

.archive-card:hover .archive-card-media img {
	transform: scale(1.05);
}

.archive-card-media-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(121, 166, 90, 0.08), rgba(121, 166, 90, 0.03));
	color: var(--c-primary);
}

.archive-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.archive-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
}

.archive-card-cat {
	padding: 3px 10px;
	border-radius: var(--r-pill);
	background: rgba(121, 166, 90, 0.10);
	color: var(--c-primary);
	font-size: 12px;
}

.archive-card-date {
	color: var(--c-muted);
	font-weight: 500;
}

.archive-card-title {
	font-size: 17px;
	font-weight: 800;
	color: var(--c-light);
	line-height: 1.4;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.3s var(--ease);
}

.archive-card:hover .archive-card-title {
	color: var(--c-primary);
}

.archive-card-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: var(--c-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

/* ---- 分页导航 ---- */
.pagination,
.navigation.pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-md);
	background: var(--c-surface);
	color: var(--c-light-2);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s var(--ease);
}

.pagination .page-numbers:hover {
	border-color: var(--c-primary);
	color: var(--c-primary);
}

.pagination .page-numbers.current {
	background: var(--c-primary);
	border-color: var(--c-primary);
	color: #fff;
}

.pagination .page-numbers.dots {
	border: none;
	background: none;
}

/* ---- 评论区 ---- */
.comments-area {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--c-line);
}

.comments-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--c-light);
	margin: 0 0 24px;
}

.comment-list {
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 16px 0 0;
	padding: 0 0 0 28px;
	border-left: 2px solid var(--c-line);
}

.comment-body {
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--r-md);
	padding: 20px 24px;
	margin: 0 0 16px;
}

.comment-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.comment-meta .comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .fn {
	font-size: 14px;
	font-weight: 700;
	color: var(--c-light);
	font-style: normal;
}

.comment-author .says {
	display: none;
}

.comment-metadata {
	font-size: 12px;
	color: var(--c-muted);
}

.comment-metadata a {
	color: var(--c-muted);
	text-decoration: none;
}

.comment-content {
	font-size: 14px;
	line-height: 1.85;
	color: var(--c-light-2);
}

.comment-content p {
	margin: 0 0 0.8em;
}

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

.comment-content a {
	color: var(--c-primary);
}

.comment-reply-link {
	display: inline-block;
	margin-top: 10px;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--c-primary);
	background: rgba(121, 166, 90, 0.08);
	border-radius: var(--r-pill);
	text-decoration: none;
	transition: all 0.2s var(--ease);
}

.comment-reply-link:hover {
	background: var(--c-primary);
	color: #fff;
}

.bypostauthor .comment-body {
	border-color: rgba(121, 166, 90, 0.3);
}

/* 评论表单 */
.comment-respond {
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	padding: 28px 32px;
	margin-top: 8px;
}

.comment-reply-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--c-light);
	margin: 0 0 20px;
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.comment-form p {
	margin: 0;
}

.comment-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--c-light-2);
	margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form input[type="search"],
.comment-form textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--r-md);
	background: var(--c-bg);
	color: var(--c-light);
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s var(--ease);
	box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--c-primary);
}

.comment-form textarea {
	min-height: 140px;
	resize: vertical;
}

/* 作者/邮箱/网址 排成一行 */
.comment-form-author,
.comment-form-email,
.comment-form-url {
	display: inline-block;
	width: calc(33.33% - 12px);
	vertical-align: top;
	margin-right: 18px;
}

.comment-form-url {
	margin-right: 0;
}

@media (max-width: 767px) {
	.comment-form-author,
	.comment-form-email,
	.comment-form-url {
		display: block;
		width: 100%;
		margin-right: 0;
	}
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--c-muted);
}

.comment-form .comment-form-cookies-consent input {
	width: auto;
}

.comment-form .form-submit {
	margin-top: 4px;
}

.comment-form .submit,
.comment-form .form-submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 32px;
	background: var(--c-primary);
	color: #fff;
	border: none;
	border-radius: var(--r-pill);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s var(--ease);
	width: auto;
}

.comment-form .submit:hover,
.comment-form .form-submit input[type="submit"]:hover {
	background: var(--c-accent-2);
}

.comment-notes {
	font-size: 13px;
	color: var(--c-muted);
}

#cancel-comment-reply-link {
	font-size: 13px;
	color: var(--c-muted);
	margin-left: 8px;
}

/* ---- 无内容 ---- */
.no-results {
	text-align: center;
	padding: 80px 0;
	color: var(--c-muted);
	font-size: 15px;
}
