/*
Theme Name: 嘉宇劳务
Theme URI: https://www.jiayulaowu.com
Description: 上海嘉宇劳务服务有限公司 WordPress 主题。首页样式、版式、图片位置与原站 index.html 完全一致（直接复用原 Zing 主题样式资源）；启用后自动创建栏目、页面、导航菜单，后台发文首页板块与栏目页自动更新。固定链接 /%post_id%.html。
Version: 2.0.6
Author: WorkBuddy
Text Domain: jiayu
Tags: corporate, responsive, custom-menu
*/

/* 基础版式已在 assets/jy/style.css 中，此处仅做 WordPress 环境适配 */

html, body { margin: 0; padding: 0; }

/* WP 后台工具条占位，避免遮挡固定头部 */
body.admin-bar .header-v4 { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .header-v4 { top: 46px; }
}

/* 菜单结构复位（WordPress 输出的 ul/li 与静态页一致） */
.sf-menu, .touch-menu-ul { list-style: none; margin: 0; padding: 0; }
.sf-menu li, .touch-menu-ul li { list-style: none; }

/* 侧栏菜单沿用原站 .menu 样式 */
.sidebar .menu { list-style: none; margin: 0; padding: 0; }
.sidebar .menu li { list-style: none; }

/* 文章正文（迁移内容里含 qhd-content 包裹，避免重复缩进） */
.article-content .qhd-content p { text-indent: 2em; }
.article-content img { max-width: 100%; height: auto; }
.article-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* 分页 */
.pagination.pagination-default { clear: both; }
.pagination .page-numbers { display: inline-block; }

/* 搜索结果 / 404 等兜底页面 */
.jiayu-plain { padding: 60px 0 80px; }
.jiayu-plain h1 { font-size: 26px; margin-bottom: 12px; }

/* 手机端防溢出（桌面端版式保持与原站完全一致，不受影响） */
@media screen and (max-width: 767px) {
	html, body { max-width: 100%; overflow-x: hidden; }
	.page-width,
	.module-inner,
	.module-full-screen,
	.full-screen,
	.qhd-content,
	.qhd-module,
	.column,
	.content-wrapper { width: auto !important; max-width: 100% !important; box-sizing: border-box; }
	.page-width { padding-left: 12px !important; padding-right: 12px !important; }
	.column,
	.column .col-2-1,
	.column .col-2-1.last,
	.row .col-lg-4,
	.row .col-md-6 { width: 100% !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	img { max-width: 100%; height: auto; }
	.module-full-screen.module-full-3 .qhd-content img { width: 100%; }
	.module-full-screen .scrollable { overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.touch-top .touch-top-wrapper { padding: 0 10px; }
	.qhd-content p, .qhd-content span { white-space: normal !important; word-break: break-word; }
}

/* 内页顶部留白：栏目页 / 单页 / 文章页 / 搜索 / 归档
   原样式由两处各自控制——侧栏 .sidebar{position:relative;top:30px}、
   内容 .content{padding-top:15px}。桌面端恰好形成 30px 间隔且两栏齐平。
   但进入 1120px 以下断点后，原样式里的 .sidebar{top:0}、.content{padding-top:10px}
   会把侧栏偏移清零，导致顶部间距消失、两栏错位。
   这里仅在窄屏断点内把偏移归一，保持与桌面一致的 30px 间距。 */
@media screen and (max-width: 1120px) {
	.category .sidebar,
	.page .sidebar,
	.single .sidebar,
	.search .sidebar,
	.archive .sidebar {
		top: 0;
	}

	.category .content,
	.page .content,
	.single .content,
	.search .content,
	.archive .content {
		padding-top: 0;
	}
}



/* 视觉隐藏：供无障碍与 SEO 使用的标题（区块库样式已移出，主题内自带一份） */
.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;
}

/* 栅格 .row 自带 margin:0 -15px，而 .page-width 没有对应内边距，
   导致页面恒定多出 15px 横向滚动（内容本身并不越界）。
   在根元素裁剪即可，不影响布局，也不影响固定定位的头部。 */
html, body {
	overflow-x: hidden;
	overflow-x: clip;
}
