@charset "utf-8";

/* 首页模块五：阳光汇聚 · 半屏背景 + 轮播 */
.module-history {
  position: relative;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background: #f3f6f2;
}

/* 上半屏背景（后台可配置） */
.module-history__half-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52%;
  min-height: 240px;
  background-color: #dce8d8;
  background-image: var(--module-bg-image, url("/images/default-cover.jpg"));
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}

.module-history__half-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(34, 78, 48, 0.08) 0%,
    rgba(34, 78, 48, 0.02) 55%,
    rgba(243, 246, 242, 0.92) 100%
  );
}

.module-history__stage {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 10vh, 108px) clamp(20px, 4vw, 48px) clamp(28px, 4vh, 40px);
  box-sizing: border-box;
}

/* 轮播卡片 */
.school-carousel {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.school-carousel__viewport {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(24, 48, 32, 0.18);
  background: #fff;
}

.school-carousel__slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: clamp(200px, 36vh, 420px);
  background: #e8ece6;
}

.school-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s;
}

.school-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.school-carousel__slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

.school-carousel__slide-bg {
  width: 100%;
  height: 100%;
  background-color: #d8ddd6;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* 轮播底部信息条 */
.school-carousel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 20px;
  background: rgba(18, 22, 20, 0.72);
  box-sizing: border-box;
}

.school-carousel__caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(14px, 1.2vw + 0.5rem, 18px);
  line-height: 1.45;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-carousel__dots {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.school-carousel__dot.is-active {
  background: #fff;
  transform: scale(1.05);
}

.school-carousel__dot:hover {
  background: rgba(255, 255, 255, 0.55);
}

.module-history__more {
  display: inline-block;
  margin-top: clamp(16px, 2.5vh, 24px);
  font-size: 14px;
  color: #2d5a3d;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-align: center;
}

.module-history__more:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .module-history {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .module-history__half-bg {
    height: 46%;
    min-height: 180px;
  }

  .module-history__stage {
    width: 100%;
    max-width: none;
    justify-content: center;
    align-items: center;
    padding: 56px 16px 32px;
    margin: 0 auto;
  }

  .school-carousel {
    width: 100%;
    max-width: 100%;
  }

  .school-carousel__slides {
    min-height: max(200px, 52vw);
  }

  .school-carousel__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .school-carousel__caption {
    white-space: nowrap;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.4;
  }

  .school-carousel__dots {
    align-self: center;
    flex-shrink: 0;
  }

  .module-history__more {
    display: block;
    width: 100%;
    text-align: center;
  }
}
