/*
Theme Name: zwxic
Theme URI: https://reversepcba.com
Author: zwxic
Author URI: https://reversepcba.com
Description: ZWXIC一款轻量纯净的 WordPress 主题，主打极简架构。支持全站模板自定义，页头、页脚、文章页、归档页均可独立设计，原生空画布模式，一键开启全宽布局，代码精简，加载轻快，无多余功能拖累站点。
Version: 1.7
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: zwxic
Tags: flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-width-template, rtl-language-support, threaded-comments, translation-ready
*/

/* ==========================================================================
   基础
   ========================================================================== */

html {
	line-height: 1.7;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", sans-serif;
	font-size: 16px;
	color: #333;
	background-color: #fff;
}

a {
	color: #4169e1;
	text-decoration: none;
}

a:hover,
a:focus {
	color: #2a4bb0;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: #222;
	line-height: 1.3;
	margin: 0 0 0.75em;
	font-weight: 600;
}

p {
	margin: 0 0 1.25em;
}

ul,
ol {
	margin: 0 0 1.25em 1.25em;
	padding: 0;
}

blockquote {
	margin: 0 0 1.25em;
	padding: 0.75em 1.25em;
	border-left: 4px solid #e0e0e0;
	color: #555;
	font-style: italic;
}

table {
	width: 100%;
	margin: 0 0 1.25em;
	border-collapse: collapse;
}

table th,
table td {
	padding: 0.5em;
	border: 1px solid #e0e0e0;
	text-align: left;
}

/* ==========================================================================
   内容容器
   ========================================================================== */

.site-content-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

.site-main {
	flex: 1 1 600px;
	min-width: 0;
	margin: 0;
	padding: 0;
	max-width: none;
}

/* 有侧边栏时加宽整体容器 */
body.zwxic-has-sidebar .site-content-wrap {
	max-width: 1200px;
}

.widget-area.sidebar {
	flex: 0 0 300px;
	max-width: 100%;
}

/* Elementor 全宽页面自动取消内边距限制 */
body.elementor-page .site-content-wrap {
	max-width: none;
	padding: 0;
}

/* ==========================================================================
   挂件（Widgets）
   ========================================================================== */

.widget {
	margin: 0 0 2rem;
	font-size: 0.95rem;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	font-size: 1.15rem;
	margin: 0 0 0.75em;
}

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

.widget ul li {
	margin-bottom: 0.5em;
}

.widget select {
	max-width: 100%;
}

/* 页脚挂件区 */
.site-footer-widgets {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem 0;
}

.site-footer-widgets .widget {
	flex: 1 1 250px;
}

@media (max-width: 768px) {
	.site-content-wrap {
		flex-direction: column;
	}

	.widget-area.sidebar {
		flex: 1 1 100%;
	}
}

/* ==========================================================================
   对齐
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0 1.5em 1.5em 0;
}

.alignright {
	float: right;
	margin: 0 0 1.5em 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin: 0 auto 1.5em;
}

.alignwide {
	margin-left: -4rem;
	margin-right: -4rem;
	max-width: calc(100% + 8rem);
}

.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

/* ==========================================================================
   媒体与图注
   ========================================================================== */

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

.wp-caption img {
	display: block;
	margin: 0 auto;
}

.wp-caption-text,
.wp-caption .wp-caption-text {
	margin: 0.5em 0 0;
	font-size: 0.875em;
	color: #777;
	text-align: center;
}

.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin-bottom: 1.5em;
}

.gallery-item {
	flex: 1 1 150px;
	margin: 0;
}

/* ==========================================================================
   无障碍辅助
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: #000;
	color: #fff;
	padding: 0.75em 1em;
	z-index: 100000;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 0;
	color: #fff;
}

.sticky {
	display: block;
}

.bypostauthor {
	display: block;
}

/* ==========================================================================
   搜索表单
   ========================================================================== */

.search-form {
	display: flex;
	max-width: 400px;
}

.search-form .search-field {
	flex: 1;
	padding: 0.6em 0.9em;
	border: 1px solid #ccc;
	border-radius: 4px 0 0 4px;
	font-size: 1rem;
}

.search-form .search-submit {
	padding: 0.6em 1.25em;
	border: 1px solid #4169e1;
	border-left: none;
	border-radius: 0 4px 4px 0;
	background: #4169e1;
	color: #fff;
	cursor: pointer;
	font-size: 1rem;
}

/* ==========================================================================
   评论
   ========================================================================== */

.comments-area {
	margin-top: 3rem;
}

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

.comment-list .children {
	list-style: none;
	margin-left: 2rem;
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
}

.comment-meta {
	font-size: 0.875rem;
	color: #777;
}

.comment-reply-link {
	font-size: 0.875rem;
}

/* ==========================================================================
   默认页头 / 页脚（无 Elementor Pro 模板时的回退样式）
   ========================================================================== */

.site-header {
	background: #fff;
	border-bottom: 1px solid #eee;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
}

.site-branding .site-title {
	margin: 0;
	font-size: 1.5rem;
}

.site-branding .site-title a {
	color: #222;
}

.site-branding .custom-logo {
	max-height: 60px;
	width: auto;
}

.site-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-navigation a {
	color: #333;
	font-weight: 500;
}

.site-navigation a:hover {
	color: #4169e1;
}

.site-footer {
	background: #f7f7f7;
	border-top: 1px solid #eee;
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	font-size: 0.875rem;
	color: #666;
}

.site-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 768px) {
	.site-header__inner,
	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}
