/* ==================== 2. 基础样式 (Base) ==================== */
html {
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: Times, Arial;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ==================== 4. 全局布局 (Layout) ==================== */
/* 容器响应式设置 */
.container-fluid {
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* 内容区域响应式宽度 */
.content {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  background-image: linear-gradient(rgba(255, 245, 187, 0.1), #fff6d9);
}

/* ==================== 5. Header 样式 ==================== */
.wrapper {
  width: 100vw;
  position: relative;
  /* Banner 图片 */
}
.header-bg {
  position: relative;
  width: 100%;
  img {
    width: 100%;
  }
  /* 默认显示：非 IE 浏览器显示 banner，隐藏 banner2 */
  .banner-normal {
    display: block; /* 非 IE 浏览器默认显示 */
  }
  .banner-ie {
    display: none; /* 非 IE 浏览器默认隐藏 */
  }
}
.header-title {
  position: absolute;
  top: 9%;
  left: 50%;
  width: 50%;
  height: auto;
  transform: translateX(-50%);
  img {
    width: 100%;
  }
  animation: bounceIn 0.8s ease-out forwards;
}
.header-title-b {
  position: absolute;
  top: 27%;
  left: 50%;
  width: 60%;
  height: auto;
  transform: translateX(-50%);
  img {
    width: 100%;
  }
}
.header-hand-c {
  position: absolute;
  top: 36.7%;
  left: 71.5%;
  width: 17%;
  height: auto;
  transform: translateX(-50%);
  transform-origin: right top;
  animation: handSwing 3s ease-in-out infinite;
  img {
    width: 100%;
  }
  /* 非 IE 浏览器默认显示 hand 图片 */
  &.hand-normal {
    display: block;
  }
}

.header-person-d {
  position: absolute;
  top: 20.5%;
  left: 68%;
  width: 27%;
  height: auto;
  img {
    width: 100%;
  }
  /* 非 IE 浏览器默认显示 hand 图片 */
  &.hand-normal {
    display: block;
  }
}

/* 非 IE 浏览器默认显示所有 hand-normal 类的元素 */
.header-title.hand-normal,
.header-title-b.hand-normal {
  display: block;
}

/* ==================== 6. Footer 样式 ==================== */
.footer {
  width: 100%;
  height: auto;
  min-height: 10vh;
  background-color: var(--footer-bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 5; /* 确保 footer 在 content 上方 */
}

.footer .container-fluid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer_logo {
  max-width: 350px;
  height: auto;
  display: block;
}

.footer p {
  text-align: center;
  color: #fff;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* 底部上滑图标容器 */
.scroll-to-top {
  position: fixed;
  bottom: 18rem;
  right: 5rem;
  z-index: 1000;
  cursor: pointer;
}

.icon-up {
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
  border-radius: 50%;
  display: block;
  object-fit: contain;
  filter: brightness(1); /* 默认亮度 */
}

.icon-up.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover .icon-up {
  transform: translateY(-5px);
  filter: brightness(1.3) saturate(1.2); /* 悬停时变亮并增加饱和度 */
}

.scroll-to-top:active .icon-up {
  transform: translateY(-3px) scale(0.95);
}

/* 移动端和平板端隐藏按钮 */
@media (max-width: 991.98px) {
  .scroll-to-top {
    display: none !important;
  }
}

/* ==================== 7. Content 区域样式 ==================== */
.content {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0;
  z-index: 5;
}

/* 导航栏样式 */
.content-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 80%;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  background: linear-gradient(
    to right,
    rgba(254, 231, 173, 0.5) 0%,
    #f6ae19 25%,
    #f2a501 50%,
    #f6ae19 75%,
    rgba(254, 231, 173, 0.5) 100%
  );
  animation: navFadeIn 0.6s ease-out forwards;
}

.content-nav > li {
  position: relative;
  opacity: 0;
  animation: navItemFadeIn 0.5s ease-out forwards;
}

/* 为每个导航项添加延迟 */
.content-nav > li:nth-child(1) {
  animation-delay: 0.1s;
}
.content-nav > li:nth-child(2) {
  animation-delay: 0.2s;
}
.content-nav > li:nth-child(3) {
  animation-delay: 0.3s;
}
.content-nav > li:nth-child(4) {
  animation-delay: 0.4s;
}
.content-nav > li:nth-child(5) {
  animation-delay: 0.5s;
}

.content-nav > li a {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.content-nav > li a span {
  color: #fff;
  display: block;
  font-size: var(--font-size-md);
  white-space: nowrap;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

/* 悬停效果 */
.content-nav > li a:hover {
  transform: translateY(-2px);
  text-decoration: underline;
  text-decoration-color: #fff;
}

.content-nav > li a:hover span {
  color: #fff;
  transform: scale(1.05);
}

/* 点击时的反馈效果 */
.content-nav > li a:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.content-body {
  width: 75%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #fff;
  padding-bottom: 2rem;
}

.contentA,
.contentB,
.contentC,
.contentD {
  width: 100%;
  padding: 2rem 0;
}

.xiala {
  width: 100%;
  margin: 0 auto;
  display: none;
  background-color: transparent;
  transition: background-color 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  img {
    width: 100%;
    height: auto;
  }
}

/* 激活状态：显示菜单时添加背景色 */
.xiala.active {
  background-color: #edbf6b;
}

/* 标题容器 - 包含标题和线，一起居中 */
.content-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 1rem auto;
  width: fit-content;
}

.content-title {
  font-size: var(--font-size-xl);
  color: #333;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: block;
  width: fit-content;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  margin: 0;
}

.content-title:hover {
  color: #f2a501;
  transform: translateY(-2px);
  /* 悬停时字体放大10% */
  font-size: calc(var(--font-size-xl) * 1.1);
}

.content-line {
  position: relative;
  width: 20%;
  height: 4px;
  margin: 0.5rem auto 0;
  display: flex;
  gap: 4px;
  transition: all 0.5s ease;
  align-self: center;
}

/* 悬停标题时，线变长并改变颜色 */
.content-title-container:hover .content-line {
  width: 30%;
}

.content-title-container:hover .content-line::before {
  width: 60%;
  background-color: #ff6b35;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.content-title-container:hover .content-line::after {
  width: 60%;
  background-color: #4a90e2;
  box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.content-line::before {
  content: "";
  width: 49%;
  height: 4px;
  background-color: #f2a501;
  flex-shrink: 0;
  transition: all 0.5s ease;
  border-radius: 2px;
}

.content-line::after {
  content: "";
  width: 49%;
  height: 4px;
  background-color: #1665dc;
  flex-shrink: 0;
  transition: all 0.5s ease;
  border-radius: 2px;
}

/* ContentA Body 布局 */
.contentA-body {
  display: flex;
  justify-content: center;
  align-items: stretch; /* 确保左右两侧高度一致 */
  gap: 1.5rem; /* 添加左右两侧之间的间隔 */
  margin-top: 2rem;
}

/* 左侧：减小宽度，添加左侧间距 */
.contentA-left {
  width: 48%; /* 从55%减小到48% */
  flex-shrink: 0;
  position: relative; /* 为绝对定位的文案提供定位上下文 */
  align-self: stretch; /* 确保左侧拉伸到和右侧一样的高度 */
  min-height: 0; /* 允许 flex 子元素缩小 */
  display: flex; /* 添加 flex 布局 */
  flex-direction: column;
  margin-right: 2rem; /* 添加左侧间距 */
}

.contentA-left-img {
  width: 100%;
  flex: 1 1 auto; /* 占据剩余空间，允许收缩和扩展 */
  min-height: 0;
  position: relative;
  overflow: hidden;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* 图片悬停效果 */
  }
  &:hover img {
    transform: scale(1.05); /* 悬停时图片放大 */
  }
}

.contentA-left-content {
  position: absolute; /* 绝对定位，覆盖在图片上层 */
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%; /* 永远占据25%的高度 */
  background: rgba(0, 0, 0, 0.6); /* 半透明黑色背景 */
  display: flex;
  align-items: center; /* 垂直居中 */
  padding: 0.75rem 0 0.75rem 1rem;
  box-sizing: border-box;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  z-index: 2; /* 确保在图片上层 */

  p {
    color: #fff;
    font-size: var(--font-size-md);
    line-height: 1.4;
    margin: 0;
    text-align: center;
  }
}

/* 右侧：45%宽度，分为两行 */
.contentA-right {
  width: 42%;
  display: flex;
  flex-direction: column;
  gap: 0; /* 移除两行之间的间隔 */
  flex-shrink: 0;
  align-self: stretch; /* 确保右侧拉伸到和左侧一样的高度 */
  justify-content: stretch; /* 改为stretch，让内容填充整个高度 */
  background-color: #f8f9fa; /* 卡片背景色 */
  border-radius: 12px; /* 圆角 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); /* 阴影效果 */
  transition: all 0.3s ease; /* 过渡效果 */

  > li {
    display: flex;
    justify-content: center;
    position: relative;
    padding: 1.5rem;
    flex: 1; /* 让每个li项平均分配高度 */

    /* 使用伪元素创建有左右间距的分割线 */
    &:not(:last-child)::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 5%; /* 左边距 */
      right: 5%; /* 右边距 */
      height: 1px;
      background-color: rgba(0, 0, 0, 0.1);
    }

    .contentA-right-item-img {
      width: 50%;
      flex-shrink: 0;
      border-radius: 8px;
      img {
        margin: 0 auto;
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 8px;
        transition: transform 0.3s ease; /* 图片悬停效果 */
      }

      &:hover img {
        transform: scale(1.05); /* 悬停时图片放大 */
      }
    }

    /* a 标签包裹 p 时的样式 */
    a {
      width: 48%;
    }
    a:hover p {
      text-decoration: underline;
    }

    p {
      width: 100%; /* 改为 100%，因为宽度由 a 标签控制 */
      margin: 0;
      font-size: var(--font-size-md);
      line-height: 1.6;
      color: #333;
      text-align: left; /* p标签左对齐 */
    }
  }
}

/* contentB布局 */
.contentB-body {
  display: flex;
  gap: 1rem;
  margin: 2rem auto;
  width: 94.5%;
  perspective: 1000px; /* 创建3D透视效果 */
}

.contentB-body > li {
  flex: 1; /* 三个卡片等宽 */
  position: relative;
  height: 0;
  padding-bottom: 25%; /* 减小高度比例，从60%改为45% */
  perspective: 1000px; /* 创建3D透视效果 */
  cursor: pointer;
}

/* a 标签作为翻转容器 */
.contentB-body > li a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d; /* 保持3D变换 */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  text-decoration: none;
}

/* 悬停时翻转卡片 */
.contentB-body > li:hover a {
  transform: rotateY(180deg);
}

/* 卡片正面：图片 */
.contentB-body > li .contentB-item-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* 隐藏背面 */
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 4px;
  border-radius: 8px !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.contentB-body > li .contentB-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 卡片背面：文案和纯色背景 */
.contentB-body > li .contentB-item-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f2a501; /* 纯色背景 */
  backface-visibility: hidden; /* 隐藏背面 */
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg); /* 初始状态翻转180度 */
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  padding: 2rem;
  box-sizing: border-box;
  border-radius: 8px !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.contentB-item-content > p {
  color: #fff;
  font-size: var(--font-size-md);
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* contentC布局 */
.contentC-body {
  display: flex;
  gap: 1rem;
  margin: 2rem auto;
  width: 94.5%;
}

.contentC-body > li {
  flex: 1; /* 三个卡片等宽 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f6f6f6;
}

.contentC-body > li .contentC-item-img {
  width: 100%;
  height: 0;
  padding-bottom: 60%; /* 保持图片比例 */
  position: relative;
  overflow: hidden;
}

.contentC-body > li .contentC-item-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.contentC-body > li .contentC-item-content {
  background-color: #f6f6f6;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.contentC-body > li .contentC-item-content p {
  font-size: var(--font-size-md);
  line-height: 1.5;
  margin: 0;
  padding-left: 1rem;
  color: #333;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* 悬停效果：当鼠标悬停在图片或p标签上时，改变p标签的背景色和字体颜色 */
.contentC-body > li:hover .contentC-item-content {
  background-color: #f2a501;
  transform: translateY(-1px);
}

.contentC-body > li:hover .contentC-item-content p {
  color: #fff;
  transform: scale(1.02);
}

/* 图片悬停时的缩放效果 */
.contentC-body > li:hover .contentC-item-img img {
  transform: scale(1.05);
}

/* contentD布局 */
.contentD-body {
  display: flex;
  gap: 1rem; /* 图片之间的间距 */
  margin: 2rem auto;
  width: 94.5%;
}

.contentD-body > li {
  flex: 1; /* 使用 flex: 1 让每张图片等宽，自动适应 gap */
  flex-shrink: 0;
  overflow: hidden;
}

.contentD-body > li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.contentD-body > li:hover img {
  transform: scale(1.05);
}
