/* Additional animations for Zeryalothnivo.com */

/* CSS-only counter animation */
.counter-value {
  display: inline-block;
  position: relative;
}

/* Pure CSS loader animation */
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 107, 74, 0.3);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Custom CSS-only icon animations */
.icon-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.icon-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-7px);
  }
}

/* CSS-only background effect */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.animated-bg:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(66, 226, 184, 0.1) 0%, rgba(28, 31, 42, 0) 60%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Element reveal animations - Added auto-reveal for no-JS environment */
.reveal-left, .reveal-right, .reveal-up, .reveal-down {
  opacity: 1 !important;
  transform: translate(0) !important;
  animation: fadeIn 0.8s ease-in forwards;
}

/* Original reveal classes - now used only for sequential animation via delay */
.reveal-left-orig {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease;
}

.reveal-right-orig {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease;
}

.reveal-up-orig {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal-down-orig {
  opacity: 0;
  transform: translateY(-30px);
  transition: all 0.8s ease;
}

.revealed {
  opacity: 1;
  transform: translate(0);
}

/* CSS hover animations */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 15px rgba(255, 107, 74, 0.5);
}

/* CSS-only mobile menu animation */
.menu-toggle.open span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Pure CSS underline animation */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.underline-animation:hover:after {
  width: 100%;
}

/* CSS-only card flip effect */
.card-flip {
  perspective: 1000px;
  height: 300px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.card-flip-front {
  background-color: rgba(255, 255, 255, 0.05);
}

.card-flip-back {
  background-color: rgba(255, 107, 74, 0.1);
  transform: rotateY(180deg);
}

/* Button hover effect */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
}

.btn-hover-effect: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: all 0.5s;
}

.btn-hover-effect:hover:before {
  left: 100%;
}