/* 全局样式设置 */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #eceff1; /* 使用淡青蓝白色作为背景 */
  padding-top: 70px; /* 为固定导航栏添加顶部内边距 */
  padding-bottom: 0; /* 移除底部内边距 */
  margin-bottom: 0; /* 移除底部外边距 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1 0 auto; /* 让主内容区域自动占据剩余空间 */
  padding-bottom: 50px; /* 确保内容底部有足够空间 */
}

/* 主色调设置 - 工业简约风格颜色（带冷色调） */
:root {
  --primary-color: #37474f; /* 深青蓝灰色 */
  --secondary-color: #78909c; /* 中青蓝灰色 */
  --accent-color: #546e7a; /* 青灰色调 */
  --light-color: #eceff1; /* 淡青蓝白色 */
  --dark-color: #263238; /* 暗青蓝黑色 */
}

/* 导航栏样式 */
.navbar {
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-weight: bold;
  color: #ffffff !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #ffffff !important;
  border-bottom: 2px solid var(--accent-color);
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #29363d; /* 深一点的青蓝灰色 */
  border-color: #29363d;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-accent {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background-color: #4b636e;
  border-color: #4b636e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 页脚样式 */
.footer {
  position: relative; /* 改为相对定位 */
  width: 100%;
  flex-shrink: 0; /* 防止页脚缩小 */
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 30px 0; /* 保持内边距 */
  margin-top: 0; /* 移除顶部边距 */
}

.footer h5 {
  font-weight: 600;
  margin-bottom: 20px;
}

.footer address p {
  margin-bottom: 10px;
}

.footer a {
  color: var(--light-color);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.footer-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  text-decoration: none;
}

.footer-brand span {
  color: var(--light-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 卡片样式 */
.card {
  box-shadow: 0 2px 8px rgba(55, 71, 79, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #fff;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(55, 71, 79, 0.12);
}

.card-body {
  padding: 1.5rem;
}

/* 标题样式 */
.section-title {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 15px;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center; /* 统一居中 */
}

.section-title:after {
  content: '';
  position: absolute;
  left: 50%; /* 居中下划线 */
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
  transform: translateX(-50%); /* 居中下划线 */
}

/* Banner样式 */
.hero-section {
  background-color: var(--primary-color);
  color: white;
  padding: 80px 0;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
}

.hero-section:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(55,71,79,0.95) 0%, rgba(38,50,56,0.85) 100%); /* 调整渐变背景 */
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* 统一页面头部样式 */
.bg-primary.text-white.py-5.mb-5 {
  background-color: var(--primary-color) !important;
  position: relative;
  overflow: hidden;
  padding: 80px 0 !important;
}

.bg-primary.text-white.py-5.mb-5:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(55,71,79,0.95) 0%, rgba(38,50,56,0.85) 100%); /* 调整渐变背景 */
  z-index: 1;
}

.bg-primary.text-white.py-5.mb-5 .container {
  position: relative;
  z-index: 2;
}

.bg-primary.text-white.py-5.mb-5 h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.bg-primary.text-white.py-5.mb-5 p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* 产品展示样式 */
.product-item {
  margin-bottom: 30px;
}

.product-img-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.product-img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  padding: 15px;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

/* 响应式容器 */
.container-fluid {
  max-width: 1400px;
}

/* 通用间距调整 */
section {
  margin-bottom: 60px;
}

/* 表单控件焦点状态 */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

/* 设置bg-light背景颜色为适合工业简约风格的浅灰色 */
.bg-light {
  background-color: var(--light-color) !important;
}

/* 修改表格的浅色背景 */
.table-light {
  background-color: #e1e5e7;
}

/* 浅色背景圆形图标 */
.rounded-circle.bg-light {
  background-color: #cfd8dc !important;
}

/* 确保所有使用bg-primary的元素使用新的颜色 */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.badge.bg-primary {
  background-color: var(--primary-color) !important;
}

/* 文本颜色 */
.text-primary {
  color: var(--primary-color) !important;
}

/* 边框颜色 */
.border-primary {
  border-color: var(--primary-color) !important;
}

/* 按钮轮廓 */
.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* 链接颜色 */
a {
  color: var(--primary-color);
}

a:hover {
  color: #353535;
}

.footer-wecom {
  max-width: 132px;
  margin-bottom: 1rem;
}

.footer-wecom-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.6rem;
  padding: 0.45rem;
  border-radius: 10px;
  background-color: #fff;
}

/* 调整徽章颜色 */
.badge.bg-danger {
  background-color: var(--accent-color) !important;
}

/* 添加一些微妙的边框色彩 */
.border {
  border-color: #b0bec5 !important;
}

/* 滚动条样式调整 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #cfd8dc;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* 修改分隔线颜色 */
hr {
  border-color: #b0bec5;
  opacity: 0.4;
}

/* 覆盖Bootstrap的表单控件焦点样式 */
.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(84, 110, 122, 0.25);
}

/* 支持文档样式 */
