/* =========================================================
   EMX media-swap — image <-> Vimeo video in the same spot
   Slide 1 = image (shown first), Slide 2 = video (on scroll).
   Fixed arrow button toggles. Doctor portrait stays on top.
   ========================================================= */
.emx-mediaswap {
  position: relative; display: block; width: 100%; line-height: 0;
  isolation: isolate;            /* contain inner z-index layers */
}
.emx-ms-img { position: relative; z-index: 1; transition: opacity .45s ease; }
.emx-ms-img img { display: block; width: 100%; height: auto; }
.emx-ms-video {
  position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #000;
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
.emx-ms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.emx-mediaswap.emx-show-video .emx-ms-video { opacity: 1; pointer-events: auto; }
.emx-mediaswap.emx-show-video .emx-ms-img { opacity: 0; }

/* doctor portrait: relocated into the media, centered at the BOTTOM, smaller */
.emx-ms-portrait {
  position: absolute; z-index: 50;
  left: -80px; bottom: -165px;       /* bottom-left, sticking out below-left */
  width: 150px; line-height: 0;
  padding-bottom: 10px;              /* large screens only (reset on mobile below) */
}
.emx-ms-portrait img {
  display: block; width: 100%; height: auto;
  border-radius: 16px; border: 4px solid #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}
@media (max-width: 768px) {
  .emx-ms-portrait { width: 90px; left: -22px; bottom: -96px; padding-bottom: 0; }
}

/* fixed arrow toggle — same icon always, clear & styled, vertically centered */
.emx-ms-toggle {
  position: absolute; top: 50%; right: 16px; z-index: 6;
  transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.92); background: #cc3366; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 0;
  box-shadow: 0 6px 18px rgba(204,51,102,.45);
  transition: transform .2s ease, background .2s ease;
}
.emx-ms-toggle:hover { transform: translateY(-50%) scale(1.09); background: #b82e5b; }
.emx-ms-toggle:active { transform: translateY(-50%) scale(.96); }
.emx-ms-toggle svg {
  width: 24px; height: 24px; fill: none; stroke: #fff;
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 768px) {
  .emx-ms-toggle { width: 46px; height: 46px; right: 12px; }
  .emx-ms-toggle svg { width: 21px; height: 21px; }
}
