/* ============================================
   NORD ELECTRIC - ANIMATIONS
   Keyframe Animations & Effects Library
   ============================================ */

/* ============================================
   SLIDE ANIMATIONS
   ============================================ */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FADE ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   SCALE ANIMATIONS
   ============================================ */

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ============================================
   BOUNCE & MOTION ANIMATIONS
   ============================================ */

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  75% {
    transform: rotate(2deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ============================================
   SHIMMER ANIMATION
   ============================================ */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */

@keyframes rippleAnimation {
  0% {
    width: 0;
    height: 0;
    opacity: 0.6;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}

/* ============================================
   STAGGER ANIMATIONS FOR GRIDS
   ============================================ */

.about-badges .badge:nth-child(1) {
  animation-delay: 0.1s;
}

.about-badges .badge:nth-child(2) {
  animation-delay: 0.2s;
}

.about-badges .badge:nth-child(3) {
  animation-delay: 0.3s;
}

.about-badges .badge:nth-child(4) {
  animation-delay: 0.4s;
}

.about-badges .badge:nth-child(5) {
  animation-delay: 0.5s;
}

.about-badges .badge:nth-child(6) {
  animation-delay: 0.6s;
}

.news-grid .news-card:nth-child(1) {
  animation-delay: 0.1s;
}

.news-grid .news-card:nth-child(2) {
  animation-delay: 0.2s;
}

.news-grid .news-card:nth-child(3) {
  animation-delay: 0.3s;
}

.news-grid .news-card:nth-child(4) {
  animation-delay: 0.4s;
}

.clients-logos .client-logo:nth-child(1) {
  animation-delay: 0.1s;
}

.clients-logos .client-logo:nth-child(2) {
  animation-delay: 0.2s;
}

.clients-logos .client-logo:nth-child(3) {
  animation-delay: 0.3s;
}

.clients-logos .client-logo:nth-child(4) {
  animation-delay: 0.4s;
}

.clients-logos .client-logo:nth-child(5) {
  animation-delay: 0.5s;
}

.clients-logos .client-logo:nth-child(6) {
  animation-delay: 0.6s;
}

.works-grid .work-card:nth-child(1) {
  animation-delay: 0.1s;
}

.works-grid .work-card:nth-child(2) {
  animation-delay: 0.2s;
}

.works-grid .work-card:nth-child(3) {
  animation-delay: 0.3s;
}

.works-grid .work-card:nth-child(4) {
  animation-delay: 0.4s;
}

.footer-column:nth-child(1) h4 {
  animation-delay: 0.1s;
}

.footer-column:nth-child(2) h4 {
  animation-delay: 0.2s;
}

.footer-column:nth-child(3) h4 {
  animation-delay: 0.3s;
}

.footer-column:nth-child(4) h4 {
  animation-delay: 0.4s;
}

.footer-column ul li:nth-child(1) {
  animation-delay: 0.15s;
}

.footer-column ul li:nth-child(2) {
  animation-delay: 0.25s;
}

.footer-column ul li:nth-child(3) {
  animation-delay: 0.35s;
}

.footer-column ul li:nth-child(4) {
  animation-delay: 0.45s;
}

.footer-column p:nth-of-type(1) {
  animation-delay: 0.1s;
}

.footer-column p:nth-of-type(2) {
  animation-delay: 0.2s;
}

.social-links a:nth-child(1) {
  animation-delay: 0.1s;
}

.social-links a:nth-child(2) {
  animation-delay: 0.2s;
}

.social-links a:nth-child(3) {
  animation-delay: 0.3s;
}

.social-links a:nth-child(4) {
  animation-delay: 0.4s;
}

/* ============================================
   BUTTON ANIMATIONS ON SCROLL
   ============================================ */

.btn {
  animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================
   LOGO TYPOGRAPHY ANIMATIONS
   ============================================ */

.logo {
  animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================
   SECTION HEADERS ANIMATION
   ============================================ */

section h2 {
  animation: slideInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   LOADING ANIMATION (Optional)
   ============================================ */

@keyframes loading {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.loading {
  animation: loading 1.5s ease-in-out infinite;
}

/* ============================================
   FOCUS ANIMATIONS FOR ACCESSIBILITY
   ============================================ */

button:focus,
a:focus,
input:focus {
  animation: pulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 49% {
    border-color: transparent;
  }
  50%, 100% {
    border-color: #333;
  }
}

/* ============================================
   ENTRANCE ANIMATIONS ON INTERSECTION
   ============================================ */

.visible {
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 1;
}

/* ============================================
   RESPONSIVE ANIMATIONS (Mobile Optimized)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  @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 float {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-10px);
    }
  }

  .hero-content h1 {
    animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .hero-image {
    animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
}
