/* =====================================================================
 * 悅然：版型區塊（includes/designhu-blocks.php 輸出）
 * 前台與傳統編輯器共用，後台預覽才會和前台一樣；字級用 clamp（不依賴前台的 rem 縮放）
 * 配色：深綠 #335E3F、金棕 #B9936C、米色 #E4D8CD、灰綠 #A5B6A2、珊瑚 #C8745F、內文 #3A3A3A
 * ===================================================================== */

.jvb {
  margin: 2.4em 0;
}
.huProse .jvb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.huProse .jvb figure {
  margin: 0;
}
.huProse .jvb figcaption {
  margin-top: 0.7em;
  font-size: 0.85em;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: #6b766e;
  text-align: center;
}

/* ---------- 左右圖文 ---------- */
.huProse .jvb-split {
  display: flex;
  align-items: center;
  gap: 5%;
}
.huProse .jvb-split--right {
  flex-direction: row-reverse;
}
.huProse .jvb-split__img {
  flex: 0 0 42%;
}
.huProse .jvb-split__img img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.huProse .jvb-split__txt {
  flex: 1;
  min-width: 0;
}
.huProse .jvb-split__title {
  margin: 0 0 0.6em;
  font-family: "Noto Serif TC", serif;
  font-weight: 900;
  font-size: clamp(20px, 1.6vw, 32px);
  letter-spacing: 0.06em;
  color: #335e3f;
}
.huProse .jvb-split__txt > :last-child {
  margin-bottom: 0;
}

/* ---------- 大圖 ---------- */
.huProse .jvb-figure img {
  max-height: 80vh;
  object-fit: cover;
}

/* ---------- 圖片列 ---------- */
.huProse .jvb-gallery {
  display: grid;
  gap: 16px;
}
.huProse .jvb-gallery--2 {
  grid-template-columns: repeat(2, 1fr);
}
.huProse .jvb-gallery--3 {
  grid-template-columns: repeat(3, 1fr);
}
.huProse .jvb-gallery--4 {
  grid-template-columns: repeat(4, 1fr);
}
.huProse .jvb-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
}
.huProse .jvb-gallery img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.huProse .jvb-gallery a:hover img {
  transform: scale(1.05);
}

/* ---------- 前後對比（joyvital.js 設定 --pos） ---------- */
.huProse .jvb-compare__box {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 8 / 5;
}
.huProse .jvb-compare__box img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.huProse .jvb-compare__after {
  clip-path: inset(0 0 0 var(--pos));
}
.jvb-compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #335e3f;
  pointer-events: none;
}
.jvb-compare__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 2px solid #335e3f;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #335e3f;
  pointer-events: none;
}
.jvb-compare__box input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

/* ---------- 步驟流程 ---------- */
.huProse .jvb-steps {
  padding: 1.6em 2em;
  border-radius: 16px;
  background: #f1eae3;
}
.huProse .jvb-steps__heading {
  margin: 0 0 1em;
  font-family: "Noto Serif TC", serif;
  font-weight: 900;
  font-size: clamp(18px, 1.4vw, 28px);
  letter-spacing: 0.06em;
  color: #335e3f;
}
.huProse .jvb-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.huProse .jvb-steps li {
  display: flex;
  gap: 1em;
  margin: 0;
  padding: 0.9em 0;
  border-top: 1px dashed #d9c3a5;
}
.huProse .jvb-steps li:first-child {
  border-top: 0;
  padding-top: 0;
}
.huProse .jvb-steps li::before,
.huProse .jvb-steps li::marker {
  content: none;
}
.huProse .jvb-steps__no {
  flex: 0 0 auto;
  font-family: "Bodoni Moda", serif;
  font-variation-settings: "opsz" 7;
  font-style: italic;
  font-weight: 600;
  font-size: 1.8em;
  line-height: 1;
  color: #b9936c;
}
.huProse .jvb-steps__body {
  flex: 1;
  min-width: 0;
}
.huProse .jvb-steps__title {
  margin: 0 0 0.2em;
  font-weight: 700;
  color: #335e3f;
}
.huProse .jvb-steps__body p:last-child {
  margin-bottom: 0;
}

/* ---------- 醫師介紹卡 ---------- */
.huProse .jvb-doctor a {
  display: flex;
  align-items: center;
  gap: 2em;
  padding: 1.2em;
  border-radius: 16px;
  background: #e4d8cd;
  text-decoration: none;
  transition: background 0.3s ease;
}
.huProse .jvb-doctor a:hover {
  background: #d9c3a5;
}
.huProse .jvb-doctor__photo {
  flex: 0 0 28%;
  overflow: hidden;
  border-radius: 12px;
}
.huProse .jvb-doctor__photo img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}
.huProse .jvb-doctor__info {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  flex: 1;
  min-width: 0;
}
.huProse .jvb-doctor__dept {
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  font-style: italic;
  color: #2f3a33;
}
.huProse .jvb-doctor__name {
  font-family: "Noto Serif TC", serif;
  font-weight: 900;
  font-style: italic;
  font-size: 2em;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: #2f3a33;
}
.huProse .jvb-doctor__name small {
  margin-left: 0.4em;
  font-size: 0.45em;
  letter-spacing: 0;
}
.huProse .jvb-doctor__note {
  color: #3a3a3a;
}
.huProse .jvb-doctor__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.6em;
  margin-top: 0.3em;
}
.huProse .jvb-doctor__tags span {
  padding: 0.1em 0.9em;
  border-radius: 999px;
  background: #fbf8f4;
  font-size: 0.85em;
  color: #b9936c;
}
.huProse .jvb-doctor__more {
  align-self: flex-end;
  font-family: "Bodoni Moda", serif;
  font-variation-settings: "opsz" 7;
  font-style: italic;
  font-size: 1.2em;
  color: #c8745f;
}

/* ---------- 重點提醒框 ---------- */
.huProse .jvb-note {
  padding: 1.4em 1.8em;
  border-left: 6px solid #a5b6a2;
  border-radius: 0 12px 12px 0;
  background: #fff;
}
.huProse .jvb-note__title {
  margin: 0 0 0.5em;
  font-weight: 700;
  color: #335e3f;
}
.huProse .jvb-note > :last-child {
  margin-bottom: 0;
}

/* ---------- 預約按鈕 ---------- */
.huProse .jvb-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  padding: 1.4em 2em;
  border-radius: 16px;
  background: #335e3f;
}
.huProse .jvb-cta__text {
  margin: 0;
  color: #fff;
}
.huProse .jvb-cta__btn {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0.7em 2em;
  border-radius: 999px;
  background: #c8745f;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s ease;
}
.huProse .jvb-cta__btn:hover {
  background: #b9936c;
  color: #fff;
}

/* ---------- 手機 ---------- */
@media (max-width: 768px) {
  .huProse .jvb-split,
  .huProse .jvb-split--right {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .huProse .jvb-gallery--3,
  .huProse .jvb-gallery--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .huProse .jvb-gallery {
    gap: 10px;
  }
  .huProse .jvb-steps {
    padding: 18px;
  }
  .huProse .jvb-doctor a {
    gap: 14px;
    padding: 12px;
    align-items: flex-start;
  }
  .huProse .jvb-doctor__photo {
    flex-basis: 34%;
  }
  .huProse .jvb-doctor__name {
    font-size: 1.5em;
  }
  .huProse .jvb-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 18px;
  }
}
