/* =========================================================
   JSEHS 康达检测主题样式
   风格：专业、绿白系、检测行业（参考 Appointment Green 配色）
   ========================================================= */

:root {
	--primary: #7aa228;       /* 主色：橄榄绿（来自 Appointment Green） */
	--primary-dark: #649403;  /* 深绿（hover/边框） */
	--primary-light: #eaf2d8; /* 浅绿（背景/hover 微亮） */
	--accent: #f39800;        /* 强调：橙色（保留） */
	--text: #333;
	--text-light: #666;
	--bg-gray: #f5f7fa;
	--border: #e5e8ec;
	--white: #fff;
	--container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: var(--text);
	background: var(--white);
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

/* ===================== 页头 ===================== */
.site-header { background: var(--white); }

.header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 80px;
}

.logo a { display: flex; align-items: baseline; gap: 10px; }
.logo-text {
	font-size: 28px;
	font-weight: 700;
	color: var(--primary);
	letter-spacing: 2px;
}
.logo-sub { font-size: 13px; color: var(--text-light); }

.header-contact { text-align: right; }
.hc-label { display: block; font-size: 12px; color: var(--text-light); }
.hc-phone {
	font-size: 24px;
	font-weight: 700;
	color: var(--accent);
}

/* 主导航 */
.main-nav { background: var(--primary); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.nav-menu { list-style: none; display: flex; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
	display: block;
	padding: 14px 22px;
	color: #fff;
	font-size: 16px;
	position: relative;
	transition: color .2s;
}
/* Appointment Green 风格：菜单底部下划线动画 */
.nav-menu > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 3px;
	background: var(--accent);
	transition: width .35s ease, left .35s ease;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
	color: var(--accent);
}
.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
	width: 80%;
	left: 10%;
}

/* 下拉 */
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--white);
	border: 1px solid var(--border);
	box-shadow: 0 4px 12px rgba(0,0,0,.1);
	min-width: 180px;
	z-index: 99;
	list-style: none;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a {
	display: block;
	padding: 10px 18px;
	color: var(--text);
	font-size: 14px;
}
.nav-menu .sub-menu a:hover { background: var(--primary-light); color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* ===================== 横幅 ===================== */
.hero { position: relative; overflow: hidden; background: var(--primary-dark); }

.hero-slide {
	display: none;
	height: 460px;
	background-size: cover;
	background-position: center;
	position: relative;
}
.hero-slide.active { display: block; animation: fadeIn .6s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,40,80,.7) 0%, rgba(0,40,80,.2) 60%, transparent 100%);
}

.hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 460px;
	color: #fff;
}
.hero-title { font-size: 42px; font-weight: 700; margin-bottom: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-subtitle { font-size: 18px; margin-bottom: 26px; opacity: .95; }
.hero-btn {
	display: inline-block;
	padding: 12px 32px;
	background: var(--accent);
	color: #fff;
	font-size: 15px;
	border-radius: 4px;
	width: fit-content;
}
.hero-btn:hover { background: #e08400; color: #fff; }

.hero-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 3;
}
.hero-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255,255,255,.5);
	cursor: pointer;
}
.hero-dot.active { background: var(--accent); }

/* ===================== 通用板块 ===================== */
.section { padding: 60px 0; }
.section:nth-child(even) { background: var(--bg-gray); }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head.left { text-align: left; }
.section-title {
	font-size: 30px;
	font-weight: 700;
	color: var(--primary-dark);
	position: relative;
	padding-bottom: 14px;
	display: inline-block;
}
.section-title::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background: var(--accent);
}
.section-head.left .section-title::after { left: 0; transform: none; }
.section-desc { color: var(--text-light); margin-top: 12px; }

.section-more { text-align: center; margin-top: 36px; }
.btn-primary {
	display: inline-block;
	padding: 11px 30px;
	background: var(--primary);
	color: #fff;
	border-radius: 4px;
	font-size: 15px;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

/* ===================== 业务板块 ===================== */
.services-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.service-card {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 24px;
	text-align: center;
	transition: all .3s;
}
.service-card:hover { box-shadow: 0 8px 24px rgba(10,110,189,.12); transform: translateY(-4px); }

.service-thumb {
	height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}
.service-thumb img { max-height: 90px; object-fit: contain; }
.service-icon { font-size: 48px; }

.service-name { font-size: 17px; margin-bottom: 10px; }
.service-name a { color: var(--text); }
.service-name a:hover { color: var(--primary); }
.service-excerpt { font-size: 13px; color: var(--text-light); margin-bottom: 12px; min-height: 40px; }
.service-more { font-size: 13px; color: var(--primary); }

/* ===================== 公司介绍 ===================== */
.section-about { background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%); }
.about-desc { font-size: 15px; color: var(--text-light); margin: 20px 0 30px; max-width: 900px; }

.about-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}
.stat-item {
	flex: 1;
	min-width: 150px;
	background: var(--white);
	border-radius: 8px;
	padding: 22px;
	text-align: center;
	border: 1px solid var(--border);
}
.stat-num {
	font-size: 32px;
	font-weight: 700;
	color: var(--primary);
}
.stat-label { font-size: 14px; color: var(--text-light); margin-top: 6px; }

/* ===================== 新闻 ===================== */
.news-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.news-item {
	display: flex;
	gap: 18px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 18px;
	transition: box-shadow .3s;
}
.news-item:hover { box-shadow: 0 6px 18px rgba(10,110,189,.1); }

.news-date {
	text-align: center;
	background: var(--primary-light);
	border-radius: 6px;
	padding: 8px 14px;
	min-width: 64px;
	height: fit-content;
}
.nd-day { display: block; font-size: 24px; font-weight: 700; color: var(--primary); }
.nd-month { font-size: 13px; color: var(--text-light); }

.news-title { font-size: 16px; margin-bottom: 6px; }
.news-title a { color: var(--text); }
.news-title a:hover { color: var(--primary); }
.news-excerpt { font-size: 13px; color: var(--text-light); }

/* ===================== 合作伙伴 ===================== */
.partners-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}
.partner-item {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 6px;
	height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	font-size: 14px;
	color: var(--text-light);
	transition: all .3s;
}
.partner-item img { max-height: 60px; object-fit: contain; filter: grayscale(60%); opacity: .8; }
.partner-item:hover img { filter: none; opacity: 1; }

/* ===================== 页脚 ===================== */
.site-footer { background: #0c2436; color: #b6c4d1; font-size: 14px; }

.footer-top {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.2fr;
	gap: 40px;
	padding: 50px 20px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 36px;
	height: 2px;
	background: var(--accent);
}

.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 8px; }
.footer-menu a { color: #b6c4d1; }
.footer-menu a:hover { color: var(--accent); }

.footer-contact-list { list-style: none; }
.footer-contact-list li { margin-bottom: 10px; }
.footer-contact-list a { color: var(--accent); }

.footer-links { background: #091c2b; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.06); }
.fl-label { color: #7d93a5; }
.footer-links a { color: #7d93a5; margin-right: 14px; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom { background: #06141f; padding: 16px 0; text-align: center; }
.footer-bottom .container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-bottom a { color: #7d93a5; }
.footer-bottom a:hover { color: var(--accent); }

/* ===================== 内页 ===================== */
.page-banner {
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	padding: 50px 0;
	color: #fff;
}
.page-title { font-size: 30px; font-weight: 700; }

.content-wrap { display: flex; gap: 40px; padding: 50px 20px; }
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

.widget {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}
.widget-title { font-size: 16px; color: var(--primary-dark); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.widget ul { list-style: none; }
.widget li { margin-bottom: 8px; }

/* 归档列表 */
.archive-item {
	display: flex;
	gap: 20px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}
.archive-thumb { width: 220px; flex-shrink: 0; }
.archive-thumb img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }
.archive-title { font-size: 19px; margin-bottom: 8px; }
.archive-title a { color: var(--text); }
.archive-title a:hover { color: var(--primary); }
.archive-meta { font-size: 13px; color: var(--text-light); margin-bottom: 8px; display: flex; gap: 14px; }
.archive-excerpt { font-size: 14px; color: var(--text-light); margin-bottom: 10px; }
.archive-more { font-size: 14px; }

.pagination { text-align: center; margin-top: 30px; }
.pagination .nav-links { display: inline-flex; gap: 6px; }
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--text);
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 单篇 */
.single-post {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 30px;
}
.single-meta { font-size: 13px; color: var(--text-light); display: flex; gap: 14px; margin-bottom: 18px; }
.single-thumb { margin-bottom: 20px; }
.single-thumb img { width: 100%; border-radius: 8px; }
.single-content { font-size: 15px; }
.single-content h2, .single-content h3 { margin: 24px 0 12px; color: var(--primary-dark); }
.single-content p { margin-bottom: 16px; }
.single-content img { border-radius: 6px; }
.single-tags { margin-top: 24px; font-size: 13px; color: var(--text-light); }

/* 404 */
.error-404-wrap { justify-content: center; }
.error-404 { text-align: center; padding: 60px 0; }
.error-code { font-size: 120px; color: var(--primary-light); font-weight: 700; }
.error-desc { font-size: 18px; color: var(--text-light); margin: 20px 0 30px; }

/* ===================== 响应式 ===================== */
@media (max-width: 992px) {
	.services-grid { grid-template-columns: repeat(2, 1fr); }
	.partners-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-top { grid-template-columns: repeat(2, 1fr); }
	.content-wrap { flex-direction: column; }
	.sidebar { width: 100%; }
}

@media (max-width: 640px) {
	.nav-toggle { display: block; }
	.nav-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--primary);
		flex-direction: column;
		z-index: 100;
	}
	.nav-menu.open { display: flex; }
	.nav-menu > li > a { padding: 12px 20px; }
	.nav-menu .sub-menu { position: static; box-shadow: none; border: none; background: var(--primary-dark); }
	.nav-menu .sub-menu a { color: #fff; }

	.services-grid { grid-template-columns: 1fr; }
	.partners-grid { grid-template-columns: repeat(2, 1fr); }
	.news-list { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr; }
	.archive-item { flex-direction: column; }
	.archive-thumb { width: 100%; }
	.hero-slide, .hero-content { height: 320px; }
	.hero-title { font-size: 28px; }
	.header-contact { display: none; }
}
