/* ==========================================================================
   AIDEM MOTION HEADING
   Dedicated widget stylesheet. Keep this scoped to .aidem-motion-heading-*.
   ========================================================================== */

.aidem-motion-heading-widget {
  display: block;
}

.aidem-motion-heading-stack,
.aidem-motion-heading-title {
  --aidem-line-gap: 10px;
}

.aidem-motion-heading-title {
  margin: 0;
  display: block;
  line-height: inherit;
  will-change: transform, opacity;
}

.aidem-motion-heading-stack {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-vertical {
  flex-direction: column;
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-vertical .aidem-motion-heading-title {
  width: 100%;
  margin-bottom: var(--aidem-line-gap);
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-vertical .aidem-motion-heading-title:last-child {
  margin-bottom: 0;
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-horizontal {
  flex-direction: row;
  align-items: baseline;
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-horizontal .aidem-motion-heading-title {
  flex: none;
  margin-right: var(--aidem-line-gap);
}

.aidem-motion-heading-stack.aidem-motion-heading-layout-horizontal .aidem-motion-heading-title:last-child {
  margin-right: 0;
}

/* Responsive override: when Elementor sets flex-direction per breakpoint. */
.aidem-motion-heading-stack[style*="flex-direction: column"] .aidem-motion-heading-title,
.aidem-motion-heading-stack[style*="flex-direction:column"] .aidem-motion-heading-title {
  width: 100%;
}

.aidem-motion-heading-title .aidem-glitch-word,
.aidem-motion-heading-title .glitch-word {
  display: inline-block;
}

.aidem-motion-heading-title-group {
  display: inline-grid;
}

.aidem-motion-heading-title-wrap--back,
.aidem-motion-heading-title-wrap--front {
  grid-area: 1 / 1;
}

.aidem-motion-heading-fill-layer {
  position: relative;
  z-index: 1;
}

.aidem-motion-heading-widget.aidem-motion-heading-has-stroke-title .aidem-motion-heading-title-wrap--front {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.aidem-motion-heading-widget.aidem-motion-heading-has-stroke-title .aidem-motion-heading-stroke-layer {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.aidem-motion-heading-widget.aidem-motion-heading-sandwich-parallax {
  position: relative;
  z-index: 41;
}
