/* 
  FOUC Fix - Reveal Animated Elements

  This file's purpose is to reveal elements AFTER they have been animated by GSAP.
  The initial hiding of elements is handled by an INLINE style block in `functions.php`
  to ensure it runs before any other stylesheets.

  The `animateElement` utility in `animationUtils.js` adds the `.animated` class
  to an element once its animation is complete.
*/

/* Ukryj elementy animowane przed załadowaniem JS */
.animate-split-lines,
.animate-fade-in,
.animate-fade-in-move,
.animate-paragraph-block,
.animate-paragraph-mask,
.animate-label,
.animate-scale-in,
.animate-mask-reveal,
.label-animate,
.page-title-light,
.scroller,
.txt-block,
.txt-headline,
.txt-paragraph,
.img-block {
  opacity: 0;
  visibility: hidden;
}

/* Pokaż elementy po animacji */
body.animations-ready .animated,
.animated {
  opacity: 1;
  visibility: visible;
}

/* Make elements visible in Elementor editor */
body.elementor-editor-active [class*="animate-"],
body.elementor-editor-active .gsap-animated,
body.elementor-editor-active .txt-block,
body.elementor-editor-active .txt-headline,
body.elementor-editor-active .txt-paragraph {
  opacity: 1;
  visibility: visible;
}

/* Dodatkowe zabezpieczenie dla elementów z target="paragraph" */
[data-animation-target="paragraph"] {
  opacity: 0;
  visibility: hidden;
}

body.animations-ready [data-animation-target="paragraph"].animated,
[data-animation-target="paragraph"].animated {
  opacity: 1;
  visibility: visible;
}
