/* ============================================================
   clinicparvaz.ir — bodymap.css — نسخهٔ ۱.۰
   استایل نقشهٔ بدن تعاملی — انتقال عینی از inline سکشن
   #bodymap در index (بدون هیچ تغییر رفتاری)
   ============================================================ */

#bodymap .bm-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:26px;align-items:start;margin-top:22px}
#bodymap .bm-body{position:sticky;top:max(80px, calc(50vh - 280px));padding:0;z-index:1}
#bodymap .bm-tilt{perspective:900px}
#bodymap .bm-tilt svg{width:100%;height:auto;display:block;max-height:560px;
  transition:transform .25s ease;will-change:transform}

#bodymap svg .g-part{transform-box:view-box}
#bodymap svg #gTorso {transform-origin:150px 230px}
#bodymap svg #gHead  {transform-origin:150px 58px}
#bodymap svg #gArmR  {transform-origin:112px 88px}
#bodymap svg #gArmL  {transform-origin:188px 88px}
#bodymap svg #gForeR {transform-origin:72px 62px}
#bodymap svg #gForeL {transform-origin:228px 62px}
#bodymap svg #gHandR {transform-origin:38px 41px}
#bodymap svg #gHandL {transform-origin:262px 41px}
#bodymap svg #gThighR{transform-origin:126px 262px}
#bodymap svg #gThighL{transform-origin:174px 262px}
#bodymap svg #gShinR {transform-origin:118px 352px}
#bodymap svg #gShinL {transform-origin:182px 352px}
#bodymap svg #gFootR {transform-origin:114px 442px}
#bodymap svg #gFootL {transform-origin:186px 442px}

/* — انیمیشن سکون — */
#bodymap svg #gTorso{animation:bmIdleTorso 5s ease-in-out infinite alternate}
#bodymap svg #gHead {animation:bmIdleHead 6s ease-in-out infinite alternate}
#bodymap svg #gArmR {animation:bmIdleR 4.5s ease-in-out infinite alternate}
#bodymap svg #gArmL {animation:bmIdleL 4.5s ease-in-out infinite alternate}
#bodymap svg #gShadow{transform-box:view-box;transform-origin:150px 498px;
  animation:bmShadow 5s ease-in-out infinite alternate}
@keyframes bmIdleTorso{from{transform:rotate(-1.3deg) scaleY(1)}
                       to  {transform:rotate(1.3deg)  scaleY(1.026)}}
@keyframes bmIdleHead{from{transform:rotate(-1.8deg)} to{transform:rotate(1.8deg)}}
@keyframes bmIdleR   {from{transform:rotate(4deg)}    to{transform:rotate(-5deg)}}
@keyframes bmIdleL   {from{transform:rotate(-4deg)}   to{transform:rotate(5deg)}}
@keyframes bmShadow  {from{transform:scaleX(1.02);opacity:.9}
                      to  {transform:scaleX(.97);opacity:.75}}

#bodymap svg.mv-head     #gHead  {animation:bmHeadTilt 2.6s ease-in-out infinite alternate}
#bodymap svg.mv-neck     #gHead  {animation:bmNeck 2.4s ease-in-out infinite alternate}
#bodymap svg.mv-shoulder #gArmR  {animation:bmFrozen 2.6s ease-in-out infinite alternate}
#bodymap svg.mv-elbow    #gForeL {animation:bmElbow 1.9s ease-in-out infinite alternate}
#bodymap svg.mv-wrist    #gHandR {animation:bmWrist 1.6s ease-in-out infinite alternate}
#bodymap svg.mv-fingers  #gHandL {animation:bmFingers 1.1s ease-in-out infinite alternate}
#bodymap svg.mv-spine    #gTorso {animation:bmSpine 3s ease-in-out infinite alternate}
#bodymap svg.mv-lumbar   #gTorso {animation:bmLumbar 2.6s ease-in-out infinite alternate}
#bodymap svg.mv-hip      #gThighR{animation:bmDdh 2.6s ease-in-out infinite alternate}
#bodymap svg.mv-thigh    #gThighL{animation:bmCpThigh 2.2s ease-in-out infinite alternate}
#bodymap svg.mv-thigh    #gShinL {animation:bmCpShin 2.2s ease-in-out infinite alternate}
#bodymap svg.mv-knee     #gShinR {animation:bmKnee 1.9s ease-in-out infinite alternate}
#bodymap svg.mv-ptb      #gShinL {animation:bmPtb 2.4s ease-in-out infinite}
#bodymap svg.mv-dropfoot #gFootR {animation:bmDropFoot 1.8s ease-in-out infinite alternate}
#bodymap svg.mv-sole     #gFootL {animation:bmSole 1.9s ease-in-out infinite alternate}
#bodymap svg.mv-toes     #gFootR {animation:bmToes 2s ease-in-out infinite alternate}

@keyframes bmHeadTilt{from{transform:rotate(-8deg)} to{transform:rotate(8deg)}}
@keyframes bmNeck     {from{transform:rotate(4deg)} to{transform:rotate(-4deg)}}
@keyframes bmFrozen   {from{transform:rotate(-4deg)} to{transform:rotate(22deg)}}
@keyframes bmElbow    {from{transform:rotate(0)} to{transform:rotate(-40deg)}}
@keyframes bmWrist    {from{transform:rotate(-15deg)} to{transform:rotate(15deg)}}
@keyframes bmFingers  {from{transform:rotate(-6deg)} to{transform:rotate(6deg)}}
@keyframes bmSpine    {from{transform:rotate(-2.2deg)} to{transform:rotate(2.2deg)}}
@keyframes bmLumbar   {from{transform:rotate(-2.8deg)} to{transform:rotate(2.8deg)}}
@keyframes bmDdh      {from{transform:rotate(0)} to{transform:rotate(-14deg)}}
@keyframes bmCpThigh  {from{transform:rotate(-4deg)} to{transform:rotate(6deg)}}
@keyframes bmCpShin   {from{transform:rotate(10deg)} to{transform:rotate(-6deg)}}
@keyframes bmKnee     {from{transform:rotate(0)} to{transform:rotate(30deg)}}
@keyframes bmPtb      {0%,100%{transform:rotate(0)} 30%{transform:rotate(9deg)} 70%{transform:rotate(14deg)}}
@keyframes bmDropFoot {from{transform:rotate(14deg)} to{transform:rotate(0deg)}}
@keyframes bmSole     {from{transform:rotate(5deg)} to{transform:rotate(-13deg)}}
@keyframes bmToes     {from{transform:rotate(-8deg)} to{transform:rotate(6deg)}}

#bodymap svg .g-hi{filter:drop-shadow(0 0 7px rgba(245,158,11,.85))}

/* — کارت آکاردئون — */
#bodymap .bm-col{display:flex;flex-direction:column;gap:8px}
#bodymap .bm-col:empty{display:none}
#bodymap .bm-card{
  background:linear-gradient(160deg,#fff 0%,#F6FAFD 100%);
  border:1.5px solid #DCE8F2;border-radius:14px;
  cursor:pointer;overflow:hidden;
  transition:border-color .2s,box-shadow .2s,transform .2s;position:relative}
#bodymap .bm-card:hover{transform:translateY(-2px);border-color:#7FB3E0;
  box-shadow:0 8px 20px rgba(30,58,95,.10)}
#bodymap .bm-card.on{border-color:#F59E0B;box-shadow:0 8px 22px rgba(245,158,11,.20)}
#bodymap .bm-card.on::before{content:'';position:absolute;top:0;bottom:0;right:0;width:4px;
  border-radius:0 14px 14px 0;background:linear-gradient(180deg,#F59E0B,#fbbf24)}
#bodymap .bm-h{padding:10px 14px;display:flex;align-items:center;gap:8px}
#bodymap .bm-card h4{color:#1E3A5F;font-size:13.5px;font-weight:800;margin:0;line-height:1.7;flex:1}
#bodymap .bm-cnt{background:#EAF4FB;color:#2A5A8F;border-radius:999px;
  font-size:10.5px;font-weight:800;padding:2px 10px;white-space:nowrap;flex:none}
#bodymap .bm-card.on .bm-cnt{background:#ECFDF5;color:#065F46}
#bodymap .bm-chev{flex:none;width:22px;height:22px;border-radius:50%;
  background:#F2F7FB;color:#2A5A8F;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;transition:transform .3s ease,background .2s;
  transform:rotate(-90deg)}
#bodymap .bm-card.on .bm-chev{transform:rotate(90deg);background:#ECFDF5;color:#065F46}
#bodymap .bm-items{max-height:0;overflow:hidden;transition:max-height .4s ease}
#bodymap .bm-card.on .bm-items{max-height:640px}
#bodymap .bm-item{padding:2px 14px 10px;border-top:1px dashed #E4EBF2}
#bodymap .bm-item b{display:block;color:#1E3A5F;font-size:12.5px;font-weight:800;margin-top:6px}
#bodymap .bm-sol{display:inline-block;background:#FFF7E8;color:#8a6414;border-radius:999px;
  font-size:10px;font-weight:800;padding:1px 9px;margin-top:4px}
#bodymap .bm-item p{color:#43556A;font-size:11.5px;line-height:1.9;margin:5px 0 0}
#bodymap .bm-more{display:inline-block;color:#1E88B8;font-size:11px;font-weight:800;
  text-decoration:none;margin-top:5px}
#bodymap .bm-more:hover{color:#2A5A8F}
#bodymap .bm-book{display:flex;margin:0 14px 12px}
#bodymap .bm-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:1;
  padding:8px 14px;border-radius:999px;font-weight:800;font-size:12px;text-decoration:none;color:#fff;
  background:linear-gradient(135deg,#F59E0B,#fbbf24);
  box-shadow:0 5px 13px rgba(245,158,11,.30);transition:transform .2s}
#bodymap .bm-btn:hover{transform:translateY(-2px)}

#bodymap .bm-spot{cursor:pointer}
#bodymap .bm-spot circle.sp-ring{fill:rgba(255,255,255,.55)}
#bodymap .bm-spot circle.sp-core{fill:#29A8D8;stroke:#fff;stroke-width:2;transition:fill .2s}
#bodymap .bm-spot:hover circle.sp-core,
#bodymap .bm-spot.on circle.sp-core{fill:#F59E0B}
#bodymap .bm-spot circle.sp-pulse{fill:none;stroke:#29A8D8;stroke-width:1.6;
  animation:bmPulse 2.6s ease-out infinite;transform-origin:center;transform-box:fill-box}
#bodymap .bm-spot.on circle.sp-pulse{stroke:#F59E0B}
@keyframes bmPulse{0%{transform:scale(.6);opacity:.9} 70%{transform:scale(2.2);opacity:0} 100%{transform:scale(2.2);opacity:0}}

@media (max-width:900px){
  #bodymap .bm-grid{grid-template-columns:1fr;gap:12px}
  #bodymap .bm-body{order:-1;max-width:270px;margin:0 auto;position:static}
  #bodymap .bm-body svg{max-height:440px}
  #bodymap .bm-col{gap:7px}
  #bodymap .bm-card.on .bm-items{max-height:840px}
  #bodymap .bm-item p{font-size:12px}
}
@media (prefers-reduced-motion: reduce){
  #bodymap svg *, #bodymap svg{animation:none !important;transition:none !important}
}