/* ═════════════════════════════════════════════════════════════════════════════ */
/*                        ANIMATIONS LIBRARY — GLOBAL                           */
/*                      8+ efeitos prontos para usar                            */
/* ═════════════════════════════════════════════════════════════════════════════ */

/**
 * USO:
 * <div class="animate-fade-in">Conteúdo</div>
 * <div class="animate-slide-up">Conteúdo</div>
 * <div class="animate-bounce">Conteúdo</div>
 */

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          FADE ANIMATIONS                                    */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.animate-fade-out {
  animation: fadeOut 0.6s ease-in-out;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          SLIDE ANIMATIONS                                   */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-slide-down {
  animation: slideDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-slide-left {
  animation: slideLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-slide-right {
  animation: slideRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          BOUNCE ANIMATIONS                                  */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes bounceOut {
  0% {
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translateY(-20px);
  }
}

.animate-bounce {
  animation: bounce 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.animate-bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-bounce-out {
  animation: bounceOut 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          SCALE ANIMATIONS                                   */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleDown {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-scale-up {
  animation: scaleUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-scale-down {
  animation: scaleDown 0.6s ease-in-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ROTATE ANIMATIONS                                  */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: rotate(0deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-spin-reverse {
  animation: spinReverse 1s linear infinite;
}

.animate-rotate-in {
  animation: rotateIn 0.6s ease-in-out;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          SHAKE ANIMATIONS                                   */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes shakeVertical {
  0%, 100% {
    transform: translateY(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateY(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateY(5px);
  }
}

.animate-shake {
  animation: shake 0.6s ease-in-out;
}

.animate-shake-vertical {
  animation: shakeVertical 0.6s ease-in-out;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          FLIP ANIMATIONS                                    */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes flipX {
  from {
    opacity: 0;
    transform: rotateX(-90deg);
  }
  to {
    opacity: 1;
    transform: rotateX(0deg);
  }
}

@keyframes flipY {
  from {
    opacity: 0;
    transform: rotateY(-90deg);
  }
  to {
    opacity: 1;
    transform: rotateY(0deg);
  }
}

.animate-flip-x {
  animation: flipX 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  perspective: 1000px;
}

.animate-flip-y {
  animation: flipY 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  perspective: 1000px;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ATTENTION SEEKERS                                  */
/* ═════════════════════════════════════════════════════════════════════════════ */

@keyframes heartBeat {
  0%, 14%, 28%, 42%, 70%, 100% {
    transform: scale(1);
  }
  7%, 21%, 35%, 49% {
    transform: scale(1.1);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 1);
  }
}

@keyframes flashing {
  0%, 49%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.animate-heart-beat {
  animation: heartBeat 1.3s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-flashing {
  animation: flashing 0.8s ease-in-out infinite;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          DELAY MODIFIERS                                    */
/* ═════════════════════════════════════════════════════════════════════════════ */

.animate-delay-100 {
  animation-delay: 0.1s;
}

.animate-delay-200 {
  animation-delay: 0.2s;
}

.animate-delay-300 {
  animation-delay: 0.3s;
}

.animate-delay-400 {
  animation-delay: 0.4s;
}

.animate-delay-500 {
  animation-delay: 0.5s;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          DURATION MODIFIERS                                 */
/* ═════════════════════════════════════════════════════════════════════════════ */

.animate-fast {
  animation-duration: 0.3s !important;
}

.animate-normal {
  animation-duration: 0.6s !important;
}

.animate-slow {
  animation-duration: 1s !important;
}

.animate-slower {
  animation-duration: 1.5s !important;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          INFINITE MODIFIERS                                 */
/* ═════════════════════════════════════════════════════════════════════════════ */

.animate-infinite {
  animation-iteration-count: infinite;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ACCESSIBILITY                                      */
/* ═════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-fade-out,
  .animate-fade-in-scale,
  .animate-slide-up,
  .animate-slide-down,
  .animate-slide-left,
  .animate-slide-right,
  .animate-bounce,
  .animate-bounce-in,
  .animate-bounce-out,
  .animate-scale-up,
  .animate-scale-down,
  .animate-pulse,
  .animate-spin,
  .animate-spin-reverse,
  .animate-rotate-in,
  .animate-shake,
  .animate-shake-vertical,
  .animate-flip-x,
  .animate-flip-y,
  .animate-heart-beat,
  .animate-glow,
  .animate-flashing {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          STAGGER EFFECT (Multi-element)                      */
/* ═════════════════════════════════════════════════════════════════════════════ */

.animate-stagger > * {
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-stagger > *:nth-child(1) { animation-delay: 0s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(n+6) { animation-delay: 0.5s; }
