/* 文案网首页主题 */
:root {
	--wenan-orange: #f5a623;
	--wenan-orange-hover: #e09510;
	--wenan-text: #333;
	--wenan-text-muted: #999;
	--wenan-border: #eee;
	--wenan-bg: #f5f5f5;
	--wenan-white: #fff;
	--wenan-container: 1200px;
	--wenan-radius: 4px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wenan-text);
	background: var(--wenan-bg);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--wenan-orange);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.wenan-container {
	max-width: var(--wenan-container);
	margin: 0 auto;
	padding: 0 16px;
}

/* Header */
.wenan-header {
	background: var(--wenan-white);
	border-bottom: 1px solid var(--wenan-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.wenan-header-inner {
	display: flex;
	align-items: center;
	min-height: 60px;
	gap: 24px;
}

.wenan-logo a {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--wenan-text);
}

.wenan-logo a:hover {
	color: var(--wenan-text);
}

.wenan-logo-icon {
	width: 32px;
	height: 32px;
	background: var(--wenan-orange);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
}

.wenan-logo img {
	max-height: 40px;
	width: auto;
}

.wenan-nav {
	flex: 1;
	overflow-x: auto;
}

.wenan-nav-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px 20px;
}

.wenan-nav-list li {
	margin: 0;
}

.wenan-nav-list a {
	display: block;
	padding: 18px 4px;
	color: #666;
	font-size: 15px;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.wenan-nav-list .current-menu-item a,
.wenan-nav-list .is-active a,
.wenan-nav-list a:hover {
	color: var(--wenan-orange);
	border-bottom-color: var(--wenan-orange);
}

.wenan-header-actions {
	flex-shrink: 0;
}

.wenan-search-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	color: #666;
	display: flex;
	align-items: center;
}

.wenan-search-toggle:hover {
	color: var(--wenan-orange);
}

.wenan-search-panel {
	background: var(--wenan-white);
	border-bottom: 1px solid var(--wenan-border);
	padding: 12px 0;
}

.wenan-search-panel[hidden] {
	display: none;
}

.wenan-search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
}

.wenan-search-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	font-size: 14px;
}

.wenan-search-submit {
	padding: 8px 20px;
	background: var(--wenan-orange);
	color: #fff;
	border: none;
	border-radius: var(--wenan-radius);
	cursor: pointer;
	font-size: 14px;
}

.wenan-search-submit:hover {
	background: var(--wenan-orange-hover);
}

/* Layout */
.wenan-main {
	padding: 24px 0 40px;
}

.wenan-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
	align-items: start;
}

.wenan-content {
	min-width: 0;
}

.wenan-section {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 20px;
	margin-bottom: 20px;
}

.wenan-section-title {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	color: var(--wenan-text);
}

.wenan-empty {
	color: var(--wenan-text-muted);
	margin: 0;
}

/* Featured grid */
.wenan-featured-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.wenan-featured-card {
	display: flex;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	transition: box-shadow 0.2s;
}

.wenan-featured-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wenan-featured-thumb-link {
	flex-shrink: 0;
	width: 140px;
}

.wenan-featured-thumb,
.wenan-thumb.wenan-featured-thumb {
	width: 140px;
	height: 100px;
	object-fit: cover;
	border-radius: var(--wenan-radius);
}

.wenan-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f0;
	color: var(--wenan-orange);
	font-size: 28px;
	font-weight: 700;
}

.wenan-featured-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.wenan-featured-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wenan-featured-excerpt {
	margin: 0 0 auto;
	font-size: 12px;
	color: var(--wenan-text-muted);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wenan-featured-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}

.wenan-featured-cat {
	font-size: 12px;
	color: var(--wenan-text-muted);
}

.wenan-btn-read {
	display: inline-block;
	padding: 2px 12px;
	font-size: 12px;
	color: var(--wenan-orange);
	border: 1px solid var(--wenan-orange);
	border-radius: 2px;
}

.wenan-btn-read:hover {
	background: var(--wenan-orange);
	color: #fff;
}

/* Latest list */
.wenan-latest-section .wenan-section {
	border: none;
	padding: 0;
	background: transparent;
}

.wenan-list-item {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 20px;
	margin-bottom: 16px;
}

.wenan-list-body {
	flex: 1;
	min-width: 0;
}

.wenan-list-thumb-link {
	flex-shrink: 0;
	width: 200px;
	border-radius: var(--wenan-radius);
	overflow: hidden;
	background: #f0f0f0;
}

.wenan-list-thumb,
.wenan-thumb.wenan-list-thumb {
	width: 200px;
	height: 130px;
	object-fit: cover;
	display: block;
}

.wenan-list-thumb-link .wenan-thumb-placeholder {
	width: 200px;
	height: 130px;
	font-size: 36px;
}

.wenan-list-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 16px;
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
}

.wenan-list-date {
	font-size: 13px;
	font-weight: 400;
	color: var(--wenan-text-muted);
	white-space: nowrap;
}

.wenan-list-excerpt {
	margin: 0 0 10px;
	color: var(--wenan-text-muted);
	font-size: 14px;
	line-height: 1.7;
}

.wenan-post-views {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: var(--wenan-text-muted);
}

.wenan-icon-eye {
	vertical-align: middle;
}

/* Sidebar */
.wenan-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wenan-widget {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 16px;
}

.wenan-widget-title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wenan-widget-bar {
	display: inline-block;
	width: 3px;
	height: 16px;
	background: var(--wenan-orange);
	border-radius: 2px;
}

.wenan-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wenan-sidebar-item {
	display: flex;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wenan-border);
}

.wenan-sidebar-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wenan-sidebar-item:first-child {
	padding-top: 0;
}

.wenan-sidebar-thumb-link {
	flex-shrink: 0;
}

.wenan-sidebar-thumb,
.wenan-thumb.wenan-sidebar-thumb {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--wenan-radius);
}

.wenan-sidebar-text {
	flex: 1;
	min-width: 0;
}

.wenan-sidebar-title {
	display: block;
	font-size: 14px;
	line-height: 1.4;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wenan-sidebar-date {
	font-size: 12px;
	color: var(--wenan-text-muted);
}

/* Single / Archive */
.wenan-archive-header {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 20px;
	margin-bottom: 20px;
}

.wenan-archive-title {
	margin: 0;
	font-size: 22px;
}

.wenan-archive-desc {
	margin-top: 8px;
	color: var(--wenan-text-muted);
}

.wenan-single {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 24px;
	margin-bottom: 20px;
}

.wenan-single-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 16px;
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.35;
}

.wenan-single-date {
	font-size: 14px;
	font-weight: 400;
	color: var(--wenan-text-muted);
	white-space: nowrap;
}

.wenan-single-header .wenan-post-views {
	margin-bottom: 16px;
}

.wenan-single-thumb {
	margin-bottom: 20px;
}

.wenan-single-content {
	font-size: 16px;
	line-height: 1.8;
}

.wenan-single-content p {
	margin: 0 0 1em;
}

.wenan-single-tags {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--wenan-border);
	font-size: 13px;
	color: var(--wenan-text-muted);
}

.wenan-single-tags a {
	color: var(--wenan-orange);
	margin-right: 8px;
}

.post-navigation {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 16px 20px;
	margin-bottom: 20px;
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 24px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1;
	min-width: 0;
	max-width: 48%;
}

.post-navigation .nav-next {
	text-align: right;
	margin-left: auto;
}

.post-navigation a {
	display: block;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
}

.post-navigation .nav-label {
	display: block;
	font-size: 13px;
	color: var(--wenan-text-muted);
	margin-bottom: 6px;
}

.post-navigation .nav-title {
	display: block;
	color: var(--wenan-text);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.post-navigation a:hover .nav-title {
	color: var(--wenan-orange);
}

/* 相关文章 */
.wenan-related-section {
	background: var(--wenan-white);
	border: 1px solid var(--wenan-border);
	border-radius: var(--wenan-radius);
	padding: 20px;
	margin-bottom: 20px;
}

.wenan-related-heading {
	margin: 0 0 20px;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wenan-related-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px 20px;
}

.wenan-related-card {
	margin: 0;
}

.wenan-related-link {
	display: block;
	color: inherit;
}

.wenan-related-link:hover .wenan-related-title {
	color: var(--wenan-orange);
}

.wenan-related-thumb-wrap {
	margin-bottom: 10px;
	border-radius: var(--wenan-radius);
	overflow: hidden;
	background: #f0f0f0;
	aspect-ratio: 16 / 9;
}

.wenan-related-thumb,
.wenan-thumb.wenan-related-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wenan-related-thumb-wrap .wenan-thumb-placeholder {
	width: 100%;
	height: 100%;
	min-height: 120px;
	font-size: 32px;
}

.wenan-related-title {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Pagination */
.wenan-pagination ul,
.wenan-pagination .page-numbers {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.wenan-pagination a,
.wenan-pagination span {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--wenan-border);
	background: var(--wenan-white);
	border-radius: var(--wenan-radius);
	font-size: 13px;
}

.wenan-pagination .current {
	background: var(--wenan-orange);
	border-color: var(--wenan-orange);
	color: #fff;
}

/* Footer */
.wenan-footer {
	background: var(--wenan-white);
	border-top: 1px solid var(--wenan-border);
	padding: 24px 0;
	text-align: center;
	font-size: 13px;
	color: var(--wenan-text-muted);
}

.wenan-footer a {
	color: var(--wenan-text);
}

.wenan-footer-sep {
	margin: 0 8px;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* Responsive */
@media (max-width: 992px) {
	.wenan-layout {
		grid-template-columns: 1fr;
	}

	.wenan-featured-grid {
		grid-template-columns: 1fr;
	}

	.wenan-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.post-navigation .nav-previous,
	.post-navigation .nav-next {
		max-width: 100%;
	}

	.post-navigation .nav-links {
		flex-direction: column;
	}

	.post-navigation .nav-next {
		text-align: left;
	}

	.wenan-related-grid {
		grid-template-columns: 1fr;
	}

	.wenan-header-inner {
		flex-wrap: wrap;
	}

	.wenan-nav {
		order: 3;
		width: 100%;
	}

	.wenan-featured-card {
		flex-direction: column;
	}

	.wenan-featured-thumb-link,
	.wenan-featured-thumb {
		width: 100%;
		height: auto;
		max-height: 180px;
	}

	.wenan-list-item {
		flex-direction: column;
	}

	.wenan-list-thumb-link,
	.wenan-list-thumb,
	.wenan-list-thumb-link .wenan-thumb-placeholder {
		width: 100%;
		height: auto;
		max-height: 200px;
	}

	.wenan-list-thumb {
		height: 180px;
	}
}
