/* Moonslayers — neon effects pack (ms-fx-*).
   Picked per element in Elementor (Advanced → "Moonslayers — Animații" → "Efecte neon"),
   which adds the class ms-fx-<effect> on the element. ms-neon-fx.js injects the layers the
   effects draw with (aria-hidden, pointer-events: none) and runs them only while on screen.
   Rules: continuous motion is transform / opacity only; nothing moves with reduced motion;
   "before" states exist only under html.ms-fx-on (set by the script when motion is allowed),
   so without the script every element looks exactly as designed in Elementor.
   Element classes: ms-fx-lightning, -rim, -sweep, -glitch, -tube, -scanlines, -sparks, -charge.
   Injected layers: ms-fx-bolt, -ring, -sheen, -ghosts, -scan, -zap, -wire (never the same names). */

.ms-fx-lightning, .ms-fx-rim, .ms-fx-sweep, .ms-fx-glitch, .ms-fx-tube,
.ms-fx-scanlines, .ms-fx-sparks, .ms-fx-charge {
  --ms-fx-neon: var(--e-global-color-accent, #ff2d55);
  --ms-fx-wine: var(--e-global-color-primary, #c8123d);
  --ms-fx-light: #ff6b86;
  --ms-fx-hot: #fff1f4;
  --ms-fx-cyan: #2ee6ff;
  --ms-fx-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* An element that hosts a layer: positioned only if nothing else positions it (zero specificity) */
:where(.ms-fx-pos) { position: relative; }

/* ---------- Shared layer ---------- */
.ms-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  float: none;
  box-sizing: border-box;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  /* hover / reveal effects move an element's children: never these layers */
  transform: none !important;
  translate: none !important;
  scale: none !important;
  rotate: none !important;
  filter: none !important;
  box-shadow: none !important;
  will-change: auto !important;
}
/* the layers' own parts, safe from generic theme rules (span { padding / border / ... }).
   Specificity of one class only (:where), so each part's own rules below still win. */
.ms-fx-layer :where(span[class^="ms-fx-"]) {
  box-sizing: border-box;
  float: none;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  background-color: transparent;  /* every part paints with its own gradient (background-image) */
}
.ms-fx-layer .ms-fx-sheen__a,
.ms-fx-layer .ms-fx-sheen__b,
.ms-fx-layer .ms-fx-wire__run { background: none; }
/* On a container, layers that light the background sit behind the content */
.ms-fx-layer.ms-fx-layer--under { z-index: auto; }

/* ---------- 1. Lightning ---------- */
.ms-fx-layer.ms-fx-bolt { overflow: hidden; }
.ms-fx-bolt__flash {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  background: radial-gradient(70% 58% at var(--ms-fx-x, 50%) var(--ms-fx-y, 32%),
    rgba(255, 238, 243, 0.92),
    rgba(255, 107, 134, 0.42) 30%,
    rgba(200, 18, 61, 0.14) 60%,
    rgba(200, 18, 61, 0) 100%);
  mix-blend-mode: screen;
}
.ms-fx-layer .ms-fx-bolt__svg {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  opacity: 0;
}
.ms-fx-bolt__svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ms-fx-bolt__svg .ms-fx-bolt__glow { stroke: var(--ms-fx-neon); stroke-opacity: 0.22; stroke-width: 13px; }
.ms-fx-bolt__svg .ms-fx-bolt__mid { stroke: var(--ms-fx-neon); stroke-opacity: 0.75; stroke-width: 3.6px; }
.ms-fx-bolt__svg .ms-fx-bolt__core { stroke: var(--ms-fx-hot); stroke-width: 1.6px; }
.ms-fx-bolt__svg .ms-fx-bolt__fork .ms-fx-bolt__glow { stroke-width: 8px; stroke-opacity: 0.14; }
.ms-fx-bolt__svg .ms-fx-bolt__fork .ms-fx-bolt__mid { stroke-width: 2.4px; stroke-opacity: 0.45; }
.ms-fx-bolt__svg .ms-fx-bolt__fork .ms-fx-bolt__core { stroke-width: 1px; stroke-opacity: 0.85; }
@media (max-width: 767px) {
  .ms-fx-bolt__svg .ms-fx-bolt__glow { stroke-width: 9px; }
  .ms-fx-bolt__svg .ms-fx-bolt__mid { stroke-width: 3px; }
  .ms-fx-bolt__svg .ms-fx-bolt__core { stroke-width: 1.3px; }
}

/* ---------- 2. Rim light: a light that travels around the border ----------
   The layer is masked to its edges (a crisp line plus a soft glow fading inwards; the
   rounded corners come from overflow + border-radius). Inside it a quarter-size wedge with a
   conic gradient spins around the centre with transform only: the compositor rotates it,
   nothing is repainted per frame. */
.ms-fx-layer.ms-fx-ring {
  --ms-fx-rim-edge: #000 0, #000 var(--ms-fx-rim-w, 1.5px), rgba(0, 0, 0, 0.32) calc(var(--ms-fx-rim-w, 1.5px) + 1px), rgba(0, 0, 0, 0.1) 7px, rgba(0, 0, 0, 0) var(--ms-fx-rim-glow, 16px);
  z-index: 3;
  overflow: hidden;
  -webkit-mask:
    linear-gradient(180deg, var(--ms-fx-rim-edge)), linear-gradient(0deg, var(--ms-fx-rim-edge)),
    linear-gradient(90deg, var(--ms-fx-rim-edge)), linear-gradient(270deg, var(--ms-fx-rim-edge));
  mask:
    linear-gradient(180deg, var(--ms-fx-rim-edge)), linear-gradient(0deg, var(--ms-fx-rim-edge)),
    linear-gradient(90deg, var(--ms-fx-rim-edge)), linear-gradient(270deg, var(--ms-fx-rim-edge));
}
.ms-fx-ring__spin {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  width: var(--ms-fx-rim-r, 71%);
  height: var(--ms-fx-rim-r, 71%);
  transform-origin: 0 100%;
  transform: rotate(-38deg);
  background: conic-gradient(from 0deg at 0 100%,
    rgba(200, 18, 61, 0) 0deg,
    rgba(200, 18, 61, 0.22) 24deg,
    rgba(200, 18, 61, 0.6) 54deg,
    var(--ms-fx-neon) 76deg,
    #ffe9ee 87deg,
    rgba(255, 233, 238, 0) 90deg);
}
@media (max-width: 767px) { .ms-fx-layer.ms-fx-ring { --ms-fx-rim-glow: 12px; } }

/* ---------- 3. Sweep: a diagonal sheen, once on appear and again on hover ----------
   Two nested movers, so the "appear" and "hover" passes never restart each other. */
.ms-fx-layer.ms-fx-sheen { overflow: hidden; mix-blend-mode: screen; }
.ms-fx-sheen__a,
.ms-fx-sheen__b {
  position: absolute;
  inset: 0;
  display: block;
}
.ms-fx-sheen__a { transform: translateX(-110%); }
.ms-fx-sheen__beam {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 38%;
  display: block;
  width: 24%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 214, 224, 0.1) 30%,
    rgba(255, 246, 249, 0.42) 46%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 246, 249, 0.42) 54%,
    rgba(255, 214, 224, 0.1) 70%,
    rgba(255, 255, 255, 0));
}

/* ---------- 4. Glitch: RGB-split copies (aria-hidden), present only during a burst ---------- */
/* sideways only inside the title's box: a shifted copy must never widen the page on a phone */
.ms-fx-layer.ms-fx-ghosts { overflow: hidden; overflow-x: clip; overflow-y: visible; border-radius: 0; mix-blend-mode: screen; }
.ms-fx-layer > .ms-fx-ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  margin: 0 !important;   /* a copy of an h2: a theme's h2 margin must not push it off the title */
  opacity: 0;
  pointer-events: none;
}
.ms-fx-layer > .ms-fx-ghost,
.ms-fx-layer > .ms-fx-ghost * {
  color: var(--ms-fx-gc) !important;
  -webkit-text-fill-color: var(--ms-fx-gc) !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
  background: none !important;
  animation: none !important;
  transition: none !important;
}
.ms-fx-layer > .ms-fx-ghost--a { --ms-fx-gc: var(--ms-fx-neon); }
.ms-fx-layer > .ms-fx-ghost--b { --ms-fx-gc: var(--ms-fx-cyan); mix-blend-mode: screen; }

/* ---------- 5. Neon tube: dim outline until it powers on (the script flickers it on once) ---------- */
html.ms-fx-on .ms-fx-tube:not(.ms-fx-lit) .elementor-heading-title,
html.ms-fx-on .ms-fx-tube:not(.ms-fx-lit) .elementor-heading-title * {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: var(--ms-fx-tube-w, 1px) var(--ms-fx-tube-off, rgba(255, 107, 134, 0.42));
  text-shadow: 0 0 10px rgba(200, 18, 61, 0.18) !important;
}
/* the moment it catches: a short over-bright bloom that settles into the normal glow
   (both classes live for about a second, so the title's own transitions are untouched after) */
.ms-fx-tube.ms-fx-tube-warm .elementor-heading-title { filter: brightness(1.4) saturate(1.1); }
.ms-fx-tube.ms-fx-tube-cool .elementor-heading-title { transition: filter 0.9s ease-out; }

/* ---------- 6. Scanlines + vignette (static; a faint band rolls down while visible) ---------- */
.ms-fx-layer.ms-fx-scan {
  z-index: 1;
  overflow: hidden;
  background:
    radial-gradient(125% 92% at 50% 46%, rgba(5, 3, 4, 0) 58%, rgba(5, 3, 4, 0.45) 100%),
    repeating-linear-gradient(180deg,
      rgba(5, 3, 4, 0.17) 0, rgba(5, 3, 4, 0.17) 1px,
      rgba(5, 3, 4, 0) 1px, rgba(5, 3, 4, 0) 3px);
}
.ms-fx-layer.ms-fx-scan.ms-fx-layer--under { z-index: auto; }
.ms-fx-scan__roll {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  height: 24%;
  transform: translateY(-100%);
  background: linear-gradient(180deg, rgba(255, 107, 134, 0), rgba(255, 190, 204, 0.07) 55%, rgba(255, 107, 134, 0));
}

/* ---------- 7. Sparks around a button (mouse only, while hovered / keyboard-focused) ---------- */
.ms-fx-layer.ms-fx-zap { z-index: 3; overflow: visible; border-radius: 0; }
.ms-fx-zap__spark {
  position: absolute;
  left: var(--ms-fx-sx, 50%);
  top: var(--ms-fx-sy, 0%);
  display: block;
  width: 20px;
  height: 11px;
  margin-top: -5.5px;
  opacity: 0;
  transform-origin: 0 50%;
  transform: rotate(var(--ms-fx-sa, -90deg)) translateX(4px) scaleX(0.3);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M1 5.5 4.5 2 7 7.5 10.5 2.5 13 7 17 4' fill='none' stroke='%23ff2d55' stroke-opacity='.45' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M1 5.5 4.5 2 7 7.5 10.5 2.5 13 7 17 4' fill='none' stroke='%23fff3f6' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 0 50% / 100% 100%;
}

/* ---------- 8. Charge: a neon line that draws itself as you scroll, a spark at its tip ---------- */
/* the spark's run is clipped to the line's length (it starts outside it), never its height */
.ms-fx-layer.ms-fx-wire { z-index: 2; overflow: visible; overflow-x: clip; border-radius: 0; }
/* on a divider: exactly over the line (its top border) */
.ms-fx-layer.ms-fx-wire--line {
  inset: auto 0 auto 0;
  top: calc(var(--divider-border-width, 2px) * -1);
  height: var(--divider-border-width, 2px);
}
/* on a container: along its top edge */
.ms-fx-layer.ms-fx-wire--edge { inset: 0 0 auto 0; height: 2px; z-index: 3; }
.ms-fx-wire__fill {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ms-fx-wine), var(--ms-fx-neon) 55%, #ffd2dc);
  box-shadow: 0 0 10px color-mix(in srgb, var(--ms-fx-neon) 75%, transparent);
}
.ms-fx-wire--center .ms-fx-wire__fill {
  transform-origin: 50% 50%;
  background: linear-gradient(90deg, #ffd2dc, var(--ms-fx-neon) 20%, var(--ms-fx-wine) 50%, var(--ms-fx-neon) 80%, #ffd2dc);
}
.ms-fx-wire--end .ms-fx-wire__fill {
  transform-origin: 100% 50%;
  background: linear-gradient(270deg, var(--ms-fx-wine), var(--ms-fx-neon) 55%, #ffd2dc);
}
.ms-fx-wire__run {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.ms-fx-wire--center .ms-fx-wire__run { left: 50%; width: 50%; }
.ms-fx-wire--center .ms-fx-wire__run--back { left: 0; }
.ms-fx-wire__spark {
  position: absolute;
  top: 50%;
  right: -5px;
  display: block;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, #ffc2cf 38%, rgba(255, 45, 85, 0.75) 56%, rgba(255, 45, 85, 0) 72%);
  box-shadow: 0 0 12px 3px rgba(255, 45, 85, 0.55);
}
/* the tail behind the spark */
.ms-fx-wire__spark::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 50%;
  width: 46px;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, rgba(255, 210, 220, 0), rgba(255, 236, 241, 0.95));
}
.ms-fx-wire__run--back .ms-fx-wire__spark,
.ms-fx-wire--end .ms-fx-wire__spark { right: auto; left: -5px; }
.ms-fx-wire__run--back .ms-fx-wire__spark::after,
.ms-fx-wire--end .ms-fx-wire__spark::after {
  right: auto;
  left: 50%;
  background: linear-gradient(270deg, rgba(255, 210, 220, 0), rgba(255, 236, 241, 0.95));
}

/* =====================================================================
   Motion — only when the visitor allows it
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .ms-fx-ring__spin { animation: ms-fx-rim-spin var(--ms-fx-rim-dur, 6.5s) linear infinite paused; }
  .ms-fx-rim.ms-in-view .ms-fx-ring__spin { animation-play-state: running; }

  .ms-fx-sweep.ms-fx-shown .ms-fx-sheen__a {
    animation: ms-fx-sweep-a 1.3s cubic-bezier(0.45, 0.05, 0.25, 1) calc(0.35s + var(--ms-fx-i, 0) * 0.14s) 1 backwards;
  }

  .ms-fx-scanlines.ms-in-view .ms-fx-scan__roll { animation: ms-fx-roll 9s linear infinite; }

  /* charge: the line is dimmed until drawn — by the scroll where it can, else once, on arrival */
  html.ms-fx-on .ms-fx-charge.ms-fx-wired .elementor-divider-separator {
    border-top-color: color-mix(in srgb, var(--divider-color, #ff2d55) 16%, transparent);
    box-shadow: none;
  }
  html.ms-fx-on .ms-fx-wire__fill { transform: scaleX(0); }
  html.ms-fx-on .ms-fx-charged .ms-fx-wire__fill { animation: ms-fx-charge-fill 1.5s var(--ms-fx-ease) 0.15s both; }
  html.ms-fx-on .ms-fx-charged .ms-fx-wire__run { animation: ms-fx-charge-run 1.5s var(--ms-fx-ease) 0.15s both; }
  html.ms-fx-on .ms-fx-charged .ms-fx-wire__run--back,
  html.ms-fx-on .ms-fx-charged .ms-fx-wire--end .ms-fx-wire__run { animation-name: ms-fx-charge-back; }
  /* drawn by the scroll: starts when the line is 12% into the screen, done at 55% */
  @supports (animation-timeline: view()) {
    html.ms-fx-on .ms-fx-wire--scroll .ms-fx-wire__fill {
      animation: ms-fx-charge-fill linear both;
      animation-timeline: view();
      animation-range: cover 12% cover 55%;
    }
    html.ms-fx-on .ms-fx-wire--scroll .ms-fx-wire__run {
      animation: ms-fx-charge-run linear both;
      animation-timeline: view();
      animation-range: cover 12% cover 55%;
    }
    html.ms-fx-on .ms-fx-wire--scroll .ms-fx-wire__run--back,
    html.ms-fx-on .ms-fx-wire--scroll.ms-fx-wire--end .ms-fx-wire__run { animation-name: ms-fx-charge-back; }
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ms-fx-sheen-host:hover > .ms-fx-sheen .ms-fx-sheen__b,
  .ms-fx-sheen-host:focus-visible > .ms-fx-sheen .ms-fx-sheen__b,
  .ms-fx-sheen-host.ms-fx-hot > .ms-fx-sheen .ms-fx-sheen__b {
    animation: ms-fx-sweep-b 1s cubic-bezier(0.45, 0.05, 0.25, 1) 1;
  }
  .ms-fx-sparks.ms-fx-hot .ms-fx-zap__spark {
    animation: ms-fx-spark var(--ms-fx-st, 1.1s) linear var(--ms-fx-sd, 0s) infinite;
  }
}

@keyframes ms-fx-rim-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ms-fx-sweep-a { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes ms-fx-sweep-b { from { transform: translateX(0); } to { transform: translateX(220%); } }
@keyframes ms-fx-roll { from { transform: translateY(-100%); } to { transform: translateY(420%); } }
@keyframes ms-fx-spark {
  0% { opacity: 0; transform: rotate(var(--ms-fx-sa, -90deg)) translateX(2px) scaleX(0.25); }
  7% { opacity: 1; transform: rotate(var(--ms-fx-sa, -90deg)) translateX(4px) scaleX(1); }
  14% { opacity: 0.35; }
  21% { opacity: 1; transform: rotate(var(--ms-fx-sa, -90deg)) translateX(8px) scaleX(0.9); }
  36%, 100% { opacity: 0; transform: rotate(var(--ms-fx-sa, -90deg)) translateX(15px) scaleX(0.35); }
}
@keyframes ms-fx-charge-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ms-fx-charge-run {
  0% { opacity: 0; transform: translateX(-100%); }
  6% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateX(0); }
}
@keyframes ms-fx-charge-back {
  0% { opacity: 0; transform: translateX(100%); }
  6% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateX(0); }
}

/* Windows high contrast / forced colours: no decoration */
@media (forced-colors: active) {
  .ms-fx-layer { display: none !important; }
}
