/* ============ Хөдөлгөөн, анимаци — тайван, албан ёсны ============
   Зарчим: богино хугацаа (.3–.5s), бага зай (12–16px), эргэлт/үсрэлт байхгүй.
   Анхаарал сарниулах гялалзалт, орб, intro дэлгэц ашиглахгүй.                  */

/* ---------- keyframes ---------- */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- scroll reveal ---------- */
.rv { opacity: 0; }
.rv.in, .rv-pop.in, .rv-left.in, .rv-right.in {
  animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: var(--d, 0s);           /* stagger — JS-ээс --d хувьсагч онооно */
}

/* ---------- hero: зөвхөн нэг удаагийн зөөлөн орж ирэлт ---------- */
.hero .kicker       { animation: fadeUp .5s .05s both; }
.hero h1            { animation: fadeUp .5s .15s both; }
.hero .lead         { animation: fadeUp .5s .25s both; }
.hero .hero-actions { animation: fadeUp .5s .35s both; }
.hero .hero-stats   { animation: fadeUp .5s .45s both; }
.hero .hero-figure  { animation: fadeIn .7s .2s both; }

/* гарчгийн доорх алтан зураас */
.section-head h2::after, h2.sec-c::after, .center > h2::after { transform-origin: left; animation: drawBar .6s .2s cubic-bezier(.2,.7,.2,1) both; }
.tc h2.sec-c::after, .section-dark h2::after, .center > h2::after { transform-origin: center; }

/* ---------- ерөнхий интерактив: зөвхөн өнгө, сүүдэр ---------- */
.btn { transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(11,46,91,.22); }
.card img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.03); }
.service-card, .why-item, .process-step, .doctor-card, .vmv-card, .service-row {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover, .doctor-card:hover, .vmv-card:hover, .service-row:hover {
  transform: translateY(-2px); box-shadow: 0 10px 26px rgba(11,46,91,.12); border-color: #C6D3E3; }
.why-item:hover { border-color: #C6D3E3; box-shadow: 0 6px 18px rgba(11,46,91,.08); }
.process-step:hover { background: rgba(255,255,255,.09); }
.faq-item { transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { border-color: #C6D3E3; box-shadow: 0 6px 18px rgba(11,46,91,.08); }
.faq-item p { animation: fadeIn .3s ease both; }
.site-header { transition: box-shadow .2s; }
.header-scrolled { box-shadow: 0 4px 16px rgba(11,46,91,.08); }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }

/* ---------- захиалгын wizard ---------- */
.day-chip, .slot, .svc-body, .pick-body { transition: border-color .15s, background .15s, box-shadow .15s; }
.day-chip:hover, .slot:hover { border-color: var(--navy); }
.wnum { transition: background .25s, border-color .25s, color .25s; }
.bstep:not(.hidden) { animation: fadeIn .3s ease both; }

/* ---------- хуудас хоорондын шилжилт ----------
   Анхаар: main дээр transform-той анимаци хийвэл дотор нь байгаа
   position:fixed элементүүд эвдэрдэг тул зөвхөн opacity ашиглана. */
main { animation: fadeIn .3s ease both; }
body.page-leave main { opacity: 0; transition: opacity .15s ease; animation: none; }

/* ---------- хөдөлгөөн багасгах тохиргоог хүндэтгэнэ ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; }
}
