/**
 * 首页非轮播 Hero（与后端 MbYwxMouldOneHomeDiskRenderer 输出 DOM 配套）
 * 后端仅注入 --ywx-hero-fg、--ywx-hero-surface；版式与主色仅在本模板维护。
 */
.ywx-home-hero {
  --ywx-hero-accent: var(--ywx-theme-color, #1e3a5f);
  --ywx-hero-radius-btn: 48px;
}

.ywx-home-hero-root {
  margin: 0;
  padding: 0;
}

.ywx-home-hero,
.ywx-home-hero * {
  box-sizing: border-box;
}

.ywx-home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(480px, 82vh, 960px);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  overflow: hidden;
  color: var(--ywx-hero-fg, #fff);
  background: var(--ywx-hero-surface, transparent);
}

/* fixed 顶栏站点（如 xiexingift）：频道 Hero 预留 header 高度，避免标题被遮挡 */
body:has(.header) main .ywx-home-hero-root .ywx-home-hero {
  padding-top: calc(var(--header-height, 88px) + env(safe-area-inset-top, 0px) + clamp(2rem, 5vw, 3.5rem));
  box-sizing: border-box;
}

.ywx-hero-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

.ywx-hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ywx-hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.42) 100%),
    radial-gradient(circle at center, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.38) 100%);
}

.ywx-hero-mode-video .ywx-hero-title,
.ywx-hero-mode-video .ywx-hero-subhead,
.ywx-hero-mode-cinematic .ywx-hero-title,
.ywx-hero-mode-cinematic .ywx-hero-subhead {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.65);
}

.ywx-hero-mode-video .ywx-hero-subhead,
.ywx-hero-mode-cinematic .ywx-hero-subhead {
  opacity: 1;
}

.ywx-hero-mode-cinematic.ywx-home-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.14), transparent);
  pointer-events: none;
  z-index: 1;
}

.ywx-hero-mode-cinematic .ywx-hero-container {
  z-index: 2;
}

.ywx-hero-title {
  /* 约 30px → 52px（略大于 28–48，仍小于原 36–72）；覆盖 style.css 全局 h1 uppercase */
  font-size: clamp(1.875rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: inherit;
  text-transform: none;
  overflow-wrap: break-word;
}

.ywx-hero-title--left {
  text-align: left;
}

.ywx-hero-stack--center .ywx-hero-title {
  text-align: center;
}

.ywx-hero-subhead {
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 1.5rem;
  opacity: 0.88;
  color: inherit;
  overflow-wrap: break-word;
}

.ywx-hero-subhead--left {
  text-align: left;
  /* 与首页 Hero 文案区一致：不限窄栏，由容器/分栏自然收束 */
  max-width: none;
}

.ywx-hero-stack--center .ywx-hero-subhead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  /* 与首页 cinematic 副标题显示区一致 */
  max-width: none;
}

.ywx-hero-stack {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(0.75rem, 2vw, 1.15rem);
  width: 100%;
  max-width: 100%;
}

.ywx-hero-stack--center {
  /* 与首页 cinematic 标题区同宽：占满 hero-container */
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.ywx-hero-stack--cinematic {
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.ywx-hero-stack--cinematic .ywx-hero-title {
  text-align: center;
  /* 约 28px → 48px（略大于 26–44） */
  font-size: clamp(1.75rem, 4.5vw, 3rem);
}

.ywx-hero-stack--cinematic .ywx-hero-subhead {
  text-align: center;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.ywx-hero-stack--cinematic .ywx-hero-actions {
  justify-content: center;
}

.ywx-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  justify-content: center;
}

.ywx-hero-actions--start {
  justify-content: flex-start;
}

.ywx-hero-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--ywx-hero-radius-btn, 48px);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.22s ease;
  cursor: pointer;
  line-height: 1.35;
  border: none;
  font-family: inherit;
}

.ywx-hero-btn--primary {
  background: var(--ywx-hero-accent, #1e3a5f);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ywx-hero-btn--primary:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.ywx-hero-btn--secondary {
  background: transparent;
  border: 1.5px solid currentColor;
  color: inherit !important;
  font-weight: 500;
  padding: 0.78rem 1.95rem;
}

.ywx-hero-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.ywx-hero-mode-split .ywx-hero-btn--secondary:hover {
  background: rgba(10, 37, 64, 0.07);
}

.ywx-hero-mode-split.ywx-home-hero {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ywx-hero-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  width: 100%;
}

.ywx-hero-split-text {
  padding: 0.35rem 0;
}

.ywx-hero-split-visual {
  text-align: center;
}

.ywx-hero-split-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 32px;
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.ywx-hero-split-img:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .ywx-hero-split-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .ywx-hero-split-visual {
    order: -1;
  }
  .ywx-hero-split-text .ywx-hero-actions {
    justify-content: center;
  }
  .ywx-hero-split-text .ywx-hero-title--left,
  .ywx-hero-split-text .ywx-hero-subhead--left {
    text-align: center;
  }
  .ywx-hero-split-text .ywx-hero-subhead {
    margin-left: auto;
    margin-right: auto;
  }
}

.ywx-hero-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
  width: 100%;
}

.ywx-hero-form-text {
  padding: 0.35rem 0;
}

@media (max-width: 768px) {
  .ywx-hero-form-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .ywx-hero-form-text .ywx-hero-actions {
    justify-content: center;
  }
  .ywx-hero-form-text .ywx-hero-title--left,
  .ywx-hero-form-text .ywx-hero-subhead--left {
    text-align: center;
  }
  .ywx-hero-form-text .ywx-hero-subhead {
    margin-left: auto;
    margin-right: auto;
  }
}

.ywx-hero-inquiry-card {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  border-radius: 36px;
  padding: 2.2rem;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .ywx-hero-inquiry-card:hover {
    transform: translateY(-4px);
  }
}

.ywx-hero-field-label {
  display: block;
  font-size: 0.8rem;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  color: #374151;
}

.ywx-hero-inquiry-card > .ywx-hero-field-label:first-of-type {
  margin-top: 0;
}

.ywx-hero-field-input,
.ywx-hero-field-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-top: 0.15rem;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  font-size: 0.95rem;
  background: #f9fafb;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ywx-hero-field-textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 5rem;
}

.ywx-hero-field-input:focus,
.ywx-hero-field-textarea:focus {
  outline: none;
  border-color: var(--ywx-hero-accent, #1e3a5f);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
  background: #fff;
}

.ywx-hero-inquiry-submit {
  width: 100%;
  padding: 0.9rem;
  margin-top: 1.5rem;
  border-radius: 40px;
  background: var(--ywx-hero-accent, #1e3a5f);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}

.ywx-hero-inquiry-submit:hover {
  filter: brightness(0.92);
}

.ywx-hero-inquiry-submit:active {
  transform: scale(0.98);
}

.ywx-hero-inquiry-footnote {
  font-size: 0.72rem;
  margin: 1rem 0 0;
  color: #5b6e8c;
  line-height: 1.45;
}

/* 频道列表 Hero 轮播文案：避免内页顶区标题被裁切 */
.ywx-channel-hero-carousel-overlay {
  padding: clamp(1.5rem, 4vw, 3rem) 1rem;
  box-sizing: border-box;
  overflow: visible;
}

.ywx-channel-hero-carousel-overlay .ywx-hero-title {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  overflow: visible;
}

.ywx-channel-hero-carousel-overlay .ywx-hero-subhead {
  line-height: 1.55;
  overflow: visible;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
