/*
Theme Name: 丽芳园林 (LFYL)
Theme URI: https://www.gdlifang.com/
Author: 丽芳园林
Description: 丽芳园林官网主题。由原 ASP（VanCheer CMS）站点的前端 1:1 迁移：样式、脚本与图片沿用旧站；导航与内容全部对接 WordPress 的独立页面与文章分类；“关于丽芳 / 加入丽芳 / 联系我们”为独立页面模板，新闻、业务、案例为文章列表；首页跑马灯由配套插件「丽芳跑马灯」提供；内置伪静态（旧地址 301 兼容）、SEO / GEO（TDK、canonical、JSON-LD、llms.txt）与在线留言（基于评论）。兼容 PHP 7.4 – 8.6（已在 PHP 8.6.0 下实测）。
Version: 1.0.2
Requires PHP: 7.4
Tested up to: 7.1
Requires at least: 6.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lfyl
Tags: blog, custom-logo, custom-menu, editor-styles, featured-images, theme-options, translation-ready
*/

/*
 * 说明：旧站样式表（assets/css/base.css、public.css、style.css）原样保留并在本文件之前加载，
 * 本文件只包含迁移到 WordPress 所需的少量补充规则。
 */

/* 语义化标题（h1–h3）代替了旧站的 div 标题：继承父级字体与颜色，表现与 div 完全一致。 */
h1, h2, h3, h4, h5, h6 {
	font: inherit;
	color: inherit;
}

/* WordPress 生成的图片带有宽高属性：高度按比例自适应，避免被 max-width 压窄后变形。 */
img {
	height: auto;
}

/* 原生按钮代替旧站的 div 按钮（留言提交、案例搜索）。 */
button.cont3btn,
.casesearch .btn {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	font-family: inherit;
}
button.cont3btn {
	display: block;
	padding: 0;
}
.casesearch .btn {
	border: none;
}

/* 首页“集团简介”：未配置宣传视频时用封面图代替视频，与旧站视频（16:9）占位一致。 */
.homeaboutR .video img.sV-video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	-o-object-fit: cover;
	object-fit: cover;
}

/* 首页“集团简介”企业文化轮播：旧站图片统一为 780×300（2.6:1）且无 CSS 宽高约束，容器比例完全由图片
   自身比例决定；这里把比例固定为旧站的 2.6:1，任意比例的图片（含占位图）都按 cover 裁切，不改变容器高度。 */
.homeaboutLslide .img img {
	display: block;
	width: 100%;
	aspect-ratio: 780 / 300;
	-o-object-fit: cover;
	object-fit: cover;
}

/* 首页“集团简介”宣传视频：盒子固定为旧站的 16:9（旧站视频原生 1280×720），
   视频元数据未加载或加载失败时高度也不塌陷；未配置视频与封面时用占位块保持同样的高度。 */
.homeaboutR .video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
}
.homeaboutR .video .lfyl-video-empty {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #e6ebf2;
	color: #9aa7b8;
}

/* 业务列表“查看更多”：旧站为 div 按钮，这里是指向下一页的链接，保持块级显示。 */
a.businmore {
	display: block;
}

/* 招聘职位卡片：与旧站一样为 div（整张卡片可点击，见 theme.js），标题与“查看详情”是文章链接。 */
.recruititem .more {
	display: block;
}

/* 联系我们：未配置地图嵌入代码时，地图区域显示“查看地图”链接。 */
.lfyl-map-empty {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
}
.lfyl-maplink {
	display: inline-block;
	height: 42px;
	line-height: 38px;
	padding: 0 22px;
	border: 2px solid #004099;
	border-radius: 42px;
	color: #004099;
	font-weight: bold;
}

/* 空状态提示位于弹性布局容器中时占满一行。 */
.boxflex > .pageSitua {
	width: 100%;
}

/* 独立页面默认模板的正文区域。 */
.lfyl-page {
	padding: 80px 0;
	color: #666;
	font-size: 16px;
	line-height: 2;
}

/* 正文分页（<!--nextpage-->）。 */
.lfyl-page-links {
	margin: 30px 0 0;
}
.lfyl-page-links a,
.lfyl-page-links span {
	display: inline-block;
	padding: 4px 12px;
	margin: 0 6px 6px 0;
	border: 1px solid #dcdcdc;
	border-radius: 20px;
}
.lfyl-page-links span {
	background-color: #004099;
	border-color: #004099;
	color: #fff;
}

/* 后台管理工具条显示时，固定头部下移。 */
@media ( min-width: 783px ) {
	.admin-bar .headbox {
		top: 32px;
	}
}
@media ( max-width: 782px ) {
	.admin-bar .headbox {
		top: 46px;
	}
}

/* 无障碍：屏幕阅读器专用文字。 */
.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;
}

/* 在线留言：蜜罐字段（仅机器人可见）。 */
.lfyl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* 在线留言：提交结果提示。 */
.lfyl-notice {
	padding: 14px 20px;
	margin: 0 auto 30px;
	border-radius: 6px;
	background-color: #fff;
	color: #1a7f37;
	text-align: center;
}

/* 文章 / 页面正文。字号、行高、颜色沿用旧站各内容区（.newsdetcon、.about .text 等）自身的样式，
   这里只补充 WordPress 编辑器输出元素（段落、标题、列表、表格等）的间距；assets/css/editor-style.css 与之对应。 */
.lfyl-content {
	word-break: break-word;
}
.lfyl-content > *:first-child {
	margin-top: 0;
}
.lfyl-content > *:last-child {
	margin-bottom: 0;
}
.lfyl-content p {
	margin: 0 0 1em;
}
.lfyl-content p span {
	color: inherit;
}
.lfyl-content a {
	color: #004099;
}
.lfyl-content a:hover {
	text-decoration: underline;
}
.lfyl-content h2,
.lfyl-content h3,
.lfyl-content h4 {
	color: #333;
	font-weight: bold;
	line-height: 1.4;
	margin: 1.5em 0 0.8em;
}
.lfyl-content h2 {
	font-size: 22px;
}
.lfyl-content h3 {
	font-size: 18px;
}
.lfyl-content h4 {
	font-size: 16px;
}
.lfyl-content ul,
.lfyl-content ol {
	margin: 0 0 1em;
	padding-left: 1.5em;
}
.lfyl-content ul {
	list-style: disc;
}
.lfyl-content ol {
	list-style: decimal;
}
.lfyl-content li {
	list-style: inherit;
	margin: 0 0 0.4em;
}
/* 正文中的图片：旧站内容里的图片没有外边距（间距由编辑器中的空行决定）；
   区块编辑器的图片位于 figure 中，间距见下方的 figure 规则。 */
.lfyl-content img {
	margin: 0 auto;
}
.lfyl-content figure {
	margin: 0 0 1em;
}
.lfyl-content figcaption {
	color: #999;
	font-size: 14px;
	text-align: center;
}
.lfyl-content blockquote {
	margin: 0 0 1em;
	padding: 10px 20px;
	border-left: 3px solid #004099;
	background-color: #f6f6f6;
	color: #666;
}
.lfyl-content table {
	width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
}
.lfyl-content th,
.lfyl-content td {
	padding: 8px 10px;
	border: 1px solid #e1e1e1;
}
.lfyl-content th {
	color: #333;
	font-weight: bold;
}
.lfyl-content hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid #ededed;
}
.lfyl-content .alignwide,
.lfyl-content .alignfull {
	width: 100%;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* 常见问题（折叠区块）。 */
.lfyl-content details {
	margin: 0 0 12px;
	padding: 0 16px;
	border: 1px solid #ededed;
	border-radius: 6px;
	background-color: #fff;
}
.lfyl-content details summary {
	color: #333;
	font-weight: bold;
	line-height: 48px;
	cursor: pointer;
}
.lfyl-content details[open] summary {
	border-bottom: 1px solid #ededed;
}
.lfyl-content details > *:last-child {
	margin-bottom: 14px;
}
