/* =============================================
   TIVRONEX — Animations (tv-animations.css)
   ============================================= */

/* ---- Keyframes ---- */
@keyframes tv-fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

@keyframes tv-ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

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

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

@keyframes tv-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes tv-bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
  75% { transform: translateY(3px); }
}

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

/* ---- Hero Animations ---- */
.tv-hero-content > * {
  animation: tv-fadeSlideUp 0.7s ease both;
}

.tv-hero-eyebrow { animation-delay: 0.1s; }
.tv-hero-heading { animation-delay: 0.25s; }
.tv-hero-sub { animation-delay: 0.4s; }
.tv-hero-actions { animation-delay: 0.55s; }
.tv-hero-stats { animation-delay: 0.7s; }

.tv-hero-img-frame {
  animation: tv-fadeSlideUp 0.8s 0.3s ease both;
}

.tv-hero-img-badge {
  animation: tv-slideLeft 0.6s 0.9s ease both;
}

.tv-hero-shape-1 {
  animation: tv-float 8s ease-in-out infinite;
}

.tv-hero-shape-2 {
  animation: tv-float 10s 2s ease-in-out infinite;
}

.tv-hero-shape-3 {
  animation: tv-float 12s 4s ease-in-out infinite;
}

/* ---- Nav Brand Icon Animation ---- */
.tv-nav-brand-icon {
  transition: transform 0.3s ease;
}
.tv-nav-brand:hover .tv-nav-brand-icon {
  transform: rotate(-5deg) scale(1.1);
}

/* ---- Card Stagger ---- */
.tv-stagger > * {
  opacity: 0;
  transform: translateY(20px);
}

.tv-stagger.tv-in-view > *:nth-child(1) { animation: tv-fadeSlideUp 0.5s 0.05s ease forwards; }
.tv-stagger.tv-in-view > *:nth-child(2) { animation: tv-fadeSlideUp 0.5s 0.15s ease forwards; }
.tv-stagger.tv-in-view > *:nth-child(3) { animation: tv-fadeSlideUp 0.5s 0.25s ease forwards; }
.tv-stagger.tv-in-view > *:nth-child(4) { animation: tv-fadeSlideUp 0.5s 0.35s ease forwards; }
.tv-stagger.tv-in-view > *:nth-child(5) { animation: tv-fadeSlideUp 0.5s 0.45s ease forwards; }

/* ---- Pulse Badge ---- */
.tv-pulse-badge {
  animation: tv-pulse 2.5s ease-in-out infinite;
}

/* ---- Ripple Effect ---- */
.tv-ripple-container {
  position: relative;
}

.tv-ripple-ring {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  border: 2px solid var(--tv-sage);
  opacity: 0;
  animation: tv-ripple 3s ease-out infinite;
}

.tv-ripple-ring:nth-child(2) { animation-delay: 1s; }
.tv-ripple-ring:nth-child(3) { animation-delay: 2s; }

/* ---- Progress Bar Shimmer ---- */
.tv-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.3) 50%,
    transparent 100%);
  background-size: 200% auto;
  animation: tv-shimmer 2s linear infinite;
}

.tv-progress-fill { position: relative; }

/* ---- Button Ripple ---- */
.tv-btn {
  position: relative;
  overflow: hidden;
}

.tv-btn::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.tv-btn:active::after {
  transform: scale(3);
  opacity: 1;
  transition: 0s;
}

/* ---- Timeline Animations ---- */
.tv-timeline-step {
  transition-delay: 0s;
}

.tv-timeline-step:nth-child(1) { transition-delay: 0s; }
.tv-timeline-step:nth-child(2) { transition-delay: 0.15s; }
.tv-timeline-step:nth-child(3) { transition-delay: 0.3s; }
.tv-timeline-step:nth-child(4) { transition-delay: 0.45s; }
.tv-timeline-step:nth-child(5) { transition-delay: 0.6s; }

.tv-timeline-dot {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tv-timeline-step:hover .tv-timeline-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 10px rgba(46,109,164,0.2);
}

/* ---- Testimonial Entrance ---- */
.tv-testimonial-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.tv-testimonial-card.tv-in-view {
  opacity: 1;
  transform: translateY(0);
}

.tv-testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.tv-testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.tv-testimonial-card:nth-child(3) { transition-delay: 0.25s; }
.tv-testimonial-card:nth-child(4) { transition-delay: 0.35s; }
.tv-testimonial-card:nth-child(5) { transition-delay: 0.45s; }

/* ---- Service Card Hover ---- */
.tv-service-icon-wrap {
  transition: transform 0.3s ease;
}
.tv-service-card:hover .tv-service-icon-wrap {
  transform: translateY(-4px) scale(1.08);
}

/* ---- Team Image Zoom ---- */
.tv-team-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Article Card ---- */
.tv-article-img img {
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Number Counter ---- */
.tv-counter {
  animation: tv-countUp 0.6s ease;
}

/* ---- Result Card ---- */
.tv-result-icon {
  display: inline-block;
  animation: tv-bounce 1s ease 0.3s;
}

/* ---- Page load ---- */
.tv-page-enter {
  animation: tv-fadeIn 0.4s ease both;
}

/* ---- Floating Elements ---- */
.tv-float-slow { animation: tv-float 7s ease-in-out infinite; }
.tv-float-medium { animation: tv-float 5s ease-in-out infinite; }
.tv-float-fast { animation: tv-float 3.5s ease-in-out infinite; }

/* ---- Motion Reduce Override ---- */
body.tv-reduce-motion *,
body.tv-reduce-motion *::before,
body.tv-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ---- Loading Spinner ---- */
.tv-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--tv-border);
  border-top-color: var(--tv-blue-mid);
  border-radius: 50%;
  animation: tv-spin 0.8s linear infinite;
  display: inline-block;
}
