/* ============================================================
   SCROLL-TRIGGERED ANIMATION CLASSES FOR WORDPRESS BLOCKS
   Usage: Add class to block (e.g. .animate-fade-in) in block editor,
   animation triggers when .is-visible is added by JS on scroll.
   ============================================================ */

/* === FADE IN === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in {
  opacity: 0;
}
.animate-fade-in.is-visible {
  animation: fadeIn 1s ease-in-out both;
  opacity: 1;
}

/* === SLIDE UP === */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.animate-slide-up {
  opacity: 0;
  transform: translateY(20px);
}
.animate-slide-up.is-visible {
  animation: slideUp 0.8s ease-out both;
  opacity: 1;
  transform: translateY(0);
}

/* === BOUNCE IN === */
@keyframes bounceIn {
  0%   { transform: scale(0.9); opacity: 0; }
  50%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
.animate-bounce-in {
  opacity: 0;
  transform: scale(0.9);
}
.animate-bounce-in.is-visible {
  animation: bounceIn 0.6s ease-in-out both;
  opacity: 1;
  transform: scale(1);
}

/* === ZOOM IN === */
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.animate-zoom-in {
  opacity: 0;
  transform: scale(0.8);
}
.animate-zoom-in.is-visible {
  animation: zoomIn 0.7s ease-in-out both;
  opacity: 1;
  transform: scale(1);
}

/* === ROTATE IN === */
@keyframes rotateIn {
  from { transform: rotate(-10deg); opacity: 0; }
  to   { transform: rotate(0); opacity: 1; }
}
.animate-rotate-in {
  opacity: 0;
  transform: rotate(-10deg);
}
.animate-rotate-in.is-visible {
  animation: rotateIn 0.5s ease-out both;
  opacity: 1;
  transform: rotate(0);
}

/* === SLIDE LEFT === */
@keyframes slideLeft {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.animate-slide-left {
  opacity: 0;
  transform: translateX(30px);
}
.animate-slide-left.is-visible {
  animation: slideLeft 0.7s ease-out both;
  opacity: 1;
  transform: translateX(0);
}

/* === SLIDE RIGHT === */
@keyframes slideRight {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.animate-slide-right {
  opacity: 0;
  transform: translateX(-30px);
}
.animate-slide-right.is-visible {
  animation: slideRight 0.7s ease-out both;
  opacity: 1;
  transform: translateX(0);
}

/* === FLIP IN === */
@keyframes flipIn {
  0%   { transform: rotateY(90deg); opacity: 0; }
  100% { transform: rotateY(0deg); opacity: 1; }
}
.animate-flip-in {
  opacity: 0;
  transform: rotateY(90deg);
  transform-style: preserve-3d;
}
.animate-flip-in.is-visible {
  animation: flipIn 0.8s ease-in-out both;
  opacity: 1;
  transform: rotateY(0deg);
}

/* === SCALE UP === */
@keyframes scaleUp {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-scale-up {
  opacity: 0;
  transform: scale(0.5);
}
.animate-scale-up.is-visible {
  animation: scaleUp 0.6s ease-in both;
  opacity: 1;
  transform: scale(1);
}


/* Prevent hiding content inside Site Editor / Admin */
.block-editor-page .animate-slide-up,
.wp-admin .animate-slide-up {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}