/**
 * Agent View Extension — GSAP animation support styles
 * Only the structural bits GSAP cannot set itself.
 */

/* Mask wipes and scroll-linked presets move the image beyond its box,
   so the wrapper has to clip. */
.ave-gsap-clip .elementor-widget-container,
.ave-gsap-clip > .elementor-widget-container > a,
.ave-gsap-clip figure.wp-caption {
    overflow: hidden;
}

/* Parallax and Ken Burns need headroom to travel into, otherwise the drift
   exposes the background at one edge. */
.ave-gsap-scrub .elementor-widget-container img {
    will-change: transform;
}

/* Parallax and Ken Burns build their own headroom by scaling the image in JS,
   so no fixed container height is required here — the wrapper just has to clip. */

/* Avoid a flash of the un-animated image before GSAP takes over.
   Scoped to elements the runtime will actually touch, and released the moment
   it sets its from-state (ave-anim-ready) so nothing can be left invisible. */
[data-ave-anim]:not([data-ave-anim="none"]):not(.ave-anim-ready) img {
    visibility: hidden;
}

.ave-anim-ready img {
    visibility: visible;
}

/* Failsafe: if JS never runs, show everything after a beat rather than
   leaving the page with holes in it. */
@media (prefers-reduced-motion: reduce) {
    [data-ave-anim] img { visibility: visible !important; }
}

.ave-gsap-no-js [data-ave-anim] img { visibility: visible !important; }
