* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}

body {
  background: #f5f7fa;
  color: #333;
  line-height: 1.8;
  overflow-x: hidden; /* 新增：全局禁止横向滚动，彻底解决超宽 */
}

/* LOGO + 标题区域 */
.header {
  background: #005b96;
  color: #fff;
  padding: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative; /* 兼容En链接定位 */
  padding-left: 40px; /* 给En链接留出更充足空间 */
}

.logo-img {
  height: 80px;
  width: auto;
  transition: all 0.3s ease; /* 增加LOGO hover动效 */
}

.logo-img:hover {
  transform: scale(1.05);
}

.header-text {
  text-align: left;
}

.header h1 {
  font-size: 24px; /* 标题字号稍放大，更醒目 */
  margin-bottom: 5px;
  font-weight: 700;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

/* 外滩横幅 */
.banner img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.5s ease; /* 横幅加载/hover动效 */
}

/* 导航栏 */
.nav {
  background: #004b7c;
  text-align: center;
  padding: 14px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 增加导航栏阴影，提升层次感 */
}

.nav a {
  color: #fff;
  margin: 0 18px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: color 0.3s ease; /* 统一hover过渡 */
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #a8d8ff;
  transition: width 0.3s ease; /* 下划线动效 */
}

.nav a:hover {
  color: #a8d8ff;
}

.nav a:hover::after {
  width: 100%;
}

/* 面包屑 */
.breadcrumb {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 20px;
  font-size: 14px;
  color: #666;
  width: 100%; /* 新增：限制面包屑宽度，避免超屏 */
}

.breadcrumb a {
  color: #005b96;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #004b7c;
  text-decoration: underline;
}

/* 内容容器 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
  width: 100%; /* 新增：强制容器宽度100%，不超屏 */
  overflow-x: hidden; /* 新增：容器内禁止横向溢出 */
}

.main-title {
  font-size: 28px;
  color: #002d4a;
  margin: 30px 0;
  border-bottom: 2px solid #005b96;
  padding-bottom: 10px;
  position: relative;
}

.main-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: #004b7c; /* 标题底部短横线，增强视觉 */
}

/* 企业介绍 */
.about {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.about:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.about p {
  font-size: 15px;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.9; /* 行高微调，提升阅读体验 */
}

/* 首页 3列 */
.service-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.service-item {
  background: #fff;
  padding: 22px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease; /* 统一过渡效果 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid transparent; /* 避免hover位移 */
}

.service-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px); /* 轻微上移，增强交互 */
  border-color: #e8f4fc;
}

.service-item h3 {
  color: #005b96;
  margin-bottom: 10px;
  font-size: 19px; /* 字号微调 */
}

.service-item a {
  text-decoration: none;
  color: inherit;
  display: block; /* 整项可点击 */
  height: 100%;
}

/* ========== 产品服务页专用样式（优化版） ========== */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.service-card {
  /* 修复宽度计算偏差，改用flex-basis更稳定 */
  flex: 1 1 calc(33.333% - 14px); 
  min-width: 280px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  text-align: center;
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.service-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #e8f4fc;
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.service-card:hover img {
  transform: scale(1.03); /* 图片hover放大 */
}

.service-card h3 {
  font-size: 18px;
  color: #002d4a;
  margin-bottom: 10px;
  font-weight: 600;
}

.service-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.8;
}

.service-card a {
  display: inline-block;
  padding: 8px 20px;
  background: #005b96;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.service-card a:hover {
  background: #004b7c;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 91, 150, 0.3);
}

/* 服务子页 3列 */
.service-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px 8px 0 0; /* 图片顶部圆角，贴合容器 */
}

.service-content {
  padding: 18px;
}

.service-content h3 {
  color: #005b96;
  margin-bottom: 8px;
  font-size: 18px;
}

.service-content p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

/* 新闻 */
.news-box {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.news-box:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center; /* 时间和标题对齐 */
}

.news-item:last-child {
  border-bottom: none; /* 最后一项去掉下划线 */
}

.news-item a {
  text-decoration: none;
  color: #005b96;
  font-size: 15px;
  transition: color 0.3s ease;
  flex: 1; /* 标题占满剩余空间 */
  margin-right: 15px;
}

.news-item a:hover {
  text-decoration: underline;
  color: #004b7c;
}

.news-time {
  color: #999;
  font-size: 13px;
  white-space: nowrap; /* 时间不换行 */
}

.news-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  line-height: 2;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 底部 */
.footer {
  background: #002d4a;
  color: #fff;
  text-align: center;
  padding: 35px 20px;
  margin-top: 40px;
  font-size: 14px;
  line-height: 1.8;
  width: 100%; /* 新增：确保底部不超宽 */
  overflow-x: hidden; /* 新增：底部内容溢出隐藏 */
}

.footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #a8d8ff;
  text-decoration: underline;
}

.footer .official-link {
  color: #add8e6;
  text-decoration: underline;
}

/* 响应式（优化版） */
@media (max-width:768px){
  .header{
    flex-direction:column;
    text-align:center;
    padding-left: 20px; /* 移动端减少左侧padding */
  }
  .header-text{
    text-align:center;
  }
  .logo-img{
    height:60px;
  }
  .nav a{
    margin:0 10px;
    font-size:14px;
  }
  .nav a::after {
    display: none; /* 移动端去掉下划线，节省空间 */
  }
  .service-card{
    flex: 1 1 100%; /* 移动端卡片占满宽度 */
  }
  .service-box,
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-title {
    font-size: 24px; /* 移动端标题字号缩小 */
  }
  /* 新增：移动端service-list/service-box强制宽度100%，避免超屏 */
  .service-box, .service-list {
    width: 100%;
    padding: 0 10px; /* 移动端加内边距，避免内容贴边 */
  }
}

@media (max-width: 480px) {
  .service-box,
  .service-list {
    grid-template-columns: 1fr;
  }
  .about {
    padding: 20px 15px; /* 小屏减少内边距 */
  }
  .footer a {
    display: inline-block; /* 移动端链接换行更友好 */
    margin: 5px 8px;
  }
}

/* 新增：En语言切换链接样式（从html移到css，统一管理） */
.lang-switch {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
  z-index: 10; /* 确保不被遮挡 */
}

.lang-switch:hover {
  color: #a8d8ff;
  text-decoration: underline;
}
/* 查看详情按钮：蓝色背景 + 白色文字 */
.service-content a {
  background-color: #005b96;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}
.service-content a:hover {
  background-color: #003f73;
}
/* 适配所有设备的banner样式（核心修复：解决supply-banner超宽） */
.supply-banner {
    width: 100%; /* 宽度铺满容器 */
    overflow: hidden; /* 隐藏超出部分 */
    position: relative;
    max-width: 100vw; /* 新增：强制不超过屏幕宽度 */
}
.supply-banner img {
    width: 100%; /* 宽度铺满 */
    height: auto; /* 高度自动，保持比例 */
    min-height: 200px; /* 移动端最低高度，避免过窄 */
    max-height: 500px; /* PC端最高高度，避免过高 */
    object-fit: cover; /* 关键：裁剪但保持比例，不拉伸变形 */
    max-width: 100vw; /* 新增：图片不超屏幕宽度 */
}
/* 移动端单独优化（可选） */
@media (max-width: 768px) {
    .supply-banner img {
        max-height: 250px; /* 移动端降低高度，节省屏幕空间 */
    }
}
/* 手机端首页供应链强制竖排（最终版） */
@media (max-width: 768px) {
  .container .service-box {
    display: block !important;
  }
  .container .service-box .service-item {
    margin-bottom: 15px !important;
  }
}