body {
  margin: 0;
  font-family: "宋体", sans-serif;
  background: linear-gradient(
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.7)
  );
  background-image: url("../image/首页.jpg");
  background-size: cover;
}

header {
  /* background-image: url("/image/background.jpg"); */
  font-size: 1.25rem;
  padding: 30px;
  text-align: center;
}

nav a {
  color: white;
  width: 100%;
  padding: 3rem 0;
  /* display: flex; */
  /* justify-content: space-between; */
  flex-direction: row;
  /* align-items: center; */
  margin: 0 15px;
  text-decoration: none;
  font-size: 18px;
}

nav a:hover {
  color: black;
}

.hero {
  background: url("../images/hunan-bg.jpg") center/cover no-repeat;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero:hover {
  transform: translateY(-5px);
}

.hero-text {
  background: rgba(255, 255, 255, 0.7);
  padding: 20px 40px;
  border-radius: 10px;
  text-align: center;
}

.main-content {
  /* 启用弹性盒子布局 */
  display: flex;
  /* 允许子元素在容器宽度不足时换行 */
  flex-wrap: wrap;
  /* 设置子元素之间的间距为30像素 */
  gap: 30px;
  /* 设置容器的最大宽度为1200像素 */
  max-width: 1200px;
  /* 上下边距40像素，左右自动居中 */
  margin: 40px auto;
  /* 左右内边距20像素，避免内容贴边 */
  padding: 0 20px;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 40px;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  padding: 25px;
  width: 250px; /* 保持卡片宽度不变 */
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

/* 轮播图容器 */
.slider {
  position: relative;
  width: 100%;
  height: 380px; /* 固定高度，与原来图片高度一致 */
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 15px; /* 与标题的间距 */
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 确保图片填充容器且不变形 */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* 指示点样式 */
.dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: white;
}

/* 卡片标题样式 */
.card h3 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  color: #333;
}
