/**
 * Micro-interactions and Animations
 *
 * @package TerryArthur
 * @since 1.0.0
 */

/* Button hover effects with scale and shadow */
.wp-block-button__link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wp-block-button__link:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3) !important;
}

.wp-block-button__link:active {
  transform: translateY(0) scale(0.98) !important;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Card hover effects */
.wp-block-group.has-border-color {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-group.has-border-color:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(107, 114, 128, 0.4) !important;
  border-color: #6b7280 !important;
}

/* Clickable card links */
a.clickable-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.clickable-card-link:hover .wp-block-group.has-border-color {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(107, 114, 128, 0.4) !important;
  border-color: #6b7280 !important;
}

a.clickable-card-link:active .wp-block-group.has-border-color {
  transform: translateY(-4px);
}

/* Fade in from bottom animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade in to columns */
.wp-block-columns .wp-block-column {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.wp-block-columns .wp-block-column:nth-child(1) {
  animation-delay: 0.1s;
}

.wp-block-columns .wp-block-column:nth-child(2) {
  animation-delay: 0.2s;
}

.wp-block-columns .wp-block-column:nth-child(3) {
  animation-delay: 0.3s;
}

/* Heading animations */
.wp-block-heading {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Hero section animations */
.wp-block-cover .wp-block-heading {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.2s;
}

.wp-block-cover .wp-block-paragraph {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.4s;
}

.wp-block-cover .wp-block-buttons {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.6s;
}

/* Smooth transitions for links */
a {
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  transform: translateX(2px);
}

/* Input focus effects */
.form-control {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-control:focus {
  transform: scale(1.01) !important;
}

/* Separator line animation */
.wp-block-separator {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  animation-delay: 0.5s;
}

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

/* Pulse animation for CTAs */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  50% {
    box-shadow: 0 8px 16px -2px rgba(107, 114, 128, 0.4), 0 4px 8px -2px rgba(107, 114, 128, 0.2);
  }
}

.wp-block-button__link[href*="schedule"],
.wp-block-button__link[href*="strategy"] {
  animation: pulse 3s ease-in-out infinite;
}

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

/* Reduce motion for accessibility */
@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;
  }
}
