/* ===============================================
   GCLA - Green Commerce Liquidation & Assets
   Animations & Micro-interactions - B2B Optimized
   =============================================== */

/* Corporate Keyframes for B2B Experience */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes professionalPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
  }
}

@keyframes sustainabilityGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.6);
  }
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rotateInCorporate {
  from {
    transform: rotate(-10deg) scale(0.9);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

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

@keyframes auctionCountdownPulse {
  0%, 100% {
    background-color: var(--auction-active);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  50% {
    background-color: #ff1744;
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
  }
}

@keyframes roiCountUp {
  from {
    transform: scale(0.8);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes manifestoUnfold {
  from {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    max-height: 200px;
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes certificationBadgeFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes lotCardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes sustainabilityCounter {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* B2B Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left {
  animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right {
  animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-scale {
  animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-top {
  animation: slideInFromTop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-bottom {
  animation: slideInFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rotate-in-corporate {
  animation: rotateInCorporate 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.lot-card-reveal {
  animation: lotCardReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Professional Delays for Staggered B2B Effects */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* B2B Hover Animations */
.hover-lift-professional {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift-professional:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(27, 54, 93, 0.15);
}

.hover-scale-professional {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-scale-professional:hover {
  transform: scale(1.02);
}

.hover-glow-sustainability:hover {
  animation: sustainabilityGlow 1.5s ease-in-out infinite;
}

.hover-pulse-professional:hover {
  animation: professionalPulse 1.2s ease-in-out infinite;
}

/* Enhanced Button Animations for B2B */
.btn-corporate {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: perspective(1px) translateZ(0);
}

.btn-corporate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-corporate:hover::before {
  left: 100%;
}

.btn-corporate:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(27, 54, 93, 0.2);
}

.btn-corporate:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

/* B2B Specific Loading Animations */
.loading-spinner-b2b {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

.loading-manifest {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: dataLoadShimmer 1.5s infinite;
  border-radius: var(--radius-md);
  height: 20px;
  margin-bottom: var(--spacing-sm);
}

.loading-roi-calculator::after {
  content: 'Calculando ROI';
  animation: loadingDots 2s infinite;
}

@keyframes loadingDots {
  0%, 20% { content: 'Calculando ROI.'; }
  40% { content: 'Calculando ROI..'; }
  60%, 100% { content: 'Calculando ROI...'; }
}

/* Enhanced Card Animations for Lots */
.lot-card {
  perspective: 1000px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lot-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 25px 50px rgba(27, 54, 93, 0.15);
}

.lot-card:hover .lot-image img {
  transform: scale(1.05);
}

.lot-image {
  overflow: hidden;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.lot-image img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Certification Card Special Effects */
.cert-card {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cert-card:hover::before {
  opacity: 1;
}

.cert-card:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-coral);
}

.cert-icon {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-card:hover .cert-icon {
  animation: certificationBadgeFloat 2s ease-in-out infinite;
}

/* Auction Timer Animations */
.auction-timer {
  transition: all 0.3s ease;
}

.auction-timer.urgent {
  animation: auctionCountdownPulse 1s infinite;
  font-weight: var(--font-weight-black);
}

.auction-timer.final-minutes {
  animation: auctionCountdownPulse 0.5s infinite;
  background: linear-gradient(45deg, var(--auction-active), #ff1744);
}

/* ROI Badge Animations */
.roi-badge {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.roi-badge.highlight {
  animation: roiCountUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(45deg, var(--eco-green), #20a040);
}

.roi-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Manifesto Unfold Animation */
.manifesto-card {
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.manifesto-card.expanded {
  animation: manifestoUnfold 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.manifesto-card:hover {
  border-color: var(--primary-yellow);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.15);
}

/* Sustainability Metrics Animations */
.sustainability-stat {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sustainability-stat:hover {
  transform: translateY(-5px);
}

.sustainability-stat h3 {
  transition: all 0.3s ease;
}

.sustainability-stat.animated h3 {
  animation: sustainabilityCounter 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.sustainability-stat:hover h3 {
  color: var(--primary-coral);
  text-shadow: 0 0 10px rgba(52, 71, 170, 0.2);
}

/* Step Card Progressive Animation */
.step-card {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.step-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-yellow), var(--primary-dark));
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: var(--border-radius-xl);
  z-index: -1;
}

.step-card:hover::after {
  opacity: 0.06;
}

.step-card:hover {
  transform: translateY(-6px) rotateY(1deg);
  border-color: var(--primary-coral);
  color: var(--primary-blue);
}

.step-number {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card:hover .step-number {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Enhanced Carousel Animations */
.carousel-slide-enter {
  opacity: 0;
  transform: translateX(100%) rotateY(45deg);
}

.carousel-slide-enter-active {
  opacity: 1;
  transform: translateX(0) rotateY(0deg);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide-exit {
  opacity: 1;
  transform: translateX(0) rotateY(0deg);
}

.carousel-slide-exit-active {
  opacity: 0;
  transform: translateX(-100%) rotateY(-45deg);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Professional Form Animations */
.form-group-b2b {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.form-control-b2b {
  padding: var(--spacing-md) var(--spacing-lg);
  border: 2px solid var(--accent-blue);
  border-radius: var(--border-radius-lg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--white);
}

.form-control-b2b:focus {
  outline: none;
  border-color: var(--primary-yellow);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.form-control-b2b:focus + .form-label-b2b,
.form-control-b2b:not(:placeholder-shown) + .form-label-b2b {
  transform: translateY(-2.5rem) scale(0.85);
  color: var(--primary-yellow);
  background: var(--white);
  padding: 0 var(--spacing-sm);
}

.form-label-b2b {
  position: absolute;
  top: 50%;
  left: var(--spacing-lg);
  transform: translateY(-50%);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  color: var(--secondary-blue);
  font-weight: var(--font-weight-medium);
}

/* Success/Error B2B Animations */
.success-animation-b2b {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--eco-green);
  stroke-miterlimit: 10;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 0 0 var(--eco-green);
  animation: successFill 0.6s ease-in-out 0.4s forwards, successScale 0.4s ease-in-out 1.2s both;
}

@keyframes successFill {
  100% { 
    box-shadow: 0 0 0 30px rgba(40, 167, 69, 0.1); 
  }
}

@keyframes successScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.error-animation-b2b {
  animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Notification Animations for B2B */
.notification-b2b {
  transform: translateX(400px) rotateY(90deg);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  border-left: 4px solid;
}

.notification-b2b.show {
  transform: translateX(0) rotateY(0deg);
}

.notification-b2b.hide {
  transform: translateX(400px) rotateY(90deg);
}

.notification-b2b.success {
  border-left-color: var(--eco-green);
}

.notification-b2b.error {
  border-left-color: var(--auction-active);
}

.notification-b2b.auction {
  border-left-color: var(--primary-yellow);
  animation: professionalPulse 2s ease-in-out 3;
}

/* Progress Bar for B2B Processes */
.progress-bar-b2b {
  position: relative;
  overflow: hidden;
  background: var(--gray-light);
  border-radius: var(--border-radius-lg);
}

.progress-fill-b2b {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-yellow), var(--eco-green));
  border-radius: var(--border-radius-lg);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-fill-b2b::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.3) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.3) 75%,
    transparent 75%
  );
  background-size: 1rem 1rem;
  animation: progressStripes 1.5s linear infinite;
}

@keyframes progressStripes {
  0% { background-position: 0 0; }
  100% { background-position: 1rem 0; }
}

/* Enhanced Scroll Reveal for B2B */
.scroll-reveal-b2b {
  opacity: 0;
  transform: translateY(60px) rotateX(10deg);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-b2b.revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* Professional stagger animations */
.scroll-reveal-b2b.stagger-1 { transition-delay: 0.1s; }
.scroll-reveal-b2b.stagger-2 { transition-delay: 0.2s; }
.scroll-reveal-b2b.stagger-3 { transition-delay: 0.3s; }
.scroll-reveal-b2b.stagger-4 { transition-delay: 0.4s; }
.scroll-reveal-b2b.stagger-5 { transition-delay: 0.5s; }
.scroll-reveal-b2b.stagger-6 { transition-delay: 0.6s; }

/* Hero Entrance for GCLA */
.hero-entrance-gcla {
  opacity: 0;
  animation: heroEntranceGCLA 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes heroEntranceGCLA {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.9) rotateX(10deg);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.01) rotateX(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

/* Wishlist Heart Animation */
.wishlist-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wishlist-btn:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 1);
}

.wishlist-btn.wishlisted {
  animation: heartBeat 1s ease-in-out;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.25); }
}

/* Performance Optimizations */
.will-animate-b2b {
  will-change: transform, opacity, box-shadow;
}

/* Reduced motion fallbacks for accessibility */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .fade-in-left,
  .fade-in-right,
  .fade-in-scale,
  .slide-in-top,
  .slide-in-bottom,
  .rotate-in-corporate,
  .lot-card-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .hover-lift-professional:hover,
  .hover-scale-professional:hover,
  .lot-card:hover,
  .cert-card:hover,
  .step-card:hover {
    transform: none;
  }
  
  .btn-corporate:hover {
    transform: none;
  }
  
  .scroll-reveal-b2b {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .hero-entrance-gcla {
    opacity: 1;
    animation: none;
  }
  
  .auction-timer.urgent,
  .auction-timer.final-minutes {
    animation: none;
  }
  
  .sustainability-stat.animated h3,
  .roi-badge.highlight,
  .wishlist-btn.wishlisted {
    animation: none;
  }
}

/* NO DARK MODE - Ensure all animations are light */