/**
 * 德州宏辰通风设备有限公司 - 公共样式表
 * 包含基础样式、顶部工具栏、导航栏、移动端菜单等公共样式
 */

/* ==================== 基础重置样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==================== 顶部工具栏 ==================== */
.top-bar {
  background-color: #f5f5f5;
  padding: 8px 60px;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-right a {
  color: #666;
  transition: color 0.3s;
}

.top-bar-right a:hover {
  color: #c41e3a;
}

/* ==================== 主导航栏 ==================== */
.header {
  background-color: #fff;
  padding: 15px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .zh {
  font-size: 20px;
  font-weight: bold;
  color: #0055a5;
}

.logo-text .en {
  font-size: 10px;
  color: #666;
  letter-spacing: 1px;
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-item {
  font-size: 15px;
  color: #333;
  padding: 5px 0;
  position: relative;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-item:hover {
  color: #c41e3a;
}

.nav-item.active {
  color: #c41e3a;
  font-weight: bold;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #c41e3a;
  transition: width 0.3s;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

/* 下拉菜单 */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #333;
  font-size: 14px;
  border-bottom: 1px solid #eee;
  transition: all 0.3s;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
  color: #c41e3a;
}

/* 搜索图标 */
.search-icon {
  font-size: 20px;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
}

.search-icon:hover {
  color: #c41e3a;
}

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-btn {
  display: none;
}

/* ==================== 移动端响应式样式 (768px及以下) ==================== */
@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .header {
    padding: 15px 20px;
    flex-wrap: wrap;
  }

  /* 移动端导航菜单 */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

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

  .mobile-menu-btn {
    display: block;
    font-size: 24px;
    cursor: pointer;
  }
}

/* ==================== 页脚公共样式 ==================== */
.footer {
  background: #0e509a;
  color: #fff;
  padding: 60px 60px 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto 40px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #fff;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-code {
  text-align: center;
}

.qr-code img {
  width: 120px;
  height: 120px;
  margin-bottom: 10px;
}

.qr-code p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.friend-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.friend-links select {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  cursor: pointer;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #c41e3a;
  border-color: #c41e3a;
  color: #fff;
}

/* ==================== MiniMax Footer ==================== */
.inland-security-footer {
  position: fixed;
  z-index: 10;
  bottom: 0;
  right: 0;
  width: fit-content;
  display: flex;
  justify-content: flex-end;
}

.tooltip-container {
  position: relative;
}

.trigger-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background-color: transparent;
  border-radius: 8px;
  cursor: pointer;
}

.minimax-link {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 300;
  color: #adadad;
  text-decoration: none;
}

.minimax-link:hover {
  color: #666666;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  padding-bottom: 16px;
  font-size: 12px;
  line-height: 17px;
  background-color: #fafafa;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #171717;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 16px;
}

.tooltip-container:hover .tooltip-content {
  display: flex;
}

.info-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.beian-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #171717;
}

.beian-icon {
  width: 14px;
  height: 14px;
  margin-right: 2px;
}

.underline-text {
  color: #171717;
  text-decoration: underline;
}

.underline-text:hover {
  color: #000000;
}

@media (prefers-color-scheme: dark) {
  .trigger-content {
    background-color: transparent;
  }

  .minimax-link {
    color: #666666;
  }

  .minimax-link:hover {
    color: #adadad;
  }

  .tooltip-content {
    background-color: #262626;
    color: #ededed;
  }

  .beian-link,
  .underline-text {
    color: #ededed;
  }

  .underline-text:hover {
    color: #ffffff;
  }
}
