/* ========================================
   Grow Capital Mongolia - Animation Styles
   Smooth TDBM-style Motion Effects
   ======================================== */

/* ========================================
   Fade In Animations
   ======================================== */

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ========================================
   Scale Animations
   ======================================== */

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

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* ========================================
   Slide Animations
   ======================================== */

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

/* ========================================
   Gradient Animation
   ======================================== */

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========================================
   Pulse Animation
   ======================================== */

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

/* ========================================
   Float Animation
   ======================================== */

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

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

/* ========================================
   Rotate Animation
   ======================================== */

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

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

/* ========================================
   Shimmer Animation
   ======================================== */

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

/* ========================================
   Wave Animation
   ======================================== */

@keyframes wave {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* ========================================
   Animation Classes
   ======================================== */

/* Fade Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Scale Classes */
.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Slide Classes */
.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out forwards;
}

.animate-slide-in-down {
  animation: slideInDown 0.6s ease-out forwards;
}

/* Continuous Animations */
.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

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

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

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

.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-rotate {
  animation: rotate 20s linear infinite;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

.animate-wave {
  animation: wave 4s ease-in-out infinite;
}

/* ========================================
   Intersection Observer Animation States
   ======================================== */

/* Initial hidden state for scroll animations */
.scroll-animate {
  opacity: 0;
  transition: all 0.6s ease-out;
}

.scroll-animate.fade-up {
  transform: translateY(30px);
}

.scroll-animate.fade-down {
  transform: translateY(-30px);
}

.scroll-animate.fade-left {
  transform: translateX(-30px);
}

.scroll-animate.fade-right {
  transform: translateX(30px);
}

.scroll-animate.scale {
  transform: scale(0.9);
}

/* Visible state when in viewport */
.scroll-animate.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ========================================
   Staggered Animation Delays
   ======================================== */

.stagger-1 {
  animation-delay: 0.1s;
}

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

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

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

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

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

/* ========================================
   Hover Animations
   ======================================== */

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

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

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(25, 124, 102, 0.4);
}

.hover-gradient {
  position: relative;
  overflow: hidden;
}

.hover-gradient::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 ease;
}

.hover-gradient:hover::before {
  left: 100%;
}

/* ========================================
   Page Transition Animation
   ======================================== */

.page-transition {
  animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   Loading Animation
   ======================================== */

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

.loading-spinner {
  border: 3px solid rgba(25, 124, 102, 0.1);
  border-top-color: #197c66;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

/* ========================================
   Parallax Effect Base
   ======================================== */

.parallax {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   Smooth Reveal on Scroll
   ======================================== */

.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Button Click Animation
   ======================================== */

@keyframes buttonPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.btn-press:active {
  animation: buttonPress 0.2s ease;
}

/* ========================================
   Card Flip Animation
   ======================================== */

.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

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

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* ========================================
   Text Typing Animation
   ======================================== */

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-text {
  overflow: hidden;
  border-right: 2px solid;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ========================================
   Gradient Border Animation
   ======================================== */

@keyframes borderGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-border {
  position: relative;
  background: linear-gradient(90deg, #197c66, #33a090, #1f835e, #37a976);
  background-size: 300% 300%;
  animation: borderGradient 4s ease infinite;
  padding: 2px;
  border-radius: inherit;
}

.gradient-border-inner {
  background: white;
  border-radius: inherit;
}

/* ========================================
   Number Count Animation
   ======================================== */

.count-up {
  transition: all 0.5s ease;
}

/* ========================================
   Slide Show Animation
   ======================================== */

@keyframes slideShow {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  10% {
    opacity: 1;
    transform: translateX(0);
  }
  90% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.slideshow-item {
  animation: slideShow 10s ease-in-out infinite;
}

/* ========================================
   Accordion Animation
   ======================================== */

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.accordion-content.active {
  max-height: 1000px;
  transition: max-height 0.6s ease-in;
}

/* ========================================
   Modal Animation
   ======================================== */

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* ========================================
   Progress Bar Animation
   ======================================== */

@keyframes progressBar {
  from {
    width: 0%;
  }
}

.progress-bar-fill {
  animation: progressBar 1.5s ease-out forwards;
}
