/* Animation Keyframes */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

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

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

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

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

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

/* Base Animation Classes */
.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-right {
  opacity: 0;
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-scale {
  opacity: 0;
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate {
  opacity: 0;
  animation: rotateIn 0.6s ease-out forwards;
}

/* Parallax Effects */
.parallax-element {
  transform: translateZ(0);
  will-change: transform;
}

/* Micro Animations and Hover Effects */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2);
}

.hover-glow {
  transition: all 0.3s ease;
  position: relative;
}

.hover-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hover-glow:hover::before {
  opacity: 1;
}

.hover-scale {
  transition: transform 0.3s ease;
}

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

.hover-brightness {
  transition: filter 0.3s ease;
}

.hover-brightness:hover {
  filter: brightness(1.1);
}

/* Text Animations */
.text-shimmer {
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-main) 50%, var(--color-accent) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-main) 0%, #f4c430 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Button Animations */
.btn-ripple {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::before {
  width: 300%;
  height: 300%;
}

.btn-slide {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

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

/* Card Animations */
.card-tilt {
  transition: all 0.3s ease;
  perspective: 1000px;
}

.card-tilt:hover {
  transform: rotateX(5deg) rotateY(5deg) translateY(-10px);
  box-shadow: 0 25px 50px rgba(212, 175, 55, 0.15);
}

.card-flip {
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

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

/* Loading Animations */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-main);
  animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loadingDots {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-left: 4px solid var(--color-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Intersection Observer Animation States */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

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

.animate-on-scroll.slide-left {
  transform: translateX(-40px);
}

.animate-on-scroll.slide-left.in-view {
  transform: translateX(0);
}

.animate-on-scroll.slide-right {
  transform: translateX(40px);
}

.animate-on-scroll.slide-right.in-view {
  transform: translateX(0);
}

.animate-on-scroll.scale-in {
  transform: scale(0.8);
}

.animate-on-scroll.scale-in.in-view {
  transform: scale(1);
}

.animate-on-scroll.rotate-in {
  transform: rotate(-10deg) scale(0.9);
}

.animate-on-scroll.rotate-in.in-view {
  transform: rotate(0) scale(1);
}

/* Stagger Animation Delays */
.animate-stagger-1 {
  animation-delay: 0.1s;
}

.animate-stagger-2 {
  animation-delay: 0.2s;
}

.animate-stagger-3 {
  animation-delay: 0.3s;
}

.animate-stagger-4 {
  animation-delay: 0.4s;
}

.animate-stagger-5 {
  animation-delay: 0.5s;
}

.animate-stagger-6 {
  animation-delay: 0.6s;
}

/* Special Effects */
.golden-glow {
  position: relative;
}

.golden-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--color-main), #f4c430, var(--color-main));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(10px);
}

.golden-glow:hover::before {
  opacity: 0.7;
}

.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-main);
  transition: left 0.8s ease;
}

.text-reveal.reveal::before {
  left: 100%;
}

/* Responsive Animation Controls */
@media (max-width: 767px) {
  .animate-fade-up,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale,
  .animate-rotate {
    animation-duration: 0.4s;
  }

  .card-tilt:hover {
    transform: translateY(-5px);
  }

  .hover-lift:hover {
    transform: translateY(-3px);
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-bounce,
  .animate-pulse,
  .animate-float,
  .text-shimmer {
    animation: none;
  }

  .parallax-element {
    transform: none !important;
  }
}

/* Performance Optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Advanced Hover Effects for Luxury Feel */
.luxury-hover {
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.luxury-hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(244, 196, 48, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  pointer-events: none;
}

.luxury-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(212, 175, 55, 0.2);
}

.luxury-hover:hover::after {
  opacity: 1;
}

/* Smooth Scroll Reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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