/* css/zlfa.css */

/* Keep page-shell 100% viewport height and hide native scrolling on desktop */
html, body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.page-shell {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* Main content: height set by JS based on header height */
.zlfa-main {
  position: relative;
  overflow: hidden;
}

/* Footer is shown as the 5th slide on PC; hide only the standalone footer outside the slider */
.page-shell > .site-footer {
  display: none;
}

/* Breadcrumb static overlay */
.your-position-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}

.your-position-wrapper .your-position {
  pointer-events: auto;
  padding-top: clamp(20px, calc(40 / 1920 * 100vw), 40px);
  padding-bottom: clamp(10px, calc(20 / 1920 * 100vw), 20px);
  color: #fff;
  font-size: 14px;
}

/* Slider Container */
.zlfa-slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Slider transition track — 5 screens (4 content + 1 footer) */
.zlfa-slider-wrapper {
  width: 100%;
  height: 500%;
  display: flex;
  flex-direction: column;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Individual slides */
.zlfa-slide {
  width: 100%;
  height: 20%;
  flex-shrink: 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-start;
}

/* 5th slide: footer screen */
.zlfa-slide-footer {
  background: var(--footer-bg, #1a1a1a);
  align-items: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.zlfa-slide-footer .site-footer {
  display: block !important;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Background image assignments */
.slide-1 {
  background-image: url("../image/zlfa-bg01.png");
}
.slide-2 {
  background-image: url("../image/zlfa-bg02.png");
}
.slide-3 {
  background-image: url("../image/zlfa-bg03.png");
}
.slide-4 {
  background-image: url("../image/zlfa-bg04.png");
}

/* Vertical layout helper inside slide */
.zlfa-slide .inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
  padding-top: clamp(40px, calc(100 / 1920 * 100vw), 100px);
  box-sizing: border-box;
}

/* Calligraphic character circle */
.slide-char {
  flex: 0 0 auto;
  width: clamp(100px, calc(200 / 1920 * 100vw), 200px);
  height: clamp(91px, calc(200 / 1920 * 100vw), 200px);
  margin-bottom: clamp(24px, calc(40 / 1920 * 100vw), 40px);
}

.slide-char img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Slide subtitle */
.slide-subtitle {
  flex: 0 0 auto;
  font-family: var(--font-decorative);
  font-size: clamp(16px, calc(24 / 1920 * 100vw), 24px);
  color: #fff;
  margin-bottom: clamp(8px, calc(16 / 1920 * 100vw), 16px);
  text-align: center;
}

/* Applicable stage text */
.slide-stage {
  flex: 0 0 auto;
  font-size: clamp(13px, calc(16 / 1920 * 100vw), 16px);
  color: #fff;
  margin-bottom: clamp(16px, calc(32 / 1920 * 100vw), 32px);
  text-align: center;
}

/* Content block styling */
.slide-text-block {
  width: 100%;
  max-width: 1320px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0 clamp(20px, calc(60 / 1920 * 100vw), 80px);
  font-size: clamp(14px, calc(18 / 1920 * 100vw), 18px);
}

.slide-desc {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 15px;
}

/* Custom scrollbar for description text if it overflows */
.slide-desc::-webkit-scrollbar {
  width: 4px;
}
.slide-desc::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.slide-desc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
}

.slide-desc p {
  font-size: clamp(14px, calc(16 / 1920 * 100vw), 16px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  text-align: justify;
  /* margin-bottom: 20px; */
}

.slide-desc p:last-child {
  margin-bottom: 0;
}

/* Dots navigation indicators for desktop visual cue */
.slider-dots {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

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

.slider-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Hide the footer-dot indicator */
.slider-dot-footer {
  display: none;
}

/* Footer slide inner layout: let footer fill the screen */
.zlfa-slide-footer .site-footer .inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0;
}

@media (max-width: 768px) {
  /* On mobile, let the slides flow naturally */
  html, body {
    overflow: auto;
    height: auto;
  }
  .page-shell {
    height: auto;
    overflow: visible;
  }
  .zlfa-main {
    min-height: calc(100vh - 60px);
    height: auto;
    overflow: visible;
  }
  .zlfa-slider-container {
    height: auto;
    overflow: visible;
  }
  .zlfa-slider-wrapper {
    height: auto;
    transform: none !important;
  }
  .zlfa-slide {
    height: auto;
    min-height: auto;
    padding-bottom: 48px;
    background-attachment: scroll;
  }
  .slide-1 {
    background-image: url("../image/zlfa-bg-mobile01.png");
    padding-top: 48px;
  }
  .slide-2 {
    background-image: url("../image/zlfa-bg-mobile02.png");
  }
  .slide-3 {
    background-image: url("../image/zlfa-bg-mobile03.png");
  }
  .slide-4 {
    background-image: url("../image/zlfa-bg-mobile04.png");
  }
  .zlfa-slide .inner {
    height: auto;
    padding-top: 20px;
  }
  .slide-text-block {
    padding: 0 20px;
  }
  .slide-desc {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
  .slider-dots {
    display: none;
  }
  /* 权重需与 PC 端规则 .page-shell > .site-footer 一致才能覆盖 */
  .page-shell > .site-footer {
    display: block;
  }
  /* On mobile, hide the footer-as-slide; use the regular footer below */
  .zlfa-slide-footer {
    display: none;
  }
}
