/**
 * 威扬云创 - Note 站风格自定义样式
 * 色板来源：note 站（directus-web-react build）
 *   主色 #2d5a4a / 前景 #172940 / 次前景 #a2b5cd
 *   背景 #f7f6f4 / 强调背景 #e4eaf1 / 次背景 #f0f4f9
 * 字体：完全使用系统默认字体（已移除 Google Fonts，提速），容器 1080px
 */

/* ===== 全局色板（覆盖 GeneratePress 变量） ===== */
:root {
	/* 参考站变量 */
	--primary-color: #2d5a4a;
	--foreground: #172940;
	--foreground-accent: #a2b5cd;
	--background: #f7f6f4;
	--background-accent: #e4eaf1;
	--background-subtle: #f0f4f9;

	/* GeneratePress 变量映射 */
	--contrast: #172940;
	--contrast-2: #55697f;
	--contrast-3: #a2b5cd;
	--base: #e4eaf1;
	--base-2: #e4eaf1;
	--base-3: #f7f6f4;
	--accent: #2d5a4a;
	--accent-2: #1f4034;
	--accent-hover: #244a3d;

	/* 静态首页色板兼容变量（front-page.php 原内嵌定义） */
	--primary: #2d5a4a;
	--secondary: #2d5a4a;
	--light: #e4eaf1;
	--dark: #172940;
	--gray: #a2b5cd;
}

/* ===== 基础文字 ===== */
body {
	background-color: #f7f6f4;
	color: #172940;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.widget-title,
.site-title {
	font-family: Georgia, 'Times New Roman', 'PingFang SC', serif;
	color: #172940;
	font-weight: 400;
}

a {
	color: #2d5a4a;
}
a:hover {
	color: #1f4034;
}

/* ===== 容器 1080px ===== */
.grid-container {
	max-width: 1080px;
}

/* ===== 头部 ===== */
.site-header {
	background-color: #ffffff;
	border-bottom: 1px solid #e4eaf1;
}

/* ===== 导航菜单 ===== */
.main-navigation .main-nav ul li a {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #172940;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li:hover > a {
	color: #2d5a4a;
}
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
	color: #2d5a4a;
}

/* ===== 文章与侧边栏卡片 ===== */
.separate-containers .inside-article,
.separate-containers .inside-right-sidebar .widget,
.separate-containers .inside-left-sidebar .widget {
	background-color: #ffffff;
	border: 1px solid #e4eaf1;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(23, 41, 64, 0.06);
}

/* 文章标题 */
.entry-header .entry-title a {
	color: #172940;
}
.entry-header .entry-title a:hover {
	color: #2d5a4a;
}

/* 阅读更多按钮 */
.read-more-container .button,
button,
input[type="submit"],
input[type="button"] {
	background-color: #2d5a4a;
	border-color: #2d5a4a;
	color: #ffffff;
}
.read-more-container .button:hover,
button:hover,
input[type="submit"]:hover {
	background-color: #1f4034;
	border-color: #1f4034;
}

/* 元信息与标签 */
.entry-meta a,
.tags-links a {
	color: #2d5a4a;
}

/* 分页 */
.paging-navigation .page-numbers.current,
.pagination .page-numbers.current {
	background-color: #2d5a4a;
	border-color: #2d5a4a;
	color: #ffffff;
}
.paging-navigation .page-numbers,
.pagination .page-numbers {
	color: #2d5a4a;
}

/* 搜索框 */
.widget_search .search-submit,
.widget_search input[type="submit"] {
	background-color: #2d5a4a;
}

/* ===== 页脚 ===== */
.site-footer {
	background-color: #172940;
}
.site-footer .widget-title,
.site-footer a {
	color: #a2b5cd;
}

/* ============================================================
 * 全站页眉（静态首页与博客共用，来自 front-page.php 原内嵌样式）
 * 注意：选择器必须限定在 .weiyoun-site-header 下，
 * 不可使用裸 header 标签，否则会误伤文章页的
 * <header class="entry-header"> / <header class="page-header">
 * ============================================================ */
body:not(.home) {
	/* 为 fixed 页眉留出空间（首页 hero 自带 padding 补偿） */
	padding-top: 72px;
}

.weiyoun-site-header {
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 1000;
}

.weiyoun-site-header .header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 15px 20px;
}

.weiyoun-site-header .logo {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--primary);
	text-decoration: none;
}

.weiyoun-site-header .logo span {
	color: var(--secondary);
}

/* nav 本身必须为 flex，否则菜单 ul 与搜索框 ul 两个块级元素会上下堆叠 */
.weiyoun-site-header nav {
	display: flex;
	align-items: center;
}

.weiyoun-site-header nav ul {
	display: flex;
	list-style: none;
	/* 显式归零：文章页会加载 GeneratePress 的 ul{margin:0 0 1.5em 3em}，
	 * 首页则被 front-page.php 内嵌 * reset 归零，这里统一以保证两站完全一致 */
	margin: 0;
	padding: 0;
}

.weiyoun-site-header nav ul li {
	margin-left: 30px;
}

.weiyoun-site-header nav ul li a {
	font-size: 1.2rem;
	text-decoration: none;
	color: var(--dark);
	font-weight: 500;
	transition: color 0.3s;
}

.weiyoun-site-header nav ul li a:hover {
	color: var(--secondary);
}

/* 当前激活菜单项：品牌色 + 加粗 + 底部高亮线（两站共用，美观且不改变布局）
 * current-menu-item / current_page_item 为 WordPress 核心自动添加的当前页类 */
.weiyoun-site-header nav ul li.current-menu-item > a,
.weiyoun-site-header nav ul li.current_page_item > a,
.weiyoun-site-header nav ul li.current-menu-ancestor > a,
.weiyoun-site-header nav ul li.current_page_ancestor > a,
.weiyoun-site-header nav ul li.current-menu-parent > a,
.weiyoun-site-header nav ul li.current_page_parent > a {
	color: var(--secondary);
	font-weight: 600;
	position: relative;
}

.weiyoun-site-header nav ul li.current-menu-item > a::after,
.weiyoun-site-header nav ul li.current_page_item > a::after,
.weiyoun-site-header nav ul li.current-menu-ancestor > a::after,
.weiyoun-site-header nav ul li.current_page_ancestor > a::after,
.weiyoun-site-header nav ul li.current-menu-parent > a::after,
.weiyoun-site-header nav ul li.current_page_parent > a::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	border-radius: 2px;
	background-color: var(--secondary);
}

.weiyoun-site-header .mobile-menu {
	display: none;
	font-size: 1.4rem;
	cursor: pointer;
}

/* 搜索框样式 */
.weiyoun-site-header nav ul.front-search {
	/* 菜单靠左、搜索框靠右 */
	margin-left: auto;
}

/* 表单元素不继承 body 字体（首页有 * reset 强制 Inter，文章页没有），
 * 这里统一继承，保证两站搜索框文字字体一致 */
.weiyoun-site-header form,
.weiyoun-site-header input,
.weiyoun-site-header button {
	font-family: inherit;
}

.weiyoun-site-header nav ul li.search {
	display: flex;
	align-items: center;
}

.weiyoun-site-header nav ul li.search form {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px 5px;
	background-color: #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weiyoun-site-header nav ul li.search input[type="text"] {
	border: none;
	padding: 6px;
	font-size: 14px;
	outline: none;
	width: 160px;
}

.weiyoun-site-header nav ul li.search button {
	background-color: transparent;
	border: none;
	color: #555;
	padding: 6px;
	cursor: pointer;
}

.weiyoun-site-header nav ul li.search button i {
	font-size: 16px;
}

/* ============================================================
 * 全站页脚（静态首页与博客共用，来自 front-page.php 原内嵌样式）
 * 注意：选择器必须限定在 .weiyoun-site-footer 下，
 * 不可使用裸 footer 标签，否则会误伤文章页的
 * <footer class="entry-meta"> / 评论区的 <footer>
 * ============================================================ */
.weiyoun-site-footer {
	background: var(--dark);
	color: #ffffff;
	padding: 60px 0 30px;
}

.weiyoun-site-footer .footer-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.weiyoun-site-footer .footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 40px;
	margin-bottom: 40px;
}

.weiyoun-site-footer .footer-column h3 {
	font-size: 1.3rem;
	margin-bottom: 20px;
	position: relative;
	padding-bottom: 10px;
	color: #ffffff;
}

.weiyoun-site-footer .footer-column h3::after {
	content: '';
	position: absolute;
	width: 40px;
	height: 2px;
	background: var(--secondary);
	bottom: 0;
	left: 0;
}

.weiyoun-site-footer .footer-column ul {
	list-style: none;
	/* 显式归零：文章页会加载 GeneratePress 的 ul{margin:0 0 1.5em 3em}，
	 * 首页则被 front-page.php 内嵌 * reset 归零，这里统一以保证两站完全一致 */
	margin: 0;
	padding: 0;
}

.weiyoun-site-footer .footer-column ul li {
	margin-bottom: 10px;
}

.weiyoun-site-footer .footer-column ul li a {
	color: #bbb;
	text-decoration: none;
	transition: color 0.3s;
}

.weiyoun-site-footer .footer-column ul li a:hover {
	color: var(--secondary);
}

.weiyoun-site-footer .footer-bottom {
	text-align: center;
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #bbb;
	font-size: 0.9rem;
}

/* ============================================================
 * 页眉/页脚移动端适配（来自 front-page.php 原内嵌媒体查询）
 * ============================================================ */
@media (max-width: 768px) {
	/* logo 在左、三横图标在右，菜单整行折叠到下方 */
	.weiyoun-site-header .header-container {
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		text-align: center;
	}

	/* 显示三横图标（桌面端隐藏），并放大点击区域 */
	.weiyoun-site-header .mobile-menu {
		display: block;
		font-size: 1.4rem;
		padding: 8px 10px;
	}

	/* 菜单默认折叠隐藏，点击三横图标（JS 切换 nav.active）后展开 */
	.weiyoun-site-header nav {
		display: none;
		width: 100%;
		order: 3;
		flex-direction: column;
		align-items: center;
	}

	.weiyoun-site-header nav.active {
		display: flex;
	}

	.weiyoun-site-header nav ul {
		margin-top: 20px;
		flex-direction: column;
		align-items: center;
	}

	/* 移动端去掉右推，与菜单一起居中 */
	.weiyoun-site-header nav ul.front-search {
		margin-left: 0;
	}

	.weiyoun-site-header nav ul li {
		margin: 0 0 10px;
	}

	.weiyoun-site-header nav ul li.search {
		margin-top: 10px;
	}

	.weiyoun-site-header nav ul li.search input[type="text"] {
		width: 120px;
	}
}
