/* Animations CSS File */

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Slide-in Animations */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.active,
.slide-in-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Scale Animation */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Animation for Multiple Elements */
.stagger-fade-in > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-fade-in.active > *:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.stagger-fade-in.active > *:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.stagger-fade-in.active > *:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.stagger-fade-in.active > *:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.stagger-fade-in.active > *:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}

/* Button Animation */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

/* Pulse Animation for CTA Buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 125, 50, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
  }
}

.btn-primary {
  animation: pulse 2s infinite;
}

/* Floating Animation for Cards */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

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

/* Stat Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-value.animate,
.stat-title.animate {
  animation: countUp 1s forwards;
}

/* Background Gradient Animation */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-bg {
  background: linear-gradient(
    -45deg,
    var(--primary-color),
    var(--primary-light),
    var(--accent-color),
    var(--primary-dark)
  );
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

/* Form Input Animation */
.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
  font-size: 0.75rem;
  transform: translateY(-1.5rem);
  color: var(--primary-color);
}

/* Shake Animation - for error states */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Loading Spinner Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Typing Cursor Animation */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: currentColor;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Mobile Menu Animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Image Hover Zoom Effect */
.zoom-effect {
  overflow: hidden;
}

.zoom-effect img {
  transition: transform 0.5s ease;
}

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

/* Video Pause Button Animation */
.pause-btn .fa-play {
  display: none;
}

.pause-btn.paused .fa-pause {
  display: none;
}

.pause-btn.paused .fa-play {
  display: block;
}

/* Enhanced Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

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

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

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  70% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.fade-in-down {
  animation: fadeInDown 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

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

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

.slide-in {
  animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.rotate-in {
  animation: rotateIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.shimmer {
  background: linear-gradient(
    to right,
    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 linear;
}

/* Animation Delays */
.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

.delay-500 {
  animation-delay: 500ms;
}

/* Animation Durations */
.duration-fast {
  animation-duration: 0.3s;
}

.duration-normal {
  animation-duration: 0.5s;
}

.duration-slow {
  animation-duration: 0.8s;
}

/* Animation Fill Modes */
.fill-forwards {
  animation-fill-mode: forwards;
}

.fill-backwards {
  animation-fill-mode: backwards;
}

.fill-both {
  animation-fill-mode: both;
}

/* Animation Timing Functions */
.ease-bounce {
  animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ease-smooth {
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-spring {
  animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation States */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Hover Animations */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.hover-float {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.hover-rotate {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Loading Animations */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Progress Bar Animation */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-color);
  animation: progress 2s ease-out forwards;
}

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