/* ============================================================================
   اجزای تصویری پرونده و خدمات: نماهای فک، نوار قبل/بعد، متن انیمیشنی.
   ============================================================================ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- نماهای فک ---------- */
.jv { display: grid; gap: 14px; }
.jv-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.jv-tab {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--mut);
  font: inherit; font-size: .84rem; font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .4s var(--spring);
}
.jv-tab:hover { color: var(--cream); border-color: rgba(201, 169, 106, .5); }
.jv-tab[aria-selected=true] {
  background: linear-gradient(180deg, #e0c48c, #c9a96a);
  border-color: transparent; color: #1a1508;
  box-shadow: 0 10px 24px rgba(201, 169, 106, .2);
}
.jv-stage {
  position: relative; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(201, 169, 106, .10), transparent 62%),
    linear-gradient(180deg, #17140f, #0d0b09);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .45);
}
.jv-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 50%, transparent 45%, rgba(0, 0, 0, .55));
}
.jv-svg { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.jv-tooth { animation: jvIn .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes jvIn { from { opacity: 0; } to { opacity: 1; } }
.jv-num { font-size: 11px; fill: #7d7466; font-family: IRANSansX, Vazirmatn, sans-serif; }
.jv-tooth.on .jv-num { fill: #ffc79a; font-weight: 700; }
.jv-groove { stroke: #6f6552; fill: none; }
.jv-tooth.on .jv-groove { stroke: #8a3f16; }
.jv-fossa { fill: #6f6552; fill-opacity: .45; }
.jv-tooth.on .jv-fossa { fill: #8a3f16; fill-opacity: .5; }
.jv-side { font-size: 12px; fill: #6d6558; font-family: IRANSansX, Vazirmatn, sans-serif; }
html.rm .jv-tooth { animation: none; }

.jv-cap { margin: 0; }
.jv-marks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jv-marks-t { font-size: .82rem; color: var(--mut); }
.jv-chip {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 107, 44, .45); background: rgba(255, 107, 44, .14);
  color: #ffc79a; font-size: .8rem; font-weight: 700;
}

/* ---------- نوار کشیدنی قبل/بعد ---------- */
.ba-strip { display: grid; gap: 10px; }
.ba-frame {
  position: relative; border-radius: 20px; overflow: hidden; cursor: ew-resize;
  border: 1px solid var(--border); touch-action: pan-y;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .45);
  transition: box-shadow .3s ease;
}
.ba-frame.drag { box-shadow: 0 22px 54px rgba(201, 169, 106, .22); }
.ba-frame:focus-visible { outline: 3px solid var(--gold-l); outline-offset: 3px; }
.ba-layer { display: block; }
.ba-layer svg { display: block; width: 100%; height: auto; }
.ba-layer.top { position: absolute; inset: 0; }
.ba-frame::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--p, 50%) - 1px);
  width: 2px; background: linear-gradient(180deg, rgba(255, 255, 255, .1), #fff, rgba(255, 255, 255, .1));
  box-shadow: 0 0 14px rgba(0, 0, 0, .6); pointer-events: none; z-index: 3;
}
.ba-handle {
  position: absolute; top: 50%; left: calc(50% - 21px); transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; z-index: 4; pointer-events: none;
  display: grid; place-items: center; font-size: .95rem; color: #1a1508;
  background: linear-gradient(180deg, #f2ede3, #d9d0bf);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.ba-tag {
  position: absolute; top: 12px; z-index: 5; padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(11, 10, 8, .78); border: 1px solid rgba(255, 255, 255, .14);
  color: #e6dfd2; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ba-tag.b { inset-inline-end: 12px; }
.ba-tag.a { inset-inline-start: 12px; color: #ffd9b0; border-color: rgba(255, 107, 44, .35); }
.ba-body { display: grid; gap: 4px; }
.ba-body h3 { margin: 0; font-size: 1.02rem; }
.ba-body .meta { margin: 0; color: var(--mut); font-size: .84rem; }
.ba-hint { margin: 0; }

/* ---------- صفحهٔ خدمت ---------- */
.svc-hero { position: relative; overflow: hidden; background: linear-gradient(165deg, #1c1813 0%, #0c0a08 100%); }
.svc-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 120% at 88% 0%, rgba(201, 169, 106, .14), transparent 62%);
}
.svc-hero .in { max-width: 1180px; margin: auto; padding: 46px 20px 54px; position: relative; z-index: 1; }
.svc-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); margin: 10px 0 10px; }
.svc-hero .lead { max-width: 46em; color: #cfc6b6; margin: 0; }
.svc-hero .back { color: var(--gold-l); text-decoration: none; font-size: .9rem; }
.svc-hero .kgold { color: var(--gold); }

.svc-main { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: start; padding: 34px 0 8px; }
.svc-main.no-aftercare { grid-template-columns: minmax(0, 1fr); }
.svc-copy { display: grid; gap: 12px; }
.svc-copy p { margin: 0; line-height: 2.05; color: #ded6c8; }

/* متن انیمیشنی: کلمه‌به‌کلمه با محو نرم بالا می‌آید */
.reveal-text { margin: 0; line-height: 2.05; }
.reveal-text .w { display: inline-block; opacity: 0; transform: translateY(14px); filter: blur(3px); }
.reveal-text.in .w {
  animation: revealWord .72s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i) * 26ms);
}
@keyframes revealWord { to { opacity: 1; transform: none; filter: blur(0); } }
html.rm .reveal-text .w { opacity: 1; transform: none; filter: none; animation: none; }
.reveal-text .w.gold { color: var(--gold-l); font-weight: 700; }

.svc-rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 169, 106, .45), transparent); margin: 6px 0; }

/* گالری قبل/بعد */
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.ba-grid .ba-strip { background: linear-gradient(180deg, #1b1814, #141110); border: 1px solid var(--border); border-radius: 22px; padding: 14px; }
.svc-sect { padding: 44px 0 6px; }
.svc-sect > h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }

@media (max-width: 900px) {
  .svc-main { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .jv-tab { padding: 7px 13px; font-size: .78rem; }
  .ba-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   کلاس‌های کمکی‌ای که جاوااسکریپت استفاده می‌کرد ولی هیچ‌جا تعریف نشده بود.
   بدون این‌ها فرم‌ها و ردیف دکمه‌ها در دیالوگ‌ها بی‌استایل می‌ماندند.
   ============================================================================ */
.muted { color: var(--mut); }
.muted.small, .small { font-size: .8rem; }
.stack { display: grid; gap: 14px; }
.row-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inp { width: 100%; }
.inp.sel { min-width: 140px; }
.btn.primary { background: linear-gradient(180deg, #e0c48c, #c9a96a); border-color: transparent; color: #1a1508; }
.btn.primary:hover { background: linear-gradient(180deg, #ebd3a0, #d2b273); }
.dlg-x, .x {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--mut); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.dlg-x:hover, .x:hover { color: var(--cream); border-color: rgba(201, 169, 106, .5); }

/* ---------- پرونده: نمای هر جلسه و یادداشت دکتر ---------- */
.visit-views { display: grid; gap: 10px; }
.vdoc { display: grid; gap: 6px; }
.vdoc-t {
  margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .02em;
  color: var(--gold); display: flex; align-items: center; gap: 8px;
}
.vdoc-t::before { content: ""; width: 18px; height: 1px; background: var(--gold); display: inline-block; }
.vdoc .reveal-text.doc { margin: 0; }

/* نوار عکس واقعی */
.ba-photo { display: block; width: 100%; height: auto; aspect-ratio: 420 / 260; object-fit: cover; background: #14110d; }
.jv-smile { display: block; width: 100%; height: auto; }
