/* --- 全局样式重置 --- */
:root {
	--primary-color: #0056b3; /* 科技蓝 */
	--secondary-color: #f39c12; /* 活力橙，用于强调 */
	--text-dark: #333;
	--text-light: #666;
	--bg-light: #f9f9f9;
	--white: #ffffff;
	--max-width: 1200px;
}

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

body {
	font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	line-height: 1.6;
	color: var(--text-dark);
	background-color: var(--white);
	padding-top: 80px;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

.section-title {
	text-align: center;
	margin-bottom: 50px;
}

.section-title h2 {
	font-size: 2.5rem;
	color: var(--primary-color);
	margin-bottom: 10px;
}

.section-title p {
	color: var(--text-light);
	font-size: 1.1rem;
}

section {
	padding: 80px 0;
}

/* --- 导航栏 --- */
header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  height: 60%;
}

.logo span {
  color: var(--text-dark);
  margin-left: 5px;
  font-size: 1rem;
  font-weight: normal;
  padding-top: 13px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links li {
  position: relative;         /* 为列表项添加相对定位 */
}

/* ⭐ 关键修改：给 a 标签添加相对定位 */
.nav-links a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;         /* ⭐ 关键：让伪元素相对于 a 标签定位 */
  padding-bottom: 8px;        /* 给横条留出空间 */
  display: inline-block;      /* 确保宽度自适应 */
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* 横条动画 */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%; /* 从中心开始 */
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease; /* 同时动画宽度和位置 */
  transform: translateX(-50%); /* 居中 */
}

.nav-links a:hover::after {
  width: 100%; /* 展开到100% */
  left: 50%; /* 保持中心位置 */
}

/* 可选：当前页面高亮效果 */
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  width: 100%;
}

.btn-cta {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 25px;
  border-radius: 5px;
  font-weight: bold;
}

.btn-cta:hover {
  background: #004494;
  color: var(--white);
}

/* --- 移动端菜单按钮 (纯 CSS 绘制) --- */
.menu-toggle {
  display: none; /* 默认隐藏，移动端显示 */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001; /* 确保在菜单上层 */
}

/* 三条横线的样式 */
.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-dark); /* 线条颜色 */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}


/* --- Hero Banner --- */
.hero {
	height: 100vh;
	background: linear-gradient(rgba(0, 86, 179, 0.7), rgba(0, 86, 179, 0.7)), url('https://images.unsplash.com/photo-1565619624098-e659884c6d65?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80'); /* 替换为实际工厂或产品图 */
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--white);
	margin-top: 0; 
	padding-top: 80px;
}

.hero-content h1 {
	font-size: 3.5rem;
	margin-bottom: 20px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
	font-size: 1.5rem;
	margin-bottom: 30px;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.hero-btn {
	display: inline-block;
	background: var(--secondary-color);
	color: var(--white);
	padding: 15px 40px;
	font-size: 1.2rem;
	border-radius: 50px;
	font-weight: bold;
	border: 2px solid var(--secondary-color);
}

.hero-btn:hover {
	background: transparent;
	color: var(--white);
}

/* --- 关于我们 (数据条) --- */
.about-stats {
	background: var(--bg-light);
	padding: 60px 0;
}


.content-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 30px;
	text-align: center;
}

.stat-item h3 {
	font-size: 2.5rem;
	color: var(--primary-color);
	margin-bottom: 10px;
}

.stat-item p {
	font-size: 1.1rem;
	color: var(--text-light);
}

/* --- 产品中心 --- */
.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.product-card {
	background: var(--white);
	border: 1px solid #cdcdcd;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
	position: relative;
	padding-bottom: 25px;
}

.product-card:hover {
	/* transform: translateY(-5px); */
	box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-img {
	height: 200px;
	background-color: #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #888;
	font-size: 1.2rem;
	/* 实际使用时替换为 background-image */
	background-size: cover;
	background-position: center;
}

.card-body {
	padding: 25px;
}

.card-body h3 {
	color: var(--primary-color);
	margin-bottom: 15px;
	font-size: 1.4rem;
}

.card-body ul {
	margin-bottom: 20px;
	color: var(--text-light);
}

.card-body ul li {
	margin-bottom: 8px;
	padding-left: 15px;
	position: relative;
}

.card-body ul li::before {
	content: "•";
	color: var(--secondary-color);
	position: absolute;
	left: 0;
	font-weight: bold;
}

.card-link {
	color: var(--primary-color);
	font-weight: bold;
	display: inline-flex;
	align-items: center;
	position: absolute;
	bottom: 20px;
	left: 50%;
	margin-left: -15%;
	border: 1px solid #004494;
	padding:3px 8px;
	border-radius: 5px;
}

.color-blue{
	color: #004494 !important;
}

.card-link:hover{
	border: 1px solid #004494;
	color: white;
	background-color: #004494;
}

.card-link::after {
	/* content: "→"; */
	margin-left: 5px;
	transition: margin-left 0.3s;
}

.card-link:hover::after {
	margin-left: 10px;
}

/* --- 技术优势 --- */
.features {
	background: var(--primary-color);
	color: var(--white);
}

.features .section-title h2 { color: var(--white); }
.features .section-title p { color: rgba(255,255,255,0.8); }

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 40px;
	text-align: center;
}

.feature-item i {
	font-size: 3rem;
	margin-bottom: 20px;
	display: block; /* 模拟图标 */
	color: var(--secondary-color);
}

.feature-icon {
	font-size: 40px;
	margin-bottom: 15px;
	display: block;
}

.feature-item h3 { margin-bottom: 15px; }
.feature-item p { opacity: 0.9; }

/* --- 联系我们 --- */
.contact-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
}

.contact-info h3 {
	font-size: 1.5rem;
	margin-bottom: 20px;
	color: var(--primary-color);
}

.info-item {
	margin-bottom: 20px;
	display: flex;
	align-items: flex-start;
}

.info-item strong {
	min-width: 80px;
	display: inline-block;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-family: inherit;
}

.contact-form button {
	background: var(--primary-color);
	color: var(--white);
	border: none;
	padding: 15px 30px;
	font-size: 1rem;
	border-radius: 5px;
	cursor: pointer;
	transition: 0.3s;
}

.contact-form button:hover {
	background: #004494;
}

/* --- Footer --- */
footer {
	background: #222;
	color: #aaa;
	padding: 40px 0;
	margin: 0;
	text-align: center;
}

footer p {
	margin-bottom: 10px;
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr; /* 两列等宽 */
	gap: 40px; /* 间距 */
	align-items: center; /* 垂直居中 */
}

/* --- 响应式适配 --- */
@media (max-width: 768px) {
	.nav-links {
		display: none; /* 简化处理，实际项目需加JS切换 */
		position: absolute;
		top: 80px;
		left: 0;
		width: 100%;
		background: var(--white);
		flex-direction: column;
		padding: 20px;
		box-shadow: 0 5px 10px rgba(0,0,0,0.1);
		z-index: 999;
	}

	.nav-links.active {
		display: flex;
	}

	.menu-toggle {
		display: flex;
	}
	.menu-toggle.active span:nth-child(1) {
	  transform: translateY(9px) rotate(45deg);
	  background-color: var(--primary-color);
	}
	.menu-toggle.active span:nth-child(2) {
	  opacity: 0;
	}
	.menu-toggle.active span:nth-child(3) {
	  transform: translateY(-9px) rotate(-45deg);
	  background-color: var(--primary-color);
	}
	
	.grid-2 {
		grid-template-columns: 1fr; /* 双列变单列 */
	}

	.hero-content h1 { font-size: 2.5rem; }
	.hero-content p { font-size: 1.2rem; }
	
	.contact-container {
		grid-template-columns: 1fr;
	}
}