/* planner.css — question-style content area for planner.html.
   The page header, nav and footer are provided by the original style.css/sections.css/responsive.css.
   This file only styles the content inside #planner-root. */

#planner-root {
  --p-radius: 14px;
  --p-shadow: 0 6px 22px rgba(72,112,200,.10);
  --p-maxw: 1040px;
  --p-ink: #1d2433;
  --p-ink-2: #4a5468;
  --p-muted: #7c8698;
  --p-line: #e3e8f2;
  --p-blue-50: #f3f7fe;
  --p-blue-100: #e7eefb;
  --p-blue-200: #b9cdf0;
  --p-blue-500: #4870C8;
  --p-blue-600: #3b5fae;
  --p-blue-700: #2f4d8f;
  padding-bottom: 30px;
  padding-top: 26px;
  color: var(--p-ink);
}

#planner-root a { color: inherit; }

/* ===== 流程区（方案B：公文红头 · 时间轴） ===== */
.flow-card {
  max-width: var(--p-maxw);
  margin: 22px auto 18px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(31,45,71,.05);
}
.flow-card__redline { height: 4px; background: linear-gradient(90deg, #4870C8, #6d8fd6); }
.flow-card__inner { padding: 20px 26px 22px; }

.flow-lead {
  text-align: center;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--p-blue-800);
}
.flow-lead__red { color: #d6453d; }
.flow-lead__sub {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: .06em;
}
[dir="rtl"] .flow-lead { text-align: center; }

/* 时间轴流程条（节点由 planner.js renderFlow() 渲染，保留原类名） */
.flow-bar {
  position: relative;
  max-width: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex; align-items: flex-start; gap: 0;
  counter-reset: flowstep;
}
.flow-bar::before {
  content: '';
  position: absolute; top: 13px; left: 9%; right: 9%;
  height: 2px;
  background: linear-gradient(90deg, #e3e9f2, #8fa6cd, #e3e9f2);
}
.flow-node {
  flex: 1 1 0; min-width: 0;
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 4px; border-radius: 0;
  text-decoration: none; border: none; cursor: pointer;
  background: none; box-shadow: none;
}
.flow-node::before {
  counter-increment: flowstep;
  content: counter(flowstep);
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #b9c6de; color: #6b7c99;
  font-size: 12px; font-weight: 800; line-height: 1;
}
.flow-node[data-flow="go"]::before { content: '✓'; }
.flow-node[data-flow="contact"]::before { content: '✆'; }
.flow-node__txt { display: block; min-width: 0; text-align: center; margin-top: 8px; }
.flow-node__prefix {
  display: block; font-size: 10.5px; font-weight: 600;
  color: #8896aa; margin: 0 0 1px; letter-spacing: .02em;
}
.flow-node__hl {
  display: block; font-size: 13.5px; font-weight: 700;
  color: #4a5568; line-height: 1.35;
}
.flow-node__red { color: #d6453d; }
.flow-node:hover .flow-node__hl { color: var(--p-blue-700); }
.flow-node.is-active::before {
  background: var(--p-blue-700); border-color: var(--p-blue-700); color: #fff;
  box-shadow: 0 0 0 5px rgba(47,77,138,.14);
}
.flow-node.is-active .flow-node__hl { color: var(--p-blue-700); }
.flow-node.is-done::before { background: #e7edf8; border-color: var(--p-blue-500); color: var(--p-blue-700); }

.flow-sep { display: none; }

@media (max-width: 720px) {
  .flow-card { margin: 14px 10px 12px; }
  .flow-card__inner { padding: 14px 14px 16px; }
  .flow-lead { font-size: 15px; }
  .flow-lead__sub { font-size: 12px; }
  .flow-bar { flex-wrap: wrap; gap: 10px 6px; margin-top: 16px; }
  .flow-bar::before { display: none; }
  .flow-node { flex: 1 1 30%; }
  .flow-node__hl { font-size: 12px; }
}

/* ===== topbar slogan：阿语模式全右对齐，圆点在最右 ===== */
.topbar__slogan-col--cn { direction: ltr; }
[dir="rtl"] .topbar__slogan-col--cn { text-align: right; align-items: flex-end; }
/* 中文栏：文字保持 LTR 书写（防「1.」「。」被 bidi 重排），仅用 row-reverse 把圆点翻到最右 */
[dir="rtl"] .topbar__slogan-col--cn li { flex-direction: row-reverse; justify-content: flex-start; }
/* 阿语栏：RTL 书写。注意 flex 交叉轴随 direction 翻转——RTL 下 align-items:flex-end 是左侧，
   贴右须用 flex-start（与中文栏相反）；li 主轴起点天然在右，圆点自动在最右 */
[dir="rtl"] .topbar__slogan-col--en { direction: rtl; text-align: right; align-items: flex-start; }
[dir="rtl"] .topbar__slogan-col--en li { justify-content: flex-start; }

/* 让流程条与各步骤锚点滚动时避开吸顶导航 */
#home, #planner-root .p-step { scroll-margin-top: 78px; }

/* ---- steps（直接接在 Hero 之后，不再有独立标题区） ---- */
.p-step { max-width: var(--p-maxw); margin: 0 auto; padding: 18px 20px 8px; }
.p-step__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.p-step__label {
  background: var(--p-blue-500); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.p-step__title { font-size: 21px; margin: 0; color: var(--p-ink); line-height: 1.3; }
.p-step__sub { color: var(--p-muted); font-size: 13px; margin: 4px 0 16px; }
/* highlighted keywords: bold + brand deep blue (global, works in About Us box too) */
.hl { color: var(--p-blue-700); font-weight: 700; }
.p-step__title .hl, .p-step__sub .hl { color: var(--p-blue-700); font-weight: 700; }
/* About Us: shrink body text only, keep media image size unchanged */
.about-box__body p { font-size: 13.5px; line-height: 1.65; }
.about-box__title { font-size: 15px; }
/* About Us three slogans: each on its own line, block centered, text left-aligned */
.about-slogans { font-size: 13.5px; width: fit-content; max-width: 100%; margin: 12px auto 0; text-align: left; line-height: 2; }
.about-slogans > div { display: block; }

/* ---- cards grid ---- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
/* 允许网格/弹性子项收缩到容器宽度以内，避免内容最小宽度撑破布局导致横向溢出（手机端根因） */
.spec-top, .spec-cat, .spec-cards, .p-grid, .pcard { min-width: 0; }
.pcard {
  background: #fff; border: 1.5px solid var(--p-line); border-radius: var(--p-radius);
  padding: 11px 13px; cursor: pointer; transition: .16s; box-shadow: 0 2px 8px rgba(72,112,200,.05);
  display: flex; flex-direction: column; gap: 5px;
  position: relative; height: 100%; box-sizing: border-box; isolation: isolate;
}

.pcard__art {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  height: 84px; width: auto; max-width: 132px; object-fit: contain;
  opacity: .85; pointer-events: none; user-select: none;
}
/* 癌症/罕见病/骨科/眼科再放大 1.1 倍（84→92px 高，132→145px 宽） */
.pcard__art--xl { height: 92px; max-width: 145px; }
.pcard:hover { border-color: var(--p-blue-200); transform: translateY(-2px); }
.pcard.is-sel { border-color: var(--p-blue-500); background: var(--p-blue-50); box-shadow: var(--p-shadow); }
.pcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard__group { font-size: 12px; color: var(--p-muted); }
.pcard__check {
  position: absolute; bottom: 12px; left: 14px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--p-blue-200);
  color: var(--p-blue-600); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex: none; background: #fff;
}
.pcard.is-sel .pcard__check { background: var(--p-blue-500); border-color: var(--p-blue-500); color: #fff; }
/* Step 2 / Step 3 选择圆点：与第1步同款小圆圈，位置改到右下角 */
.pcard--plan .pcard__check,
.pcard--region .pcard__check {
  left: auto; right: 14px; top: auto; bottom: 12px;
}
/* 第 3 步区域卡：医院链接按钮固定左下角，与「+」按钮同一水平线对齐
   （bottom:12px 与 .pcard__check 一致），两张卡位置绝对一致，
   不再受 chips/intro 长度影响 */
.pcard--region .pcard__row:last-child .hover-tag {
  position: absolute;
  left: 14px;        /* 靠左：与「+」按钮的 right:14 对称 */
  bottom: 0;         /* 相对 last-child 行（已设占位高度），与简介拉开距离 */
  z-index: 2;
}
[dir="rtl"] .pcard--region .pcard__row:last-child .hover-tag {
  left: auto;
  right: 14px;       /* RTL 镜像：物理右侧（RTL 视觉左侧） */
}
/* 区域卡：医院链接按钮所在行用 margin-top:auto 推到卡片底部——网格等高拉伸时
   （两张卡内容长度不同）药丸不再悬空偏高，任何卡/宽度下都与「+」贴底对齐 */
.pcard--region .pcard__row:last-child { position: relative; min-height: 34px; margin-top: auto; padding-top: 10px; }
.pcard__name { font-size: 13.5px; font-weight: 600; color: var(--p-ink); padding-right: 112px; }
/* Step 2/3 计划与区域卡片无右上角图：去掉第 1 步预留的图片区，标题尽量单行 */
.pcard--plan .pcard__name, .pcard--region .pcard__name { padding-right: 0; }
.pcard__desc { font-size: 13px; color: var(--p-ink-2); }
.pcard__panel {
  padding-top: 6px; display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; color: var(--p-ink-2);
}
.pcard__row b { color: var(--p-ink); font-weight: 600; }
/* 第 3 步区域卡（广东/上海）简介行：缩小字号，与 chips/标题层次分明 */
.pcard--region .pcard__row.pcard__intro { font-size: 12px; color: var(--p-ink-2); line-height: 1.55; }
.chip {
  display: inline-block; background: var(--p-blue-100); color: var(--p-blue-700);
  border-radius: 6px; padding: 1px 8px; margin: 2px 4px 2px 0; font-size: 12px;
}

/* ---- sponsored highlight card (charity foundation) ---- */
.pcard--sponsor {
  border: 2px solid #c79a3a;
  background: linear-gradient(180deg, #fff8ea, #fff);
  box-shadow: 0 6px 20px rgba(199,154,58,.18);
  position: relative;
}
.pcard--sponsor:hover { border-color: #b8862b; transform: translateY(-2px); }
.pcard--sponsor.is-sel { border-color: #b8862b; background: #fff5e0; }
.pcard__badge {
  position: absolute; top: -11px; right: 14px;
  background: linear-gradient(180deg, #d8a93f, #b8862b);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 11px; border-radius: 999px; letter-spacing: .03em;
  cursor: pointer;
}
.pcard__badge-tip {
  position: absolute; top: 26px; right: 0; z-index: 40;
  background: #fff; border: 1px solid var(--p-line); border-radius: 8px;
  padding: 6px 11px; box-shadow: 0 8px 24px rgba(31,45,71,.16);
  color: var(--p-ink-2); font-weight: 600; font-size: 12px; line-height: 1.4;
  white-space: nowrap; text-align: left;
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
}
.pcard__badge:hover .pcard__badge-tip, .pcard__badge:focus-within .pcard__badge-tip {
  opacity: 1; visibility: visible; transform: none;
}
.pcard__badge.is-open .pcard__badge-tip { opacity: 1; visibility: visible; transform: none; }
.budget__val--sponsor { color: #b8862b; }

/* ---- 预算框内典型项目参考价清单 ---- */
.budget__detail-title {
  margin-top: 10px; font-size: 12px; color: var(--p-blue-700); font-weight: 600;
  border-top: 1px dashed var(--p-line); padding-top: 8px;
}
.budget__group { margin-top: 6px; }
.budget__group-title { font-size: 13px; font-weight: 600; color: var(--p-ink); margin-bottom: 3px; }
.budget__items { display: flex; flex-direction: column; gap: 3px; padding-left: 6px; }
.budget__item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 12px; color: var(--p-ink-2); line-height: 1.5;
}
.budget__item-price {
  flex: none; color: var(--p-blue-700); font-weight: 600; white-space: nowrap; font-size: 12px;
}
.budget__plans { display: flex; flex-direction: column; gap: 4px; }
.budget__plan-item { font-size: 12px; color: var(--p-ink-2); line-height: 1.5; }
.budget__plan-name { color: var(--p-ink); font-weight: 600; margin-right: 6px; }

/* ---- budget ---- */
.p-budget { max-width: var(--p-maxw); margin: 14px auto 0; padding: 0 20px; }
.budget-box {
  background: linear-gradient(180deg, var(--p-blue-50), #fff);
  border: 1.5px solid var(--p-blue-200); border-radius: var(--p-radius);
  padding: 18px 20px; box-shadow: var(--p-shadow);
}
.budget-box--service {
  background: linear-gradient(180deg, #f7f9fc, #fff);
  border-color: var(--p-line);
}
.budget-box--service .budget__title { color: var(--p-ink); }
.budget__title { font-size: 13px; color: var(--p-blue-700); font-weight: 600; }
.budget__val { font-size: 26px; font-weight: 700; color: var(--p-ink); margin: 4px 0 6px; }
.budget__note { font-size: 12px; color: var(--p-muted); }
.budget__empty { color: var(--p-muted); font-size: 13px; }

/* ---- 兜底自填卡（第1步 / 第3步「上面都没有？自己输入」） ---- */
.spec-cat--other { margin-top: 4px; }
.pcard--other { cursor: default; }
.pcard--other:hover { transform: none; border-color: var(--p-line); }
.pcard--other .pcard__name { color: var(--p-ink-2); font-weight: 600; }
.pcard__input {
  width: 100%; margin-top: 6px; padding: 8px 10px; font-size: 13px;
  border: 1.5px solid var(--p-blue-200); border-radius: 8px; color: var(--p-ink);
  outline: none; box-sizing: border-box;
}
.pcard__input:focus { border-color: var(--p-blue-500); box-shadow: 0 0 0 3px rgba(72,112,200,.15); }

/* ---- 自定义卡片（其他/不确定、其他计划） ---- */
.pcard--custom { cursor: default; background: #fff; }
.pcard--custom:hover { transform: none; border-color: var(--p-line); }
.pcard--custom .pcard__name, .pcard--custom .pcard__exp { padding-right: 0; }
.pcard--custom .pcard__panel { gap: 10px; }
.pcard--custom .pcard__row { padding: 0; }
.pcard--custom .pcard__row > b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--p-muted); }
.pcard__checkline { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--p-ink-2); cursor: pointer; }
.pcard__checkline input { width: 16px; height: 16px; accent-color: var(--p-blue-600); cursor: pointer; }

/* ---- footer quick-nav narrowing on wide screens ---- */
@media (min-width: 1021px) {
  .footer__top {
    max-width: 1160px;
    margin-inline: auto;
    gap: var(--sp-4);
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}

/* ---- footer quick-nav: four columns in one horizontal row on narrow screens ---- */
@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .footer__col { min-width: 0; }
  .footer__col h5 { font-size: 12px; margin-bottom: 6px; letter-spacing: .02em; overflow-wrap: anywhere; }
  .footer__col a { font-size: 11.5px; padding: 3px 0; line-height: 1.5; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .footer__top { gap: 10px; }
  .footer__col h5 { font-size: 11.5px; }
  .footer__col a { font-size: 11px; }
}

/* ---- summary + contact ---- */
.p-summary {
  max-width: var(--p-maxw); margin: 22px auto 0; padding: 0 20px;
}
.summary-box {
  background: #fff; border: 1.5px solid var(--p-line); border-radius: var(--p-radius);
  padding: 20px 22px; box-shadow: var(--p-shadow); font-size: 14px; color: var(--p-ink);
}
.summary-box p { margin: 0 0 10px; }
.summary-box p:last-child { margin-bottom: 0; }
.summary__empty { color: var(--p-muted); }

.contact-area { margin-top: 16px; }
.contact-title { font-size: 18px; margin: 0 0 10px; color: var(--p-ink); }
.contact-card {
  background: var(--p-blue-50); border: 1px solid var(--p-blue-200); border-radius: var(--p-radius);
  padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
}
.contact-card .ci { font-size: 13px; }
.contact-card .ci b { color: var(--p-blue-700); display: block; font-size: 12px; font-weight: 600; }
.contact-note { font-size: 12px; color: var(--p-muted); margin-top: 8px; }

/* ---- #charity 区块微调 ---- */
#charity { padding-top: 24px; }
#charity .section__title { font-size: 21px; }

/* ---- 三入口联系方式（WhatsApp / Email / 电话）—— 左右分栏 ---- */
.contact-channels {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
/* 左栏：WhatsApp */
.contact-channel--wa {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 16px;
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%);
}
.contact-channel--wa:hover {
  border-color: #25D366;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.15);
}
/* 右栏：Email + 电话堆叠，均分高度 */
.contact-channel__stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.contact-channel__stack > .contact-channel {
  flex: 1;
  display: flex;
  align-items: center;
}

/* 通用 channel 卡片 */
.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--p-blue-200);
  border-radius: var(--p-radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.contact-channel:hover {
  border-color: var(--p-blue-400);
  box-shadow: 0 4px 14px rgba(37, 83, 180, 0.08);
}
/* WhatsApp QR 可点击放大 */
.contact-channel__qr {
  position: relative;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}
.contact-channel__qr img {
  width: 180px; height: 180px; max-width: 180px;
  object-fit: cover;
  border: 1px solid #e5e7eb; background: #fff;
  display: block;
  transition: transform 0.2s;
}
.contact-channel__qr:hover img { transform: scale(1.03); }
.contact-channel__zoom-hint {
  position: absolute; bottom: 6px; right: 6px;
  font-size: 15px; line-height: 1;
  background: rgba(0,0,0,0.45); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
/* 图标区 */
.contact-channel__icon {
  width: 38px; height: 38px; min-width: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; flex-shrink: 0;
  background: var(--p-blue-50); color: var(--p-blue-600);
}
.contact-channel--wa .contact-channel__icon { background: #d1fae5; color: #059669; }
.contact-channel__icon svg { width: 19px; height: 19px; }
/* 文字区 */
.contact-channel__body { flex: 1; min-width: 0; }
.contact-channel__title {
  margin: 0 0 3px; font-size: 13.5px; font-weight: 700;
  color: var(--p-ink); line-height: 1.3;
}
.contact-channel__link {
  display: inline-block; font-size: 13.5px; font-weight: 600;
  color: var(--p-blue-600); text-decoration: none;
  word-break: break-all; line-height: 1.4;
  transition: color 0.15s;
}
.contact-channel__link:hover { color: var(--p-blue-800); text-decoration: underline; }
.contact-channel--wa .contact-channel__link--wa { color: #059669; }
.contact-channel--wa .contact-channel__link--wa:hover { color: #047857; }
.contact-channel__hint {
  margin: 3px 0 0; font-size: 11px; color: var(--p-muted);
  line-height: 1.4;
}

/* ---- 响应式：手机版联系卡保持左右布局（左二维码 · 右上邮箱 · 右下电话） ---- */
@media (max-width: 720px) {
  .contact-channels { flex-direction: row; flex-wrap: nowrap; gap: 10px; align-items: stretch; }
  .contact-channel { padding: 10px 12px; }
  .contact-channel--wa { flex: 0 0 128px; min-width: 128px; padding: 10px 8px; }
  .contact-channel__qr img { width: 112px; height: 112px; max-width: 112px; }
  .contact-channel__stack { flex: 1; gap: 10px; min-width: 0; }
  .contact-channel__icon { width: 30px; height: 30px; min-width: 30px; border-radius: 8px; }
  .contact-channel__icon svg { width: 15px; height: 15px; }
  .contact-channel__title { font-size: 12.5px; }
  .contact-channel__link { font-size: 12.5px; }
  .contact-channel__hint { font-size: 10.5px; }
}
@media (max-width: 360px) {
  .contact-channel--wa { flex: 0 0 108px; min-width: 108px; }
  .contact-channel__qr img { width: 92px; height: 92px; max-width: 92px; }
}

/* ---- responsive ---- */
@media (max-width: 720px) {
  .p-grid { grid-template-columns: 1fr; }
  /* 第 3 步区域卡：手机版左右并排 2 列，仿照第 1 步治病类 */
  #region-grid { grid-template-columns: repeat(2, 1fr); }
  .p-step__title { font-size: 18px; }
  .spec-top { flex-direction: column; }
  .spec-cat--disease .spec-cards, .spec-cat--special .spec-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Hero 新闻轮播卡阵（planner 专属，不影响 index.html） ===== */
/* 覆盖共享 sections.css 的 hero 布局为纵向 flex：轮播填满 + 主格底部 CTA 横条 */
.hero__main { display: flex; flex-direction: column; align-items: stretch; min-height: 452px; }
.hero__side { display: flex; flex-direction: column; align-items: stretch; min-height: 218px; }

.news-carousel { position: relative; flex: 1; width: 100%; overflow: hidden; border-radius: inherit; }
.news-carousel__track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.nc-slide {
  position: relative; flex: 0 0 100%; min-width: 100%; height: 100%;
  display: block; overflow: hidden; text-decoration: none; color: #fff;
}
.nc-slide__media { position: absolute; inset: 0; background-color: #eef2f8; }
.nc-slide__media .ph--dark { background: linear-gradient(135deg, #e9eef6, #dde6f3); color: var(--p-ink-2); }
.nc-slide__media .ph--dark .ph__icon { stroke: var(--p-blue-600); }
.nc-slide__media .ph { position: absolute; inset: 0; height: 100%; }
.nc-slide__media .ph__inner { padding: 0; }
.nc-slide__media .ph__label {
  position: absolute; top: 12px; left: 12px; margin: 0;
  background: rgba(11,28,58,.55); color: #fff; padding: 3px 9px; border-radius: 6px; font-size: 11px;
}
.nc-slide__media .ph__hint { display: none; }
.nc-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.nc-slide__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,28,58,.96) 4%, rgba(11,28,58,.62) 40%, rgba(11,28,58,0) 78%);
}
.nc-slide__caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 90px 18px 16px; }
.nc-slide__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); }

.nc-dots { position: absolute; right: 12px; bottom: 12px; z-index: 4; display: flex; gap: 6px; }
.nc-dot { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .25s; }
.nc-dot.is-active { width: 20px; border-radius: 4px; background: #fff; }

/* ---- Step 1 module detail panel ---- */
.pcard__exp { font-size: 13px; color: var(--p-ink-2); line-height: 1.5; padding-right: 112px; }
.pcard__panel { font-size: 13px; color: var(--p-ink-2); }
.pcard__row { display: block; padding: 4px 0; }
.pcard__row > b { display: inline-block; color: var(--p-ink); font-weight: 600; margin-bottom: 2px; }
.pcard__row > span { display: block; line-height: 1.6; }
.linklist { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.news-link {
  display: block; position: relative; padding: 6px 10px 6px 18px; border-radius: 8px;
  background: var(--p-blue-50); color: var(--p-blue-700); text-decoration: none;
  border: 1px solid var(--p-blue-100); font-size: 13px; line-height: 1.45;
  transition: .14s;
}
.news-link::before {
  content: ""; position: absolute; left: 8px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--p-blue-500);
}
.news-link:hover { background: var(--p-blue-100); color: var(--p-blue-800); transform: translateX(2px); }
.placeholder { color: var(--p-muted); font-style: italic; }

/* ===== 第1步：分类布局（disease 左2列 / light 右1列 / special 下3列）+ 悬停小标签 ===== */
.spec-top {
  display: grid; grid-template-columns: 2fr 1fr; gap: 14px;
  align-items: stretch; margin-bottom: 16px;
}
.spec-cat { display: flex; flex-direction: column; }
.spec-cat__title {
  font-size: 14px; font-weight: 700; margin: 0 0 8px; padding-left: 2px;
}
.spec-cat--disease .spec-cat__title { color: #4870C8; }
.spec-cat--light   .spec-cat__title { color: #0d9f6e; }
.spec-cat--special .spec-cat__title { color: #b8862b; }

.spec-cat--disease .spec-cards,
.spec-cat--light .spec-cards {
  display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; flex: 1;
}
.spec-cat--disease .spec-cards { grid-template-columns: 1fr 1fr; }
.spec-cat--light .spec-cards { grid-template-columns: 1fr; }
.spec-cat--special { margin-top: 2px; }
.spec-cat--special .spec-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.spec-bottom { margin-top: 4px; }

.pcard:hover, .pcard:focus-within { z-index: 5; }
.pcard__tags {
  display: flex; justify-content: flex-end; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 6px;
}
.pcard__panel { margin-top: 8px; }

/* 类别视觉区分：左边框 + 淡色背景 */
.spec-cat--disease .pcard { border-left: 3px solid #4870C8; background: #fafbff; }
.spec-cat--light   .pcard { border-left: 3px solid #10b981; background: #f6fffb; }
.spec-cat--special .pcard { border-left: 3px solid #c79a3a; background: #fffbf3; }
.spec-cat--disease .pcard.is-sel { background: #eef4ff; }
.spec-cat--light   .pcard.is-sel { background: #eafff7; }
.spec-cat--special .pcard.is-sel { background: #fff5e6; }

/* 悬停小标签（右下角长条椭圆：金色圆圈 / south CN / east CN） */
.hover-tag { position: relative; cursor: help; display: inline-flex; align-items: center; vertical-align: middle; }
.hover-tag__icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--p-blue-200);
  color: var(--p-blue-700); font-size: 10px; font-weight: 700; line-height: 1;
  white-space: nowrap;
}
.hover-tag.is-gold .hover-tag__icon {
  min-width: 22px; padding: 0;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c79a3a);
  border-color: #b8862b;
  box-shadow: 0 0 0 3px rgba(199,154,58,.16);
}
.hover-tip {
  /* 固定宽度：width:auto 时中文长句按单字收缩成竖条；248px 保证可读 */
  position: absolute; bottom: 30px; right: 0; width: 248px; max-width: min(248px, calc(100vw - 32px)); z-index: 40;
  background: #fff; border: 1px solid var(--p-line); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 8px 24px rgba(31,45,71,.16);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
  text-align: left; font-size: 12px; color: var(--p-ink-2); line-height: 1.5;
  overflow-wrap: anywhere;
}
.hover-tip .news-link { overflow-wrap: anywhere; }
.hover-tag:hover .hover-tip, .hover-tag:focus-within .hover-tip, .hover-tag.is-open .hover-tip {
  opacity: 1; visibility: visible; transform: none;
}
.hover-tip__t { display: block; color: var(--p-blue-700); font-weight: 700; margin-bottom: 5px; font-size: 12px; }
.hover-tip .linklist { margin-top: 4px; }
.hover-tip .news-link { font-size: 12px; padding: 5px 8px 5px 16px; }
.hover-tip .news-link::before { top: 9px; }

/* 手机版：悬浮信息框改为居中浮层（更宽 + 限高滚动），解决过窄过高、贴边溢出问题 */
@media (max-width: 720px) {
  .hover-tip {
    position: fixed; top: 50%; left: 50%; right: auto; bottom: auto;
    width: min(420px, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
    max-height: min(62vh, 480px);
    overflow-y: auto;
    transform: translate(-50%, -50%) scale(.96);
    z-index: 120;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 18px 48px rgba(16,28,50,.30);
  }
  .hover-tag:hover .hover-tip,
  .hover-tag:focus-within .hover-tip,
  .hover-tag.is-open .hover-tip { transform: translate(-50%, -50%) scale(1); }
  .hover-tip__t { font-size: 13.5px; margin-bottom: 6px; }
  .hover-tip .news-link { font-size: 13px; padding: 7px 8px 7px 18px; }
  .hover-tip .news-link::before { top: 11px; }
  /* 徽章气泡：允许换行并限制宽度，避免长文本溢出屏幕 */
  .pcard__badge-tip { white-space: normal; max-width: min(300px, calc(100vw - 40px)); font-size: 11.5px; line-height: 1.5; }
}

/* 触屏/手机：禁用卡片悬停位移。transform 祖先会让 .hover-tip 的 fixed 定位失效
   （fixed 退化为相对卡片定位），导致悬浮框贴边溢出屏幕 */
@media (hover: none), (max-width: 720px) {
  .pcard:hover { transform: none; }
}

/* ===== 页脚 slogan 行对齐：LTR 左对齐 / 阿语(RTL) 右对齐（语言习惯规则） ===== */
.footer__slogan-col { text-align: left; }
[dir="rtl"] .footer__slogan-col { text-align: right; }
/* 阿语模式：中文列保持 LTR 书写方向（防「。」「1.」被 RTL 重排到行首），仅整体右对齐；阿语列 RTL */
[dir="rtl"] .footer__slogan-col--cn { direction: ltr; }
[dir="rtl"] .footer__slogan-col--en { direction: rtl; }

/* slogan 行 = 编号 + 正文（fsl-line/fsl-num/fsl-txt）：
   LTR 默认编号在左；阿语模式编号镜像到最右（同 topbar 圆点方案） */
.footer__slogan-col .fsl-line { display: flex; align-items: baseline; gap: 6px; }
.footer__slogan-col .fsl-num { flex-shrink: 0; }
/* 中文栏：direction 保持 ltr，用 row-reverse 把编号翻到最右（正文内部仍是 LTR，无 bidi 污染） */
[dir="rtl"] .footer__slogan-col--cn .fsl-line { flex-direction: row-reverse; justify-content: flex-start; }
/* 阿语栏：direction rtl 使 flex 主轴起点在右，编号天然贴右，无需 row-reverse */

/* ===== 页脚 slogan 整块对齐：LTR 左对齐 / 阿语右对齐（语言习惯规则） =====
   .footer__slogan 基础(sections.css)是居中（justify-content:center），
   按用户要求整块（logo+两栏）改为 LTR 左对齐、RTL 右对齐。
   RTL 下 flex 主轴从右开始：justify-content:flex-start = 右侧（不可用 flex-end）。
   列内文本：.footer__slogan-col 已设 LTR text-align:left / RTL text-align:right。 */
.footer__slogan { justify-content: flex-start; text-align: left; }
[dir="rtl"] .footer__slogan { justify-content: flex-start; text-align: right; }
/* ≤900px 起为纵向(column)堆叠（responsive.css 断点），交叉轴=水平：
   align-items:flex-start = LTR 贴左 / RTL 贴右（覆盖默认 center 居中） */
@media (max-width: 900px) {
  .footer__slogan { align-items: flex-start; }
  [dir="rtl"] .footer__slogan { align-items: flex-start; }
}

@media (max-width: 720px) {
  .p-grid { grid-template-columns: 1fr; }
  /* 第 3 步区域卡：手机版左右并排 2 列，仿照第 1 步治病类 */
  #region-grid { grid-template-columns: repeat(2, 1fr); }
  .p-step__title { font-size: 18px; }
  .spec-top { grid-template-columns: 1fr; }
  .spec-cat--disease .spec-cards, .spec-cat--light .spec-cards { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .spec-cat--special .spec-cards { grid-template-columns: repeat(2, 1fr); }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .pcard__art { height: 60px; max-width: 100px; }
  .pcard__name, .pcard__exp { padding-right: 80px; }
}



/* ===== Hero 三框：标签 tab + 轮播（数据驱动） ===== */
.hero-box { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; position: relative; }
.hero-box__label {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  padding: 5px 13px; border-radius: 999px;
  background: rgba(47,77,138,.92); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none;
}
.hero-carousel { flex: 1; min-height: 0; }

/* ---------- Arabic (ar) / RTL support ---------- */
[dir="rtl"] body,
[dir="rtl"] input,
[dir="rtl"] button,
[dir="rtl"] textarea,
[dir="rtl"] select {
  font-family: "Noto Sans Arabic", "Segoe UI", "Tahoma", "Microsoft YaHei", "PingFang SC", sans-serif;
}
/* Mirror the disease/light/special accent borders (were border-left) */
[dir="rtl"] .spec-cat--disease .pcard { border-left: none; border-right: 3px solid #4870C8; background: #fafbff; }
[dir="rtl"] .spec-cat--light   .pcard { border-left: none; border-right: 3px solid #10b981; background: #f6fffb; }
[dir="rtl"] .spec-cat--special .pcard { border-left: none; border-right: 3px solid #c79a3a; background: #fffbf3; }
/* Clear the hover tag on the mirrored side */
[dir="rtl"] .pcard__name,
[dir="rtl"] .pcard__exp { padding-right: 0; padding-left: 112px; }
/* 移动端：RTL 图标位于左侧，预留区收紧到 80px 镜像（与 LTR 右侧一致） */
@media (max-width: 720px) {
  [dir="rtl"] .pcard__name,
  [dir="rtl"] .pcard__exp { padding-left: 80px; }
}
/* Step 2/3 计划与区域卡片 RTL：同样去掉预留区（无右上图） */
[dir="rtl"] .pcard--plan .pcard__name,
[dir="rtl"] .pcard--region .pcard__name { padding-left: 0; }
/* Move the specialty card illustration to the LEFT in RTL,
   so it does not overlap the right-aligned Arabic text */
[dir="rtl"] .pcard__art { right: auto; left: 16px; }
[dir="rtl"] .pcard--custom .pcard__name,
[dir="rtl"] .pcard--custom .pcard__exp { padding-left: 0; }
/* Keep the 3 hover buttons (east CN / south CN / gold circle) at bottom-RIGHT in RTL,
   same as LTR (the .pcard__tags flex-end flips to the left under dir=rtl, so force start) */
[dir="rtl"] .pcard__tags { justify-content: flex-start; }
/* Keep the "+" selection button at bottom-LEFT in RTL, same as LTR */
[dir="rtl"] .pcard__check { left: 14px; right: auto; }
/* RTL hover-tooltip text reads right-to-left */
[dir="rtl"] .hover-tip { text-align: right; }
[dir="rtl"] .pcard__badge-tip { text-align: right; }
/* Keep the hero carousel track in LTR layout so the existing
   translateX(-idx*100%) slide math stays valid under dir=rtl
   (otherwise slides reorder right-to-left and blank/white gaps appear) */
[dir="rtl"] .news-carousel__track { direction: ltr; }
/* Restore RTL only for the caption text so Arabic titles still read right-to-left */
[dir="rtl"] .nc-slide__caption { padding: 16px 16px 18px 90px; direction: rtl; text-align: right; }
[dir="rtl"] .flow-sep { transform: scaleX(-1); }
[dir="rtl"] .hero-box__label { text-align: right; }
[dir="rtl"] .lang__menu { left: auto; right: 0; }
[dir="rtl"] .nav__menu { left: 8px; right: auto; }

/* ---- 平滑滚动（锚点跳转） ---- */
html { scroll-behavior: smooth; }

/* ---- 窄屏（≤480px）：卡片单列，避免两列太窄导致标题折行/底部药丸挤压重叠 ----
   覆盖第 3 步区域卡与第 1 步三类专科卡（治病/轻医疗/特殊治疗）；
   481-720px 较宽手机保持两列（卡片有足够空间，药丸完整显示） */
@media (max-width: 480px) {
  #region-grid { grid-template-columns: 1fr; }
  .spec-cat--disease .spec-cards,
  .spec-cat--light .spec-cards,
  .spec-cat--special .spec-cards { grid-template-columns: 1fr; }
}

/* ---- 导航栏品牌区：logo + 穆斯林友好徽章 ---- */
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav__brand {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; overflow: visible;
}
.nav__brand .logo { flex: 0 0 auto; min-width: 0; }
.nav__menu { margin-left: auto; }

/* ---- 穆斯林友好徽章（logo 旁，可点击跳转） ---- */
.muslim-friendly-badge {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  background: linear-gradient(135deg, #0e7c4a, #14a366);
  color: #fff !important; font-size: 11px; font-weight: 600;
  border-radius: 999px; letter-spacing: .02em;
  white-space: nowrap; flex-shrink: 0; text-decoration: none !important;
  margin-left: 10px;
  box-shadow: 0 2px 6px rgba(14,124,74,.22);
  transition: transform .15s, box-shadow .15s;
}
.muslim-friendly-badge:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(14,124,74,.32); color: #fff !important; }
.mf-icon { width: 12px; height: 12px; flex-shrink: 0; }
.mf-text { flex-shrink: 0; }

/* ---- 穆斯林友好独立区块（第2步下方） ---- */
.muslim-friendly-section {
  margin-top: 24px; padding: 22px 24px;
  background: linear-gradient(135deg, rgba(14,124,74,.06), rgba(20,163,102,.03));
  border: 1.5px solid rgba(14,124,74,.22);
  border-radius: 14px;
  scroll-margin-top: 100px;
}
.muslim-friendly-section__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.muslim-friendly-section__icon { display: inline-flex; }
.muslim-friendly-section__icon svg { width: 22px; height: 22px; color: #0e7c4a; }
.muslim-friendly-section__title {
  margin: 0; font-size: 16px; font-weight: 700; color: #0b4d2e;
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
}
.muslim-friendly-check {
  width: 18px; height: 18px; flex: none;
  accent-color: #0e7c4a; cursor: pointer;
}
.muslim-friendly-section__text { display: inline; }
.muslim-friendly-section__text > span[lang="zh-CN"] { font-weight: 800; }
.muslim-friendly-section__text > span[lang="ar"] { direction: rtl; font-family: "Noto Sans Arabic", "Segoe UI", "Tahoma", sans-serif; }
/* lang-only 显隐由全局规则接管 */
.muslim-friendly-section__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.muslim-friendly-item {
  background: #fff; border: 1px solid rgba(14,124,74,.18);
  border-radius: 10px; padding: 14px 16px;
}
.muslim-friendly-item h4 {
  margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #0b4d2e;
  display: flex; flex-wrap: wrap; gap: 0 6px;
}
.muslim-friendly-item h4 span { display: none; }
.muslim-friendly-item h4 span[lang="ar"] { direction: rtl; font-family: "Noto Sans Arabic", "Segoe UI", "Tahoma", sans-serif; }
.muslim-friendly-item ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px;
}
.muslim-friendly-item li {
  display: none; font-size: 12.5px; color: var(--p-ink-2);
  line-height: 1.5; padding-left: 12px; position: relative;
}
.muslim-friendly-item li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: #0e7c4a; font-weight: 700;
}
[dir="rtl"] .muslim-friendly-item li { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .muslim-friendly-item li::before { left: auto; right: 0; }
/* 仅显示当前语言（全站语言相互独立、互不同步） */
html[lang="zh-CN"] .muslim-friendly-section__title span[lang="zh-CN"],
html[lang="zh-CN"] .muslim-friendly-item h4 span[lang="zh-CN"],
html[lang="zh-CN"] .muslim-friendly-item li[lang="zh-CN"],
html[lang="zh-TW"] .muslim-friendly-section__title span[lang="zh-TW"],
html[lang="zh-TW"] .muslim-friendly-item h4 span[lang="zh-TW"],
html[lang="zh-TW"] .muslim-friendly-item li[lang="zh-TW"],
html[lang="en"] .muslim-friendly-section__title span[lang="en"],
html[lang="en"] .muslim-friendly-item h4 span[lang="en"],
html[lang="en"] .muslim-friendly-item li[lang="en"],
html[lang="ar"] .muslim-friendly-section__title span[lang="ar"],
html[lang="ar"] .muslim-friendly-item h4 span[lang="ar"],
html[lang="ar"] .muslim-friendly-item li[lang="ar"] { display: inline-block; }
@media (max-width: 760px) {
  .muslim-friendly-section__grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .muslim-friendly-badge { font-size: 11px; padding: 3px 8px 3px 7px; margin-left: 0; }
  .muslim-friendly-badge .mf-text { display: inline; }
  .muslim-friendly-badge .mf-icon { width: 14px; height: 14px; }
}

/* ---- 站内搜索（顶部常驻输入框） ---- */
.search {
  position: relative; display: flex; align-items: center; margin-left: 8px;
}
.search__icon {
  position: absolute; left: 11px; width: 16px; height: 16px;
  color: #8895ad; pointer-events: none;
}
.search__input {
  width: 200px; height: 34px; padding: 0 12px 0 34px;
  border: 1.5px solid rgba(11,28,58,.18); border-radius: 999px;
  font-size: 13px; color: #1f2d47; outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.search__input:focus { border-color: #4870c8; box-shadow: 0 0 0 3px rgba(72,112,200,.15); }
.search__results {
  position: absolute; top: 42px; right: 0; width: 300px; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid rgba(11,28,58,.14); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31,45,71,.16); z-index: 60; display: none;
}
.search__results.is-open { display: block; }
.search__item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; color: #1f2d47; text-decoration: none;
  border-bottom: 1px solid rgba(11,28,58,.08);
}
.search__item:last-child { border-bottom: none; }
.search__item:hover { background: #eef4ff; }
.search__item-label { flex: 1; line-height: 1.4; }
.search__item-kind {
  flex: none; font-size: 11px; padding: 1px 8px; border-radius: 6px;
  background: #e8f0fe; color: #2f4d8a; white-space: nowrap;
}
.search__empty { padding: 14px; font-size: 13px; color: #8895ad; text-align: center; }

/* 卡片高亮闪烁 */
.pcard.is-flash { animation: cardflash .9s ease 2; }
@keyframes cardflash {
  0%, 100% { box-shadow: 0 2px 8px rgba(72,112,200,.05); }
  50% { box-shadow: 0 0 0 4px rgba(72,112,200,.5); border-color: #4870c8; }
}

/* 移动端：搜索栏占右侧剩余空间，语言下拉靠左、导航下拉靠右，均保留边距避免被裁切 */
@media (max-width: 900px) {
  .search { margin-left: auto; flex: 1 1 0; min-width: 0; max-width: none; }
  .search__input { width: 100%; }
  .search__results { width: min(320px, calc(100vw - 16px)); left: auto; right: 0; }
  .lang__menu {
    left: 0; right: auto;
    transform: none;
    width: auto;
    min-width: 130px;
    max-width: calc(100vw - 16px);
    white-space: nowrap;
  }
  .lang:hover .lang__menu, .lang:focus-within .lang__menu, .lang.is-open .lang__menu {
    transform: none;
  }
  [dir="rtl"] .lang__menu {
    left: auto; right: 0;
    transform: none;
  }
  [dir="rtl"] .lang:hover .lang__menu, [dir="rtl"] .lang:focus-within .lang__menu, [dir="rtl"] .lang.is-open .lang__menu {
    transform: none;
  }
  .muslim-friendly-badge { font-size: 10px; padding: 3px 8px 3px 6px; margin-left: 0; }
  .muslim-friendly-badge .mf-text { display: inline; }
}

/* ---- multi-language span visibility helper (used in About / Charity sections) ---- */
.lang-only > [lang] { display: none; }
html[lang="zh-CN"] .lang-only > [lang="zh-CN"],
html[lang="zh-TW"] .lang-only > [lang="zh-TW"],
html[lang="en"] .lang-only > [lang="en"],
html[lang="ar"] .lang-only > [lang="ar"] { display: block; }
html[lang="zh-CN"] .lang-only > span[lang="zh-CN"],
html[lang="zh-TW"] .lang-only > span[lang="zh-TW"],
html[lang="en"] .lang-only > span[lang="en"],
html[lang="ar"] .lang-only > span[lang="ar"] { display: inline; }

/* narrow rails: long English hospital names must wrap, not overflow */
.hosp-link .lang-only { min-width: 0; flex: 1 1 auto; }
.hosp-link .lang-only > span[lang="en"],
.hosp-link .lang-only > span[lang="ar"] { overflow-wrap: anywhere; }
.repost .lang-only { display: block; }
.repost .lang-only > span[lang="en"],
.repost .lang-only > span[lang="ar"] { overflow-wrap: anywhere; }

/* ---- act-block real image support ---- */
.act-block__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- budget tools (privacy / disclaimer buttons, top-right) ---- */
.p-budget { position: relative; }
.budget__tools { display: flex; gap: 8px; justify-content: flex-end; margin: 0 0 8px; }
.legal-btn {
  font-size: 12px; line-height: 1; padding: 7px 12px;
  border: 1px solid var(--p-blue-200); border-radius: 999px;
  background: #fff; color: var(--p-blue-700); font-weight: 600;
  cursor: pointer; transition: background .16s, color .16s;
}
.legal-btn:hover { background: var(--p-blue-50); }
[dir="rtl"] .budget__tools { flex-direction: row-reverse; }

/* ---- legal modal (disclaimer / privacy) ---- */
.legal-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.legal-modal[hidden] { display: none; }
.legal-modal__overlay { position: absolute; inset: 0; background: rgba(8,18,38,.55); }
.legal-modal__panel {
  position: relative; z-index: 1; width: min(680px, 100%); max-height: 86vh;
  background: var(--white); border-radius: var(--r-xl); box-shadow: 0 24px 60px rgba(15,30,60,.28);
  display: flex; flex-direction: column; overflow: hidden;
}
.legal-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.legal-modal__title { font-size: 18px; font-weight: 700; color: var(--p-blue-700); margin: 0; }
.legal-modal__close { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--ink-700); font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.legal-modal__close:hover { background: var(--blue-50); color: var(--blue-700); }
.legal-modal__body { padding: 18px 22px 24px; overflow-y: auto; }
.legal-modal__body p { font-size: 13.5px; line-height: 1.7; color: var(--ink-500); margin-bottom: 14px; }
.legal-modal__body p:last-child { margin-bottom: 0; }
/* 条款标题独立成行（标题+换行，不用冒号分隔），下方为条款内容 */
.legal-modal__body b { color: var(--p-blue-700); display: block; margin: 0 0 3px; }
[dir="rtl"] .legal-modal__title, [dir="rtl"] .legal-modal__body { font-family: "Noto Sans Arabic", "Segoe UI", "Tahoma", sans-serif; }
body.no-scroll { overflow: hidden; }
