
/* ========== TYWD Animations ========== */

/* Scroll animation base classes */
.tywd-animate {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.tywd-animate.tywd-visible {
  opacity: 1;
  transform: none !important;
}

/* Fade up */
.tywd-fade-up {
  transform: translateY(40px);
}

/* Fade in from left */
.tywd-fade-left {
  transform: translateX(-40px);
}

/* Fade in from right */  
.tywd-fade-right {
  transform: translateX(40px);
}

/* Scale in */
.tywd-scale-in {
  transform: scale(0.9);
}

/* Staggered children */
.tywd-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tywd-stagger.tywd-visible > *:nth-child(1) { transition-delay: 0s; }
.tywd-stagger.tywd-visible > *:nth-child(2) { transition-delay: 0.15s; }
.tywd-stagger.tywd-visible > *:nth-child(3) { transition-delay: 0.3s; }
.tywd-stagger.tywd-visible > *:nth-child(4) { transition-delay: 0.45s; }
.tywd-stagger.tywd-visible > * {
  opacity: 1;
  transform: none;
}

/* Floating animation */
@keyframes tywd-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.tywd-float {
  animation: tywd-float 3s ease-in-out infinite;
}

/* Pulse glow on buttons */
@keyframes tywd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(44, 85, 132, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(44, 85, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(44, 85, 132, 0); }
}
.wp-block-button__link:hover {
  animation: tywd-pulse 1.5s ease-in-out;
}

/* Image zoom on hover */
.tywd-img-zoom {
  overflow: hidden;
  border-radius: 16px;
}
.tywd-img-zoom img {
  transition: transform 0.5s ease;
}
.tywd-img-zoom:hover img {
  transform: scale(1.08);
}

/* Parallax background */
.tywd-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Counter animation */
.tywd-counter {
  font-variant-numeric: tabular-nums;
}

/* Gradient text */
.tywd-gradient-text {
  background: linear-gradient(135deg, #2c5584, #3498db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Typing cursor effect */
@keyframes tywd-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.tywd-typing::after {
  content: "|";
  animation: tywd-blink 0.8s infinite;
  margin-left: 2px;
}

/* Ribbon / badge */
.tywd-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Timeline dot */
.wp-block-group[style*="border-left"] .wp-block-group[style*="padding-left"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  background: #2c5584;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2c5584;
}
.wp-block-group[style*="border-left"] .wp-block-group[style*="padding-left"] {
  position: relative;
}

/* Image overlay gradient */
.tywd-overlay {
  position: relative;
}
.tywd-overlay::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}
