/*
 * Trang con JA (.jh.jh-sub — scripts/ja-pages/*.html) theo phong cách trang
 * chủ (ja-home-lux.css): tiêu đề Shippori Mincho, nền trắng / bạc lạnh, hình
 * khối mềm (section & thẻ bo góc, ảnh bo góc lệch dạng lá, nút bo tròn tô màu
 * khi rê chuột), cột nội dung canh giữa tối đa 1120px.
 * Lớp phủ lên component ở ja-home.css + ja-site.css (giữ nguyên markup);
 * mọi selector có tiền tố .jh-sub để thắng rule gốc. Hiệu ứng: ja-lux-fx.css.
 */

.jh-sub {
  /* token gốc (.jh) -> bảng màu trang chủ mới */
  --jh-ivory: var(--bg-soft);
  --jh-stone: var(--bg-soft);
  --jh-rule: #DCE1E8;
  --jh-muted: var(--muted);
  --jh-bronze-tx: var(--accent);
  --jh-serif: var(--font-base);
  --lx-leaf: clamp(48px, 7vw, 120px);
  --lx-ease: cubic-bezier(.2, .8, .2, 1);
  --lx-w: min(1120px, calc(100% - 80px));
  /* desktop: chừa lề phải cho nút nổi 「無料相談」 -> xem @media (min-width: 850px) bên dưới */
  font-weight: 400;
  font-feature-settings: "palt";
}
.jh-sub p { font-feature-settings: normal; }
.jh-sub .jh-mincho { font-family: var(--jh-serif); font-weight: 700; letter-spacing: .05em; }
.jh-sub .jh-num-font { font-family: var(--jh-serif); font-weight: 700; letter-spacing: 0; font-feature-settings: "lnum"; }
.jh-sub :is(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* trang trí cũ: chữ khổng lồ, đường chéo */
.jh-sub :is(.jh-phero__big, .jh-slash) { display: none !important; }

/* ---------- cột nội dung canh giữa ---------- */
.jh-sub :is(.jh-wrap, .jh-wrap--wide, .jh-head, .jh-split, .jh-contact__cards, .jh-reasons__list, .jh-faq__head, .jh-faq__list, .jh-faq__more) {
  width: var(--lx-w); margin-left: auto; margin-right: auto;
}
/* container lồng trong container: không thu hẹp lần nữa */
.jh-sub :is(.jh-wrap, .jh-wrap--wide) :is(.jh-wrap, .jh-head, .jh-split, .jh-contact__cards, .jh-reasons__list, .jh-faq__head, .jh-faq__list, .jh-faq__more) { width: auto; }
.jh-sub .jh-wrap > .jh-prose { max-width: 50em; }

/* ---------- nhãn nhỏ trên tiêu đề: gạch vàng ngắn thay "／" ---------- */
.jh-sub .jh-eyebrow { padding-left: 26px; font-size: 13px; font-weight: 500; letter-spacing: .14em; }
.jh-sub .jh-eyebrow::before { left: 0; width: 16px; height: 1px; background: var(--accent); transform: translateY(-50%); }
.jh-sub .jh-head__ttl { margin-top: 14px; line-height: 1.65; }

/* ============ hero trang con ============ */
.jh-sub .jh-phero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  column-gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: 48px max(40px, calc((100% - 1120px) / 2)) 112px;
}
/* quầng màu nhạt trôi chậm phía sau như hero trang chủ */
.jh-sub .jh-phero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 44vw; height: 44vw; right: -12vw; top: -16vw; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(191, 214, 245, .26), rgba(191, 214, 245, 0));
  animation: lx-sub-drift 18s ease-in-out infinite alternate;
}
@keyframes lx-sub-drift { to { transform: translate(-4vw, 3vw) scale(1.12); } }
/* breadcrumb nổi bật: thanh chàm bo tròn, icon nhà, dấu ngăn vàng */
.jh-sub .jh-phero__crumb {
  grid-column: 1 / -1; justify-self: start; position: relative; z-index: 5;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
  margin: 0; padding: 10px 24px 10px 18px; border-radius: 999px;
  background: #0B1F3A; box-shadow: 0 10px 26px rgba(11, 31, 58, .14);
  font-size: 13px; font-weight: 500; line-height: 1.6; letter-spacing: .08em; color: #fff;
}
.jh-sub .jh-phero__crumb li { display: inline-flex; align-items: center; }
.jh-sub .jh-phero__crumb a { display: inline-flex; align-items: center; gap: 8px; color: var(--tint) !important; transition: color .3s; }
.jh-sub .jh-phero__crumb a:hover { color: #fff !important; }
.jh-sub .jh-phero__crumb li:first-child a::before {
  content: ""; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 7.5 8 2.5l6 5M3.8 6.3V13.5h3V10h2.4v3.5h3V6.3' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 7.5 8 2.5l6 5M3.8 6.3V13.5h3V10h2.4v3.5h3V6.3' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.jh-sub .jh-phero__crumb li + li::before {
  content: ""; width: 7px; height: 7px; margin: 0 14px 0 10px;
  border-top: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); transform: rotate(45deg);
}
.jh-sub .jh-phero__crumb li:last-child { font-weight: 700; }
.jh-sub .jh-phero__body { grid-column: 1; width: auto; margin: 56px 0 0; }
.jh-sub .jh-phero__ttl { margin-top: 18px; font-size: clamp(28px, 3.2vw, 46px); font-weight: 700; line-height: 1.45; letter-spacing: .05em; }
.jh-sub .jh-phero__lead { max-width: 34em; font-weight: 400; line-height: 1.85; }
.jh-sub .jh-phero__img {
  grid-column: 2; position: relative; inset: auto; z-index: 1;
  width: 100%; margin-top: 56px; aspect-ratio: 4 / 3;
  clip-path: none; overflow: visible; background: none;
}
/* ảnh chữ nhật bo góc + mảng --tint lệch phía sau (như trang chủ) */
.jh-sub .jh-phero__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 20px 20px 0 var(--tint), 0 24px 60px rgba(11, 31, 58, .14); }
.jh-sub .jh-phero--plain { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
.jh-sub .jh-phero--plain .jh-phero__body { width: auto; }
.jh-sub .jh-phero .jh-btns { margin-top: 32px; }

/* ============ section: nền bạc / chàm bo góc lệch ============ */
.jh-sub .jh-sec { padding: 120px 0; }
.jh-sub .jh-phero + .jh-sec { padding-top: 96px; }
/* section nền tối: gradient xanh đậm, chữ trắng line-height 2 */
.jh-sub .jh-sec--navy, .jh-sub .jh-sec--deep { background: var(--deep-grad); line-height: 2; letter-spacing: .06em; }

/* ============ văn bản ============ */
.jh-sub .jh-prose ul li::before { width: 6px; height: 6px; border-radius: 50%; transform: none; }
.jh-sub .jh-prose h3 { font-family: var(--jh-serif); font-weight: 700; font-size: 20px; letter-spacing: .05em; }

/* ============ ảnh + chữ ============ */
.jh-sub .jh-split { gap: clamp(40px, 6vw, 88px); }
/* ảnh chữ nhật bo góc + mảng --tint lệch */
.jh-sub .jh-split__img { padding: 0 20px 20px 0; }
.jh-sub .jh-split__img img { border-radius: 8px; box-shadow: 20px 20px 0 var(--tint), 0 24px 60px rgba(11, 31, 58, .14); }
.jh-sub .jh-split__ttl { font-family: var(--jh-serif); font-weight: 700; line-height: 1.7; letter-spacing: .05em; }

/* ============ thẻ ============ */
.jh-sub .jh-grid { gap: 24px; }
.jh-sub .jh-box {
  border-radius: 10px; border-color: var(--jh-rule);
  transition: transform .5s var(--lx-ease), box-shadow .5s var(--lx-ease), border-color .4s;
}
.jh-sub :is(.jh-sec--ivory, .jh-sec--stone) .jh-box { border-color: transparent; }
.jh-sub .jh-box:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 50px rgba(11, 31, 58, .1); }
.jh-sub .jh-box--navy, .jh-sub .jh-box--bronze { border-top-width: 1px; }
.jh-sub .jh-box__no {
  /* "01" -> vòng tròn; "重要ポイント 01" -> viên thuốc (min-width = height) */
  display: inline-grid; place-items: center;
  min-width: 52px; height: 52px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--accent); background: #fff;
  font: 700 16px/1 var(--jh-serif); color: var(--jh-bronze-tx); white-space: nowrap;
}
/* icon "REASON 01" màu đỏ của theme cũ trùng với vòng số -> ẩn khi thẻ đã có số */
.jh-sub .jh-box:has(.jh-box__no) > .jh-box__icon { display: none; }
.jh-sub .jh-box__ttl { margin-top: 18px; font-size: 18px; }
.jh-sub .jh-box--img { overflow: hidden; }
.jh-sub .jh-box ul li::before { width: 6px; height: 6px; border-radius: 50%; top: .75em; }

/* danh sách đánh số: số trong vòng tròn */
.jh-sub .jh-olist > li { padding: 24px 28px 24px 88px; border-radius: 10px; }
.jh-sub .jh-olist > li::before {
  left: 24px; top: 20px;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent); background: #fff;
  font: 700 15px/1 var(--jh-serif);
}

/* ưu / nhược điểm */
.jh-sub .jh-pc { gap: 24px; }
.jh-sub .jh-pc__col { border-top: 0; border-radius: 10px; padding: 40px 38px 34px; }
.jh-sub .jh-pc__col ol li::before { font-family: var(--jh-serif); border-color: var(--accent); }

/* khung nhấn mạnh: bo tròn + vạch vàng bên trong */
.jh-sub .jh-callout { border-left: 0; border-radius: 10px; padding: 36px 44px 36px 52px; }
.jh-sub .jh-callout::before {
  content: ""; position: absolute; left: 26px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px;
  background: var(--accent);
}

/* các bước trục dọc */
.jh-sub .jh-steps > li::before { font-family: var(--jh-serif); }
.jh-sub .jh-steps::before { background: var(--accent); }

/* sơ đồ, thư viện ảnh */
.jh-sub .jh-figure a { border-radius: 0; }
.jh-sub .jh-gallery { gap: 14px; }
.jh-sub .jh-gallery { gap: 6px; }
.jh-sub .jh-gallery a { overflow: hidden; border-radius: 6px; }
.jh-sub .jh-gallery a img { transition: transform .8s cubic-bezier(.22, .61, .36, 1); }
.jh-sub .jh-gallery a:hover img { transform: scale(1.04); }
.jh-sub .jh-box--img > img { border-radius: 8px 8px 0 0; }

/* bảng thông tin */
.jh-sub .jh-dl > dt { font-weight: 500; }

/* ============ nút: bo tròn, nền tô từ trái khi rê chuột, mũi tên chạy vòng ============ */
.jh-sub .jh-btn {
  --fill: var(--accent); --fill-fg: #fff; /* chữ trắng trên nền này 5.9:1 */
  position: relative; isolation: isolate; overflow: hidden;
  justify-content: space-between; gap: 18px;
  min-height: 60px; padding: 0 10px 0 30px;
  transition: color .45s var(--lx-ease), box-shadow .45s;
}
.jh-sub .jh-btn span { flex: 1; text-align: left; }
.jh-sub .jh-btn:hover { transform: none; box-shadow: none; color: var(--fill-fg) !important; }
.jh-sub .jh-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--fill); transform: scaleX(0); transform-origin: right center;
  transition: transform .6s cubic-bezier(.7, 0, .2, 1);
}
.jh-sub .jh-btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.jh-sub :is(.jh-btn--light, .jh-btn--line) { --fill: #0B1F3A; box-shadow: inset 0 0 0 1px #0B1F3A; }
.jh-sub :is(.jh-btn--light, .jh-btn--line):hover { box-shadow: inset 0 0 0 1px #0B1F3A; }
.jh-sub .jh-arrow {
  overflow: hidden; width: 40px; height: 40px;
  background: transparent !important; border: 1px solid currentColor;
  animation: none !important;
}
.jh-sub .jh-arrow::before, .jh-sub .jh-arrow::after {
  inset: 0; left: 0; top: 0; margin: auto;
  width: 14px; height: 10px; border: 0 !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: none;
  transition: transform .5s var(--lx-ease);
}
.jh-sub .jh-arrow::after { transform: translateX(-32px); }
.jh-sub .jh-btn:hover .jh-arrow::before { transform: translateX(32px); }
.jh-sub .jh-btn:hover .jh-arrow::after { transform: translateX(0); }

/* link "詳細を見る": gạch chân chạy lại khi rê chuột */
.jh-sub .jh-more {
  padding-bottom: 6px; border-bottom: 0;
  background: linear-gradient(var(--accent), var(--accent)) 100% 100% / 100% 1px no-repeat;
}
.jh-sub .jh-more::after { display: none; }
.jh-sub .jh-more:hover { color: var(--jh-bronze-tx) !important; animation: lx-sub-line .8s var(--lx-ease); }
@keyframes lx-sub-line {
  0% { background-size: 100% 1px; background-position: 100% 100%; }
  45% { background-size: 0 1px; background-position: 100% 100%; }
  46% { background-size: 0 1px; background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}

/* ============ tab dạng viên thuốc ============ */
.jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px;
  border: 0; border-radius: 999px; background: var(--jh-ivory);
}
.jh-sub .jh-sec--ivory :is(.jh-tabs__nav, .jh-faq__tabs) { background: #fff; }
.jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) button {
  margin: 0; padding: 10px 24px;
  border: 0 !important; border-radius: 999px !important;
  background: transparent !important;
  font: 500 14px/1.6 var(--jh-sans) !important; letter-spacing: .08em;
  color: var(--jh-muted) !important;
  transition: background-color .4s var(--lx-ease), color .4s;
}
.jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) button:hover { color: var(--jh-ink) !important; }
.jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) button.is-active { background: #0B1F3A !important; color: #fff !important; }
.jh-sub .jh-tabs__panel { padding-top: 40px; }

/* ============ 8 lý do (liên kết giữa các trang chi tiết) ============ */
.jh-sub .jh-reasons__list { gap: 12px 24px; }
.jh-sub .jh-reasons__list a {
  gap: 18px; padding: 10px 12px 10px 10px;
  border-radius: 999px; font-weight: 500;
  transition: border-color .3s, background-color .4s, color .4s;
}
.jh-sub .jh-reasons__list .jh-num-font {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent); font-size: 15px;
}
.jh-sub .jh-reasons__list a::after {
  content: ""; width: 36px; height: 36px; flex: none; border-radius: 50%;
  border: 1px solid var(--jh-rule);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12.5M8.5 1l4 4-4 4' fill='none' stroke='%23C8102E' stroke-width='1.3'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.jh-sub .jh-reasons__list a:hover { border-color: var(--accent); }
.jh-sub .jh-reasons__list a:hover::after { transform: translateX(3px); }
.jh-sub .jh-reasons__list .is-current a::after { content: "表示中"; width: auto; height: auto; border: 0; background: none; padding-right: 14px; }
.jh-sub .jh-reasons__list .is-current .jh-num-font { border-color: rgba(191, 214, 245, .6); }

/* ============ khối liên hệ [jh_contact] ============ */
.jh-sub .jh-contact__cards { gap: 24px; }
.jh-sub .jh-ccard { border-radius: 10px; padding: 48px 46px; }
.jh-sub .jh-ccard__ttl { font-family: var(--jh-serif); }
.jh-sub .jh-ccard__hours { font-weight: 500; }

/* ============ FAQ (trang riêng) ============ */
.jh-sub .jh-faq__list details { border-radius: 10px; margin-bottom: 12px; transition: box-shadow .4s; }
.jh-sub .jh-faq__list details[open] { box-shadow: 0 14px 34px rgba(11, 31, 58, .07); }
.jh-sub .jh-faq__list summary { padding-right: 76px; }
.jh-sub .jh-faq__list summary::before { font-family: var(--jh-serif); }
/* ＋/− trong vòng tròn; mở ra thì vòng tô chàm */
.jh-sub .jh-faq__list summary::after {
  right: 20px; top: 50%; width: 40px; height: 40px; margin-top: -20px;
  border: 1px solid var(--jh-rule); border-radius: 50%;
  --c: #0B1F3A;
  background:
    linear-gradient(var(--c), var(--c)) center / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) center / 1px 14px no-repeat;
  transform: none;
  transition: background-size .4s var(--lx-ease), background-color .4s, border-color .4s;
}
.jh-sub .jh-faq__list details[open] summary::after {
  --c: #fff; margin-top: -20px; transform: none;
  background-color: #0B1F3A; border-color: #0B1F3A;
  background-size: 14px 1px, 1px 0;
}
.jh-sub .jh-faq__list details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .5s var(--lx-ease), content-visibility .5s allow-discrete;
}
.jh-sub .jh-faq__list details[open]::details-content { block-size: auto; }
.jh-sub { interpolate-size: allow-keywords; }

/* ============ timeline quy trình ============ */
.jh-sub .jh-flow__lane { border-radius: 999px; }
.jh-sub .jh-flow__card { border-radius: 10px; border-top-width: 1px; box-shadow: inset 0 3px 0 #0B1F3A, 0 6px 18px rgba(11, 31, 58, .05); }
.jh-sub .jh-flow__step--c .jh-flow__card { box-shadow: inset 0 3px 0 var(--accent), 0 6px 18px rgba(11, 31, 58, .05); }
.jh-sub .jh-flow__card::after { display: none; }
.jh-sub :is(.jh-flow__note, .jh-flow__warn) { border-radius: 12px; }
.jh-sub .jh-flow__goal > span { clip-path: none; border-radius: 999px; }

/* ============ biểu mẫu, chính sách, bài viết ============ */
.jh-sub .jh-formbox { border-radius: 10px; }
.jh-sub .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea) { border-radius: 12px; }
.jh-sub .wpcf7 div[style*="overflow"] { border-radius: 14px; background: var(--jh-ivory) !important; }
.jh-sub .jh-policy__item { border-radius: 10px; }
.jh-sub .jh-post__img { border-radius: 10px; }
.jh-sub .jh-post__cat { background: var(--jh-ivory); }
.jh-sub .jh-empty { border-radius: 10px; }

/* độ trễ lần lượt cho các thẻ trong cùng nhóm (JS đặt --d) */
.jh-sub.jh-js .jh-reveal { transition-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  .jh-sub .jh-phero::before { animation: none; }
  .jh-sub .jh-btn::before, .jh-sub .jh-arrow::before, .jh-sub .jh-arrow::after { transition: none; }
}

/* ============ Responsive ============ */
/* khung nội dung canh giữa: mép phải <= 100vw - 120px (nút 無料相談 88px + 24px + 8px) */
@media (min-width: 850px) { .jh-sub { --lx-w: min(1120px, calc(100% - 240px)); } }
@media (max-width: 1100px) {
  .jh-sub .jh-phero { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); }
}
@media (max-width: 849px) {
  .jh-sub { --lx-w: calc(100% - 40px); }
  .jh-sub .jh-phero { grid-template-columns: minmax(0, 1fr); padding: 28px 20px 64px; }
  .jh-sub .jh-phero__body { margin-top: 32px; }
  .jh-sub .jh-phero__img { grid-column: 1; margin-top: 36px; height: auto; aspect-ratio: 16 / 10; }
  .jh-sub .jh-sec { padding: 72px 0; }
  .jh-sub { --lx-leaf: 40px; }
  .jh-sub .jh-box, .jh-sub .jh-pc__col, .jh-sub .jh-ccard, .jh-sub .jh-formbox, .jh-sub .jh-policy__item { border-radius: 10px; }
  .jh-sub .jh-ccard { padding: 34px 24px; }
  .jh-sub .jh-olist > li { padding: 20px 18px 20px 76px; }
  .jh-sub .jh-olist > li::before { left: 18px; width: 40px; height: 40px; font-size: 14px; }
  .jh-sub .jh-callout { padding: 26px 22px 26px 40px; }
  .jh-sub .jh-callout::before { left: 18px; top: 24px; bottom: 24px; }
  .jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) { display: flex; border-radius: 10px; }
  .jh-sub :is(.jh-tabs__nav, .jh-faq__tabs) button { flex: 1 1 auto; padding: 10px 14px; font-size: 13px !important; }
  .jh-sub .jh-btn { min-width: 0; width: 100%; }
  .jh-sub .jh-faq__list summary { padding-right: 66px; }
  .jh-sub .jh-faq__list summary::after { right: 14px; width: 36px; height: 36px; margin-top: -18px; }
  .jh-sub .jh-faq__list details[open] summary::after { margin-top: -18px; }
}
