/* Footer Wave Animation */
@keyframes waveScale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Icon Beat Animation */
@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.panel-footer .footer-letter {
  display: inline-block; /* Needed for transform */
  /* Explicitly reset animation properties when not active */
  animation-name: none;
  animation-delay: 0s;
  animation-duration: 0s;
  animation-iteration-count: 1;
}

.panel-footer .icon {
  display: inline-block; /* Needed for transform/animation */
  vertical-align: middle; /* Align icon better with text */
  width: 1.2em; /* Ensure base width is set */
  height: 1.2em; /* Ensure base height is set */
  /* Explicitly reset animation properties when not active */
  animation-name: none;
  animation-delay: 0s;
  animation-duration: 0s;
  animation-iteration-count: 1;
}

/* Trigger wave animation via .animate-wave class */
.panel-footer.animate-wave .footer-letter {
  /* Re-apply animation properties */
  animation-name: waveScale;
  animation-duration: 0.6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 1; /* Ensure it runs once */
  /* animation-delay is set via nth-child below */
}

/* Trigger icon beat on hover */
.panel-footer:hover .icon {
  animation: heartBeat 0.8s ease-in-out infinite;
}

/* Apply staggered delay to each letter when .animate-wave is active */
.panel-footer.animate-wave .footer-letter:nth-child(1) { animation-delay: 0.00s; }
.panel-footer.animate-wave .footer-letter:nth-child(2) { animation-delay: 0.05s; }
.panel-footer.animate-wave .footer-letter:nth-child(3) { animation-delay: 0.10s; }
.panel-footer.animate-wave .footer-letter:nth-child(4) { animation-delay: 0.15s; }
.panel-footer.animate-wave .footer-letter:nth-child(5) { animation-delay: 0.20s; } /* space */
.panel-footer.animate-wave .footer-letter:nth-child(6) { animation-delay: 0.25s; }
.panel-footer.animate-wave .footer-letter:nth-child(7) { animation-delay: 0.30s; }
.panel-footer.animate-wave .footer-letter:nth-child(8) { animation-delay: 0.35s; }
.panel-footer.animate-wave .footer-letter:nth-child(9) { animation-delay: 0.40s; }
/* Icon is 10th child */
.panel-footer.animate-wave .footer-letter:nth-child(11) { animation-delay: 0.50s; } /* b */
.panel-footer.animate-wave .footer-letter:nth-child(12) { animation-delay: 0.55s; } /* y */
.panel-footer.animate-wave .footer-letter:nth-child(13) { animation-delay: 0.60s; } /* space */
.panel-footer.animate-wave .footer-letter:nth-child(14) { animation-delay: 0.65s; } /* S */
.panel-footer.animate-wave .footer-letter:nth-child(15) { animation-delay: 0.70s; } /* k */
.panel-footer.animate-wave .footer-letter:nth-child(16) { animation-delay: 0.75s; } /* y */
.panel-footer.animate-wave .footer-letter:nth-child(17) { animation-delay: 0.80s; } /* P */
.panel-footer.animate-wave .footer-letter:nth-child(18) { animation-delay: 0.85s; } /* h */
.panel-footer.animate-wave .footer-letter:nth-child(19) { animation-delay: 0.90s; } /* y */
