.junhua-banner-section {
  --form-width: max(300px, 20rem);
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

/* 轮播图背景区域 */
.junhua-banner-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.junhua-carousel-swiper {
  width: 100%;
  height: 100%;
}

.junhua-carousel-swiper .swiper-slide {
  position: relative;
}

.junhua-slide-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.junhua-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 先让 slide 可定位 */
.swiper-slide {
  position: relative;
}

/* 遮罩层 */
.swiper-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 1;
  pointer-events: none;
}

/* 第一张显示遮罩 */
.swiper-slide:has(.junhua-banner-text.is-first)::before {
  opacity: 1;
}

/* 文字内容区域 - 在轮播项内 */
.junhua-banner-content {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
}

.junhua-banner-text {
  color: var(--text-color-white);
  padding-left: calc(var(--form-width) + 1.5rem);
}


.junhua-banner-subtitle {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-h1);
  line-height: var(--line-height-title);
  color: var(--text-color-white);
  margin-bottom: var(--spacing-lg);
}

.junhua-banner-desc {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  color: var(--text-color-white);
  margin-bottom: var(--spacing-3xl);
  padding-bottom: var(--spacing-xs);
}

.junhua-banner-button:hover {
  background: var(--primary-active-color);
  color: var(--text-color-white);
  text-decoration: none;
}

/* 表单区域 - 绝对定位在右侧 */
.junhua-banner-form {
  position: absolute;
  top: 50%;
  left: var(--container-padding-x);
  transform: translate(0%, -50%);
  z-index: 3;
  /* width: 100%; */
  padding-right: 0px;
}

@media screen and (max-width: 1919px) {
  /* .junhua-banner-form {
    width: max-content;
    left: 0px;
    transform: translate(0px, -50%);
  } */
}

.junhua-form-wrapper {
  background: var(--bg-color-white);
  overflow: hidden;
  width: 100%;
  max-width: var(--form-width);
}

.junhua-form-header {
  background: var(--primary-color);
  padding: 0 var(--spacing-base);
}

.junhua-purchase-order-link {
  display: block;
  padding: 0;
  text-align: center;
  color: var(--text-color-white);
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-tiny);
  line-height: var(--line-height-menu);
  text-decoration: none;
}

.junhua-purchase-order-link:hover {
  color: var(--text-color-white);
  text-decoration: none;
}

/* 自定义表单样式覆盖 */
.junhua-form-content {
  padding: var(--spacing-2xl);
}

.junhua-form-content .inqury-form .text-wrap .crmForm-error {
  margin-top: 1.5px;
  font-size: 8px !important;
}

.junhua-form-content .container {
  padding: 0;
}

.junhua-form-content .inqury-form {
  justify-content: space-between;
}

.junhua-form-content .inqury_title_box {
  display: none;
}

.junhua-form-content .input-wrap {
  padding: 0 !important;
  margin-bottom: var(--spacing-lg);
}

.junhua-form-content .input-wrap:last-child {
  margin-bottom: 0px !important;
}

.junhua-form-content .inqury-form .one-line-input,
.junhua-form-content .inqury-form .input-wrap-box,
.junhua-form-content .inqury-form .bootstrap-select > *,
.junhua-form-content .inqury-form .phone-wrap-input-content > * {
  height: 28px !important;
  padding-top: 0px;
  padding-bottom: 0px;
}

.junhua-form-content .inqury-form .bootstrap-select .filter-option {
  display: flex;
  align-items: center;
}
.junhua-form-content .input-wrap .char-count {
  display: none;
}

.junhua-form-content .input-wrap:not(.full) {
  width: calc(50% - var(--spacing-sm) / 2) !important;
  display: inline-block;
  vertical-align: top;
}

.junhua-form-content .input-wrap.full {
  width: 100%;
  display: block;
}

.junhua-form-content .input-label {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-tiny);
  line-height: var(--line-height-title);
  color: var(--text-color-primary);
}

.junhua-form-content .input-wrap-box input,
.junhua-form-content .input-wrap-box select,
.junhua-form-content .input-wrap-box textarea {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border: var(--border-width-thin) solid var(--border-color-light);
  border-radius: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-tiny);
  background: var(--bg-color-white);
  color: var(--text-color-primary);
  box-sizing: border-box;
}

.junhua-form-content .bootstrap-select * {
  font-family: var(--font-family);
  font-size: var(--font-size-tiny);
}

.junhua-form-content .input-wrap-box {
  width: 100%;
}

.junhua-form-content .inqury_submit {
  width: 100%;
  height: 40px;
  background: #f17006 !important;
  color: var(--text-color-white) !important;
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-body);
  line-height: var(--line-height-menu);
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  transition: all var(--transition-base);
  margin-top: 0;
}

.junhua-form-content .inqury_submit:hover {
  background: #d85f05 !important;
  color: var(--text-color-white) !important;
}

/* 导航按钮 */
.junhua-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  width: 100%;
  z-index: 10;
}

.junhua-button-prev,
.junhua-button-next {
  width: max(2rem, 24px);
  height: max(2rem, 24px);
  background: rgba(0, 0, 0, 0.1);
  border: var(--border-width-thin) solid var(--border-color-subtle);
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.junhua-button-prev:hover,
.junhua-button-next:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--text-color-white);
}

.junhua-button-prev svg,
.junhua-button-next svg {
  display: block;
}

/* 分页指示器 */
.junhua-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: absolute;
  bottom: var(--spacing-2xl);
  z-index: 4;
}

.junhua-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--bg-color-white);
  opacity: 1;
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.junhua-pagination .swiper-pagination-bullet-active {
  background: var(--primary-color);
  transform: scale(1);
}

/* ============================================
   响应式设计 - 移动优先策略
   ============================================ */
@media (min-width: 993px){
.junhua-banner-text.is-first {
  position: absolute;
  right: 80px;
}
}
/* 平板及以下 (≤992px) */
@media (max-width: 992px) {
  .junhua-banner-section {
    min-height: auto;
  }

  /* 轮播图区域 - 改为相对定位，固定高度 */
  .junhua-banner-carousel {
    position: relative;
    height: 300px;
  }

  /* 文字内容区域 - 调整布局 */
  .junhua-banner-text {
    padding-left: var(--container-padding-x);
    padding-right: var(--container-padding-x);
  }

  .junhua-banner-subtitle {
    font-size: 2.25rem; /* 36px */
    margin-bottom: var(--spacing-md);
  }

  .junhua-banner-desc {
    font-size: var(--font-size-body);
    margin-bottom: var(--spacing-2xl);
  }

  /* 表单区域 - 改为相对定位，全宽显示 */
  .junhua-banner-form {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
  }

  .junhua-form-wrapper {
    max-width: 100%;
  }

  /* 表单输入框 - 移动端全宽显示 */
  .junhua-form-content .input-wrap:not(.full) {
    width: 100%;
    display: block;
  }

  /* 导航按钮 - 调整位置 */
  .junhua-nav-buttons {
    padding: 0 var(--spacing-md);
  }
  .swiper-pagination-fraction, .swiper-pagination-custom, .swiper-horizontal>.swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: 2px!important;
  }
}

/* 中等屏幕及以下 (≤768px) */
@media (max-width: 768px) {
  .junhua-banner-carousel {
    height: 280px;
  }

  .junhua-banner-subtitle {
    font-size: 2rem; /* 32px */
  }

  .junhua-banner-desc {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-xl);
  }
  .swiper-pagination-fraction, .swiper-pagination-custom, .swiper-horizontal>.swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal {
    display: none!important;
  }
}

/* 手机及以下 (≤576px) */
@media (max-width: 576px) {
  .junhua-banner-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .junhua-banner-section {
    min-height: auto;
  }

  .junhua-banner-carousel {
    height: 250px;
  }

  .junhua-banner-subtitle {
    font-size: 1.75rem; /* 28px */
    margin-bottom: var(--spacing-sm);
    text-align: center;
  }

  .junhua-banner-desc {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-lg);
    padding-bottom: 0;
    text-align: center;
  }
}

/* 超小屏幕 (≤480px) */
@media (max-width: 480px) {
  .junhua-banner-carousel {
    height: 220px;
  }

  .junhua-banner-subtitle {
    font-size: 1.5rem; /* 24px */
  }
}
