/* 重置默认样式，简化版 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 最外层手机盒子 */
.phone-box {
  width: 375px;
  height: 812px;
  margin: 10px auto;
  border: 1px solid #ccc;
  border-radius: 12px;
  overflow: hidden;/* 防止内部元素溢出 */
  position: relative;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: #F9EEE4;
  /* z-index: -2; */
}

/* 状态栏（模拟顶部状态条） */
.status-bar {
  position: relative;
  width: 100%;
  height: 44px;
}

.status-bar img {
  position: absolute;
  top: 30%;
  left: 10px;
  z-index: 1;
}

/* 导航栏（顶部搜索等区域） */
.nav-bar {
  position: relative;
  z-index: 2;
  display: flex;
  /* align-items: center;竖直方向上居中 */
  justify-content: space-between;/* 盒子水平方向上均匀分布 */
  height: 44px;
  /* padding: 0 10px; */
  /* background-color: #fff; */
  /* border-bottom: 1px solid #eee; */
}

.nav-bar .more-icon {
  width: 20px;
  height: 20px;
  margin-left: 20px;
}

.nav-bar .scan-icon {
  /* width: 20px; */
  height: 20px;
  margin-right: 20px;
}

/* 搜索框 */
.nav-bar .search {
  width: 252px;
  height: 28px;
  background: url("../images/首页/搜索框.png") no-repeat center;
  background-size: contain;
}

.search p {
  color: #fff;
  /* 白色文字 */
  display: inline-block;
  /* 改为 inline-block 以便设置 margin */
  font-size: 14px;
  margin-left: 10px;
}

.search img {
  float: right;
  margin-right: 10px;
  margin-top: 5px;
}

/* 轮播图 */
.lunbotu {
  position: absolute; /* 改为绝对定位 */
  top: 0; /* 与.phone-box顶部对齐 */
  left: 0;
  overflow: hidden;/* 隐藏轮播切换时的溢出内容 */
  touch-action: pan-y;/* 允许用户在垂直方向进行平移操作 */
  width: 375px;
  height: 252px;
}

/* 轮播图图片容器 */
.lunbotu-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 375px; /* 明确设置宽度 */
  height: 252px; /* 根据实际需要调整高度 */
}

.slide,
.slide-active {
  min-width: 375px;/* 确保每张幻灯片宽度为容器宽度 */
  width: 375px;
  height: 252px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lunbotu .slide img,
.lunbotu .slide-active img {
  width: 100%;
  height: 100%;
  object-fit: cover;/* 填充 */
  object-position: center; /* 确保图片居中 */
  display: block;
}

/* 轮播点样式 */
.lunbotu .dots {
  position: absolute;
  bottom: 48px;/* 距离容器底部48px */
  left: 50%;
  transform: translateX(-50%);/* 居中 */
  display: flex;
  gap: 8px;/* 元素之间的距离为8px */
}

.lunbotu .dots .dot,
.lunbotu .dots .dot-active {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;/* 平滑过渡 */
}

.lunbotu .dots .dot {
  background-color: #F9EEE4;/* 未激活时的颜色 */
}

.lunbotu .dots .dot-active {
  width: 22px;
  background-color: #970002;/* 激活时的颜色 */
}

/* 正文 */
.content {
  position: relative;
  margin-top: 132px;
  background-color: #F9EEE4;
  border-radius: 30px 30px 0 0;
  width: 375px;
  height: 514px;
  /* background-color: #970002; */
}

/* 金刚区 */
.func-nav {
  /* width: 100%; */
  display: flex;
  /* display: inline; */
  justify-content: space-between;
  /* 盒子水平方向上均匀分布 */
  align-items: center;
  /* 竖直居中 */
  padding: 5px 20px;
  padding-bottom: 15px;
}

.func-nav .nav-item {
  display: inline-block;
  text-decoration: none;
  color: rgba(151, 0, 2, 0.7);
  /* #970002 颜色 + 70% 不透明度 */
  font-family: 'source-han-serif sc vf medium', serif;
  /* 思源宋体 Medium */
  font-weight: 500;
  /* 可选：确保使用 medium 字重 */
  font-size: 13px;
  /* cursor: pointer; 当鼠标悬停在该元素上时，鼠标指针会变成“手形”光标（Pointer）*/
  outline: none;
  /* 去除点击时的虚线框（不推荐在生产环境直接删除） */
}

.func-nav .nav-item img {
  max-width: 80px;
  /* 控制图标大小 */
  height: auto;
  margin-bottom: -1px;
  /* 图标与文字间距 */
}

.func-nav .nav-item:last-child p {
  margin-left: 15px;
}

/* 公告 */
.gg {
  margin: 0 20px;
}

.gg p {
  position: relative;
  top: -30px;
  left: 70px;
  font-family: "Microsoft Yahei", sans-serif;
  font-weight: 300;
  /* Light 字重 */
  font-size: 13px;
  color: rgba(0, 0, 0, 0.8);
  /* 黑色，80% 不透明度 */
}

/* 科普 */
.kepu {
  margin: 0 20px;
  margin-top: -12px;
}

/* 标签 */
.kepu .bq a {
  text-decoration: none;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 14px;
  font-weight: 400px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 4px;
}

.bq a:first-child {
  font-weight: 400px;
  color: rgba(0, 0, 0);
}

/* 选中 */
.kepu .xz {
  position: relative;
  margin: 0 15px;
  top: -14px;
}

/* 图片 */
.kepu .history-card {
  width: 100%;
  height: 145px;
  /* background: url("../images/首页/图片.svg") no-repeat center; */
  position: relative;
  margin-top: -18px;
  margin-left: -5px;
}

.kepu .history-card .img {
  background-size: cover;
  z-index: -1;
  /* 图片层级在文字下方 */
}

/* 历史发展的文字 */
.kepu .history-card p {
  text-align: center;
  font-size: 12px;
  font-weight: 400px;
  color: #F9EEE4;
  position: relative;
  top: -130px;
}

.kepu .history-card .title {
  left: 38%;
  width: 77px;
  height: 25px;
  border: #F9EEE4 1px solid;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 15px;
}

/* 每日推荐 */
.mrtj {
  /* width:335px;
  height: 174px; */
  margin: 15px 20px;
}

.mrtj .mrtj-title p {
  display: inline-block;
  color: rgba(151, 0, 2);
  /* #970002 颜色 */
  font-family: 'source-han-serif sc vf medium', serif;
  /* 思源宋体 Medium */
  font-weight: 600;
  /* 可选：确保使用 bold 字重 */
  font-size: 18px;
}

.mrtj .mrtj-title a {
  margin-left: 185px;
  text-decoration: none;
  /* 删除a标签的默认样式 */
}

.mrtj .mrtj-title a p {
  font-family: "Microsoft Yahei", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #6C6C6C;
  position: relative;
  top: -2px;
}

/* 每日推荐的图片 */
.mrtj .mrtj-content {
  position: absolute;
  margin-top: 5px;
}

.mrtj-content .mrtj-item {
  display: inline;
  /* z-index:2; */
}

.mrtj-content .mrtj-item img {
  width: 109px;
  height: 141px;
  border: #970002 3px solid;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

/* 标签栏 */
.footer {
  position: relative;
  margin-top: -15px;
  z-index: 10;
  /* 确保 footer 内元素不溢出并正确显示 */
  /* overflow: visible; */
}

.footer img {
  background-size: cover;
  position: relative;
  left: -5px;
}

/* 图标 */
.footer .tab-bar {
  /* position: absolute; */
  /* 改为相对定位，避免偏移 */
  position: relative;
  margin-top: -53px;
  left: 0px;
  /* align-items: center; 水平居中 */
  /* justify-content: center; 垂直居中 */
}

.footer .tab-bar .bar-item {
  display: flex;
  /* 改为Flex布局 */
  flex-direction: column;
  /* 垂直排列图片和文字 */
  align-items: center;
  /* 水平居中 */
  justify-content: center;
  /* 垂直居中 */
  /* display: inline-block;
  margin: 0px 31px;
  text-decoration: none;
  color: #970002; */
  display: inline-block;
  margin: 0 25px;
  /* 调整间距，确保不重叠 */
  text-decoration: none;
  color: #970002;
  /* 增加点击区域大小 */
  padding: 5px;
}

.footer .bar-item img {
  width: 100%;
  height: 25px;
  background-size: cover;
}

.footer .bar-item:last-child img {
  margin-left: 5px;
}

.footer .bar-item p {
  color: rgba(151, 0, 2, 0.6);
  /* #970002 颜色 */
  font-family: 'source-han-serif sc vf medium', serif;
  /* 思源宋体 Medium */
  font-weight: 400;
  font-size: 10px;
  margin-left: 3px;
}

.footer .bar-item .active {
  margin-left: 2px;
  font-weight: 600;
  color: #970002;
}

.footer .bar-item:nth-child(2) p {
  margin-left: -2px;
}

/* 指示器 */
.home-container {
  position: relative;
  ;
  margin-top: -7px;
  height: 34px;
  width: 100%;
  background-color: #fff;
  z-index: 100;
}

.home-container img {
  position: absolute;
  margin-top: 16px;
  left: 32%;
}