/*
Theme Name: 河北升学规划网
Theme URI: https://hbsxgh.cn/
Author: 河北升学规划网
Author URI: https://hbsxgh.cn/
Description: 面向河北考生与家长的升学决策信息服务门户主题。高信息密度、移动端优先，内置学段资讯聚合、招考头条、高校库、院校动态、数据工具与就业板块等首页模块。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hbsxgh
Tags: education, news, custom-menu, custom-logo, featured-images, translation-ready, two-columns

河北升学规划网主题，基于 GPLv2 或更高版本协议发布。
本文件仅包含主题声明与 WordPress 必需的基础样式，全站视觉样式见 assets/css/main.css。
*/

/* ---------- 无障碍：屏幕阅读器专用文本 ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #fff;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-weight: 500;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ---------- WordPress 对齐类 ---------- */
.alignleft {
	display: inline;
	float: left;
	margin-right: 1.5em;
}

.alignright {
	display: inline;
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

img.alignleft,
img.alignright,
img.aligncenter {
	margin-bottom: 1em;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.2em;
}

.wp-caption-text {
	font-size: 13.5px;
	color: #64748B;
	text-align: center;
	padding-top: 6px;
	line-height: 1.6;
}

.gallery-caption,
.bypostauthor {
	font-weight: 500;
}

.sticky .entry-title::before {
	content: "置顶";
	display: inline-block;
	font-size: 12px;
	line-height: 1;
	padding: 3px 7px;
	margin-right: 8px;
	vertical-align: 2px;
	background: #DC2626;
	color: #fff;
	border-radius: 4px;
}

/* ---------- 登录状态下的工具栏遮挡修正 ---------- */
/* 后台工具栏固定在顶部，会让吸顶头部被压住，这里做偏移处理 */
body.admin-bar .header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .header {
		top: 46px;
	}
}

/* 悬浮咨询按钮同样需要避开工具栏 */
body.admin-bar .float-cta {
	bottom: 24px;
}

/* ---------- 后台内容编辑器与前端视觉对齐 ---------- */
.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

.entry-content iframe,
.entry-content video {
	max-width: 100%;
}

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

.entry-content th,
.entry-content td {
	border: 1px solid #E2E8F0;
	padding: 10px 12px;
	text-align: left;
	line-height: 1.6;
}

.entry-content th {
	background: #F8FAFC;
	font-weight: 500;
}

/* ---------- 登录状态提示（仅管理员可见） ---------- */
.hbsxgh-admin-hint {
	margin: 0;
	padding: 10px 14px;
	font-size: 13px;
	line-height: 1.6;
	color: #854F0B;
	background: #FFFBEB;
	border: 1px dashed #FDE68A;
	border-radius: 8px;
}

.hbsxgh-admin-hint a {
	color: #854F0B;
	font-weight: 500;
	text-decoration: underline;
}

/* ============================================================
   以下为主题补充样式：列表页、详情页、空状态与后台组件适配
   这些类在原型首页中不存在，是为 WordPress 动态内容新增的。
   ============================================================ */

/* ---------- 头部搜索按钮 ---------- */
.search-mini button {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	background: none;
	border-radius: 6px;
	color: var(--ink-3);
}

.search-mini button:hover {
	color: var(--brand-600);
}

/* ---------- 列表页与详情页布局 ---------- */
.list-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
}

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

.list-side {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 88px;
}

.sec-head h1.archive-title {
	font-size: 26px;
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

/* ---------- 文章列表项 ---------- */
.post-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.post-item {
	display: flex;
	gap: 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	transition: border-color .2s, box-shadow .2s;
}

.post-item:hover {
	border-color: var(--brand-100);
	box-shadow: var(--shadow-hover);
}

.post-thumb {
	flex: none;
	width: 160px;
	height: 110px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--brand-50);
}

.post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-body {
	min-width: 0;
	flex: 1 1 auto;
}

.post-title {
	font-size: 17.5px;
	font-weight: 500;
	line-height: 1.5;
	margin-bottom: 8px;
}

.post-title a {
	transition: color .2s;
}

.post-title a:hover {
	color: var(--brand-600);
}

.post-excerpt {
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ink-2);
	margin-bottom: 10px;
}

.post-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--ink-3);
	flex-wrap: wrap;
}

/* ---------- 文章详情 ---------- */
.article {
	padding: 30px 34px 34px;
}

.article-title {
	font-size: 27px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.01em;
	margin-bottom: 14px;
}

.article-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13.5px;
	color: var(--ink-3);
	flex-wrap: wrap;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line-2);
}

.article-thumb {
	margin: 22px 0 4px;
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.article-thumb img {
	width: 100%;
	height: auto;
}

.entry-content {
	font-size: 16.5px;
	line-height: 1.85;
	color: var(--ink);
	padding-top: 20px;
}

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

.entry-content h2 {
	font-size: 20px;
	font-weight: 500;
	margin: 1.6em 0 .7em;
	line-height: 1.45;
}

.entry-content h3 {
	font-size: 17.5px;
	font-weight: 500;
	margin: 1.4em 0 .6em;
	line-height: 1.5;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.15em 1.4em;
}

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

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

.entry-content li {
	margin-bottom: .45em;
}

.entry-content blockquote {
	margin: 1.3em 0;
	padding: 14px 18px;
	background: var(--brand-50);
	border-left: 3px solid var(--brand-600);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--ink-2);
	font-size: 15.5px;
}

.entry-content a {
	color: var(--brand-600);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.article-foot {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--line-2);
}

.article-source {
	font-size: 13px;
	line-height: 1.7;
	color: var(--ink-3);
	background: var(--bg);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	margin-bottom: 18px;
}

.article-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.article-nav a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font-size: 14.5px;
	line-height: 1.55;
	transition: border-color .2s, color .2s;
}

.article-nav a:hover {
	border-color: var(--brand-600);
	color: var(--brand-600);
}

.article-nav .nav-label {
	font-size: 12.5px;
	color: var(--ink-3);
}

.article-nav .nav-next {
	text-align: right;
	align-items: flex-end;
}

.article-head {
	margin-bottom: 4px;
}

.article-nav .nav-title {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--ink);
}

.article-nav a:hover .nav-title {
	color: var(--brand-600);
}

.page-links {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px dashed var(--line-2);
	font-size: 14px;
	color: var(--ink-3);
}

.page-links a {
	margin-left: 8px;
}

.no-comments {
	font-size: 14.5px;
	color: var(--ink-3);
}

/* 列表页与详情页的导航项保持与原型一致的排版 */
.nav-item.has-mega > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* 后台提示（仅管理员可见） */
.hbsxgh-site .notice {
	margin: 0;
}

/* ---------- 空状态 ---------- */
.stage-empty {
	padding: 26px 4px;
	text-align: center;
	color: var(--ink-3);
	font-size: 14.5px;
	line-height: 1.8;
}

.stage-empty > p {
	margin-bottom: 10px;
}

.stage-empty .hbsxgh-admin-hint {
	display: inline-block;
	text-align: left;
	max-width: 560px;
	margin-top: 4px;
}

/* ---------- 缩略图（有特色图片时） ---------- */
.stage-thumb.is-thumb,
.lead-thumb.is-thumb,
.video-thumb.is-thumb {
	padding: 0;
	overflow: hidden;
}

.stage-thumb.is-thumb img,
.lead-thumb.is-thumb img,
.video-thumb.is-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- 侧栏 ---------- */
.side-links li {
	border-bottom: 1px dashed var(--line-2);
}

.side-links li:last-child {
	border-bottom: none;
}

.side-links a {
	display: block;
	padding: 9px 0;
	font-size: 14.5px;
	color: var(--ink-2);
	transition: color .2s;
}

.side-links a:hover {
	color: var(--brand-600);
}

.side-cta {
	padding: 20px;
	background: var(--brand-50);
	border-color: var(--brand-100);
}

.side-cta h3 {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 8px;
}

.side-cta p {
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ink-2);
	margin-bottom: 14px;
}

/* 小工具 */
.widget {
	padding: 18px 20px;
}

.widget-title {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line-2);
}

.widget ul li {
	padding: 8px 0;
	border-bottom: 1px dashed var(--line-2);
	font-size: 14.5px;
	color: var(--ink-2);
}

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

/* ---------- 分页 ---------- */
.hbsxgh-pagination {
	margin-top: 26px;
}

.hbsxgh-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hbsxgh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	font-size: 14.5px;
	color: var(--ink-2);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: all .2s;
}

.hbsxgh-pagination .page-numbers:hover {
	border-color: var(--brand-600);
	color: var(--brand-600);
}

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

.hbsxgh-pagination .dots {
	border: none;
	background: none;
}

/* ---------- 搜索表单 ---------- */
.search-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 18px 0 0;
}

/* ---------- 404 ---------- */
.notfound {
	padding: 56px 34px;
	text-align: center;
}

.notfound-code {
	font-size: 56px;
	font-weight: 500;
	line-height: 1;
	color: var(--brand-100);
	margin-bottom: 12px;
}

.notfound h1 {
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 10px;
}

.notfound > p {
	font-size: 15px;
	color: var(--ink-2);
	margin-bottom: 8px;
}

.notfound .search-form {
	justify-content: center;
	max-width: 460px;
	margin: 22px auto 26px;
}

.notfound-links {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ---------- 评论 ---------- */
.comments-area {
	margin-top: 20px;
	padding: 26px 34px 30px;
}

.comments-title {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line-2);
}

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

.comment-list .comment {
	padding: 16px 0;
	border-bottom: 1px dashed var(--line-2);
}

.comment-list .comment:last-child {
	border-bottom: none;
}

.comment-list .children {
	list-style: none;
	margin-left: 24px;
	padding-left: 0;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14.5px;
	font-weight: 500;
	margin-bottom: 6px;
}

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

.comment-metadata {
	font-size: 12.5px;
	color: var(--ink-3);
	margin-bottom: 8px;
}

.comment-content {
	font-size: 15px;
	line-height: 1.75;
	color: var(--ink-2);
}

.comment-respond {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--line-2);
}

.comment-reply-title {
	font-size: 17px;
	font-weight: 500;
	margin-bottom: 14px;
}

.comment-form p {
	margin-bottom: 12px;
}

.comment-form label {
	display: block;
	font-size: 14px;
	color: var(--ink-2);
	margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 14px;
	font-size: 15px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
}

.comment-form textarea {
	min-height: 120px;
}

.comment-form .submit {
	display: inline-flex;
	align-items: center;
	padding: 11px 24px;
	font-size: 15px;
	font-weight: 500;
	background: var(--brand);
	color: #fff;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--brand-600);
}

.comment-notes,
.logged-in-as {
	font-size: 13px;
	color: var(--ink-3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
	.list-layout {
		grid-template-columns: 1fr;
	}

	.list-side {
		position: static;
	}
}

@media (max-width: 640px) {
	.post-item {
		flex-direction: column;
		gap: 12px;
	}

	.post-thumb {
		width: 100%;
		height: 168px;
	}

	.article {
		padding: 22px 18px 26px;
	}

	.article-title {
		font-size: 22px;
	}

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

	.article-nav {
		grid-template-columns: 1fr;
	}

	.comments-area {
		padding: 20px 18px 24px;
	}
}
