/* Penguin PHC - Animations & Effects */

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Fade Animations */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out;
}

/* Slide Animations */
.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* Bounce Effects */
.bounce {
  animation: bounce 2s infinite;
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

/* Hover Effects */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.hover-grow {
  transition: transform var(--transition-base);
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-shrink {
  transition: transform var(--transition-base);
}

.hover-shrink:hover {
  transform: scale(0.95);
}

/* Button Hover Effects */
.btn-hover-sweep {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover-sweep::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--forest-green);
  transition: left var(--transition-base);
  z-index: -1;
}

.btn-hover-sweep:hover::before {
  left: 0;
}

/* Loading Animations */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--mustard-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

/* Pulse Effect */
.pulse {
  animation: pulse 2s infinite;
}

.pulse-hover:hover {
  animation: pulse 1s infinite;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--light-gray) 25%,
    var(--medium-gray) 50%,
    var(--light-gray) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.skeleton-text {
  height: 12px;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.skeleton-title {
  height: 24px;
  width: 50%;
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-sm);
}

/* Parallax Effect */
.parallax {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Text Effects */
.text-gradient {
  background: linear-gradient(135deg, var(--mustard-gold), var(--forest-green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.text-glow {
  text-shadow: 0 0 10px var(--mustard-gold);
}

/* Image Effects */
.img-zoom {
  overflow: hidden;
  position: relative;
}

.img-zoom img {
  transition: transform var(--transition-slow);
}

.img-zoom:hover img {
  transform: scale(1.1);
}

/* Card Flip */
.flip-card {
  perspective: 1000px;
  position: relative;
  transform-style: preserve-3d;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Keyframe Definitions */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

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

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

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

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

@keyframes loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Smooth Scroll for Sections */
html {
  scroll-behavior: smooth;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}