/* 通用 Flex 样式 */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}
body {
  background-color: #f7fff6;
}
.w-1200 {
  width: 1200px;
  display: flex;
}

/* Header 样式 */
.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: rgba(221, 251, 220, 1);
  padding: 0 40px; /* 左右内边距 */
  height: 58px;
}
.site-header .w-1200 {
  display: flex;
  align-items: center;
  padding: 0 120px;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px; /* logo 与文本之间的间隔 */
}

.site-header .logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.site-header .logo span {
  font-family: Poppins-Bold, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: rgba(0, 0, 0, 1); /* Logo 文本颜色 */
  text-align: left;
  white-space: nowrap;
}

/* 导航菜单 */
.site-header nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.site-header nav ul {
  display: flex;
  height: 35px;
  gap: 30px; /* 导航项之间的间距 */
  list-style: none;
}

.site-header nav ul li {
  padding: 4px 0;
}
.site-header nav ul li:hover,
.active {
  border-bottom: 2px solid #000;
}

.site-header nav ul li a {
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-header nav ul li a:hover {
  /* color: rgb(255, 147, 147); 鼠标悬停时的颜色 */
}

/* 登录按钮 */
.site-header .btn {
  padding: 8px;
  font-size: 12.5px;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  border-radius: 2px;
  border: 2px solid rgba(69, 106, 118, 1);
}

/* 登录信息样式 */
.site-header .login-info {
  display: none;
  align-items: center;
  gap: 15px; /* 间距 */
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
}

.site-header .login-info span {
  font-weight: 600; /* 强调用户名 */
}

.site-header .login-info button {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background-color: rgba(69, 106, 118, 1);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.site-header .login-info button:hover {
  background-color: rgba(49, 85, 99, 1); /* 悬停时颜色变化 */
}

/* Footer 样式 */
.site-footer {
  display: flex;
  justify-content: center;
  background-image: linear-gradient(
    171deg,
    rgba(221, 251, 220, 1) 0,
    rgba(168, 208, 189, 1) 100%
  );
  padding: 30px 0;
  width: 100%;
}

.site-footer .container {
  width: 1200px;
  display: flex;
  flex-direction: column;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.footer-title {
  font-family: Poppins-Bold, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: rgba(0, 0, 0, 1);
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links li a {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links li a:hover {
  color: rgba(0, 0, 0, 1);
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 20px;
}

/* 各个部分的对齐 */
.site-footer .footer-top > div {
  width: 23%;
}

.site-footer .footer-top > div:last-child {
  width: auto;
}

.site-footer .footer-bottom {
  font-size: 14px;
}

/* 侧栏客服样式 - 完全匹配参考风格 */
.service-aside {
  position: fixed;
  top: 50%;
  right: 0;
  width: 74px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 0;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  background-color: var(--card-bg); /* 使用全局变量，统一背景色 */
  box-shadow: 0px 0px 10px 1px rgba(87, 73, 73, 0.4);
  transform: translateY(-50%); /* 修正垂直居中写法，更规范 */
  z-index: 9999; /* 提升层级，避免被遮挡 */
  transition: box-shadow 0.2s ease; /* 增加阴影过渡，更顺滑 */
}

/* 悬浮客服按钮样式 */
.floating-service-btn {
  border: 0;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--text-main); /* 使用全局文字主色 */
  cursor: pointer;
  padding: 8px 0; /* 增加内边距，扩大点击区域 */
  width: 100%; /* 按钮宽度铺满侧栏 */
  transition: color 0.2s ease, transform 0.1s ease; /* 增加过渡效果 */
}

/* 按钮图标样式 */
.floating-service-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain; /* 保证图标不变形 */
  margin-bottom: 4px; /* 图标与文字间距 */
  transition: transform 0.2s ease; /* 图标缩放过渡 */
}

/* 按钮悬停效果 */
.floating-service-btn:hover {
  color: var(--primary); /* 悬停时文字变主题色 */
  transform: translateY(-2px); /* 轻微上移 */
}

.floating-service-btn:hover img {
  transform: scale(1.1); /* 图标轻微放大 */
}

/* 修复 dialog 居中问题 */
dialog#service-dialog {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
  padding: 0;
  width: 320px;
  max-width: 90%;
  position: relative;
  overflow: hidden;
  /* 关键：使用 transform 实现居中 */
  transform: translate(-50%, -50%);
}

/* 让 dialog 在视口中心显示 */
dialog[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  background-color: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
  padding: 12px;
  width: 320px;
  max-width: 90%;
  transition: opacity 0.2s ease;
}

/* backdrop 样式 */
dialog[open]::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

/* 图片样式 */
dialog#service-dialog img {
  width: 340px;
  height: 340px;
  object-fit: contain;
}

/* 关闭按钮样式 */
.dialog-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dialog-close:hover {
  color: #333;
  background-color: #f0f0f0;
}
