/* 自定义导航栏样式：非透明、置顶、最高优先级 */
.custom-header-fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff !important; /* 确保非透明背景 */
  z-index: 9999 !important; /* 最高优先级 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影提升层次感 */
  transition: all 0.3s ease;
}

/* 粘性状态保持样式 */
.header-sticky.custom-header-fixed {
  background-color: #ffffff !important;
}

/* 语言切换器样式 */
.lang-switcher-wrapper {
  margin-right: 0 !important; /* 移除外边距，让内容在边框间自然居中 */
  padding: 0 20px !important; /* 使用对称内边距 */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important; /* 水平居中 */
  height: 100% !important;
  border-left: 1px solid #ebebeb; /* 补齐左侧长竖线 */
  border-right: 1px solid #ebebeb; /* 补齐右侧长竖线 */
}

.lang-switcher {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px;
  font-weight: 500;
  color: #171717;
  line-height: 1 !important;
  height: 100% !important;
}

.lang-switcher .lang-btn {
  color: #777;
  transition: all 0.3s ease;
  padding: 0 10px !important; /* 对称间距 */
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.lang-switcher .lang-btn:hover,
.lang-switcher .lang-btn.active {
  color: #ff5e14; /* 匹配主题橙色 */
}

.lang-switcher .dvdr {
  color: #ddd;
  margin: 0 2px;
}

/* 移动端菜单适配 */
@media (max-width: 1199px) {
  .lang-switcher-wrapper {
    margin-right: 10px;
  }
}

@media (max-width: 1199px) {
  body {
    padding-top: 70px;
  }
}

/* Header 居中和结构微调 */
.custom-header-fixed {
  height: 80px !important; /* 设置统一的高度 */
  display: flex !important;
  align-items: center !important;
}

.mobile-header-row {
  height: 80px !important;
  width: 100% !important;
}

.mobile-logo-img {
  max-height: 40px !important;
  width: auto !important;
}

.mobile-title-text {
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #171717 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.mobile-drawer-btn {
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 15px !important;
  font-size: 24px !important;
  color: #171717 !important;
  background: transparent !important; /* 背景透明 */
  border: none !important; /* 移除边框 */
  box-shadow: none !important; /* 移除阴影 */
}

@media (max-width: 1199px) {
  .tp-header-right {
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
  }

  .tp-header-right ul {
    height: 80px !important;
  }

  .tp-header-right ul li {
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important; /* 确保 li 背景也透明 */
  }
}

/* 覆盖原始高度 */
.tp-logo-border {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  height: 80px !important;
}

.tp-main-menu ul li a {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  height: 80px !important;
}

.tp-header-right ul li {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  height: 80px !important;
}

* {
  box-sizing: border-box !important;
}

/* 全局移动端适配修复 */
html,
body {
  overflow-x: hidden !important; /* 防止移动端水平滚动 */
  width: 100%;
  position: relative;
}

/* 电脑端容器宽度限制 */
@media (min-width: 1440px) {
  .container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 确保 header-pl-pr 不会因为 padding 导致宽度溢出 */
  .header-pl-pr {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 保持移动端 100% */
@media (max-width: 1199px) {
  .container,
  .container-fluid {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

.row {
  margin-left: -15px !important;
  margin-right: -15px !important;
  display: flex;
  flex-wrap: wrap;
}

.col-12,
.col-xl-12,
.col-lg-12,
.col-md-12,
.col-sm-12 {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* 移动端导航栏按钮样式 */
.tp-menu-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 80px !important;
  padding: 0 15px !important;
  color: #171717 !important;
  font-size: 24px !important;
  cursor: pointer;
  background: transparent !important; /* 确保背景透明 */
  border: none !important;
  position: relative;
  z-index: 10000;
}

.tp-menu-bar i {
  color: #171717 !important;
}

/* 移动端侧边栏菜单链接修复 */
.tpoffcanvas .mobile-menu ul li a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* 解决移动端宽度溢出问题 */
@media (max-width: 1199px) {
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
  }

  #header-sticky {
    width: 100% !important;
    left: 0 !important;
  }

  .tp-hero__thumb3 {
    margin-right: 0 !important;
    width: 100% !important;
  }

  .tp-hero__thumb3 img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 隐藏可能导致水平溢出的装饰性图片 */
  .tp-hero__thumb3-shape-1,
  .tp-hero__thumb3-shape-2,
  .tp-hero-shape-3-1,
  .tp-hero-shape-3-2 {
    display: none !important;
  }
}

.tp-header-right ul {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 粘性状态下的高度 */
.header-sticky.custom-header-fixed {
  height: 70px;
}
.header-sticky .tp-logo-border,
.header-sticky .tp-main-menu ul li a,
.header-sticky .tp-header-right ul li {
  height: 70px !important;
}

/* 确保右侧 ul 本身也是 flex 并居中 */
.tp-header-right ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  margin-bottom: 0;
}

/* 电脑版更多按钮隐藏 */
@media only screen and (min-width: 1200px) {
  .tp-menu-bar {
    display: none !important;
  }
}

/* Footer 联系方式对齐修复 */
.tp-footer-widget__list ul.footer-position li {
  padding-left: 0 !important;
  margin-bottom: 25px !important;
}

.tp-footer-widget__list ul.footer-position li a {
  display: flex !important;
  align-items: center !important; /* 核心：让图标和文本在纵向完全居中 */
  gap: 15px !important; /* 图标与文字之间的间距 */
  text-align: left !important;
}

.tp-footer-widget__list ul.footer-position li a span:first-child {
  position: static !important; /* 移除之前的绝对定位 */
  font-size: 22px !important;
  color: var(--tp-common-white);
  flex-shrink: 0; /* 防止图标被压缩 */
  width: 30px; /* 给图标一个固定的宽度，确保后面的文字垂直对齐一致 */
  text-align: center;
}

.tp-footer-widget__list ul.footer-position li a span:last-child {
  position: static !important;
  display: block !important;
  line-height: 1.4 !important;
  font-size: 15px !important;
  color: var(--tp-common-white);
}

/* 针对多行地址的特殊处理（如果是两行，图标依然居中） */
.tp-footer-widget__list
  ul.footer-position
  li
  a
  span[data-i18n="contact.address_detail"] {
  display: inline-block !important;
}

/* 案例研究（Case Studies）全宽显示 */
.tp-case-area .container-fluid {
  max-width: 100% !important;
  padding-left: 30px !important;
  padding-right: 30px !important;
}

@media (max-width: 767px) {
  .tp-case-area .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

.tp-case-area .container {
  /* 标题部分保持原有宽度限制 */
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* 页脚简约居中样式 */
.tp-footer-area .footer-position li a i {
  margin-right: 15px;
  color: var(--tp-theme-1);
  font-size: 18px;
}

.tp-footer-area .footer-position li a {
  color: var(--tp-common-white);
  font-size: 16px;
  line-height: 1.5;
}

.tp-footer-area .copy-right-text p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
}

.tp-case-wrapper {
  overflow: visible !important;
  margin-left: 0 !important; /* 核心修复：移除原始样式中 -300px 的负边距 */
  margin-right: 0 !important;
}

.tp-case-item {
  border: 5px solid var(--tp-common-white) !important;
  border-radius: 20px !important;
  overflow: hidden;
  background: var(--tp-common-white);
  transition: 0.3s;
  width: 100% !important; /* 强制占满列宽 */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.tp-case-item__thumb {
  width: 100% !important;
}

.tp-case-item__thumb img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover; /* 确保图片比例协调 */
}

/* 更多案例研究按钮隐藏 */
.case-button {
  display: none !important;
}

/* 跑马灯（Marque）文字遮挡修复 */
.tp-marque-area {
  overflow: visible !important;
}

.marque-item {
  padding-top: 60px !important; /* 增加顶部内边距，防止描边文字被切断 */
  padding-bottom: 60px !important;
}

.marque-item span {
  line-height: 1.2 !important; /* 增加行高，确保文字上下显示完整 */
  display: inline-block !important;
}

/* 导航栏高亮样式 */
.tp-main-menu ul li a.active,
.tp-main-menu ul li.active > a {
  color: var(--tp-theme-1) !important; /* 使用主题橙色 */
}

.tp-main-menu ul li a.active::after,
.tp-main-menu ul li.active > a::after {
  width: 100% !important; /* 如果有下划线动画，强制显示 */
  background-color: var(--tp-theme-1) !important;
}

/* 响应式调整 */
@media only screen and (min-width: 1200px) {
  body {
    padding-top: 80px; /* 匹配新的导航栏高度 */
  }
}
