/* Micro-interactions - Subtle UI Enhancements */

/* ============================================
   1. BUTTON MICRO-INTERACTIONS
   ============================================ */

/* Enhanced button ripple effect */
.btn {
  position: relative !important;
  overflow: hidden !important;
}

.btn::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.3) !important;
  transform: translate(-50%, -50%) !important;
  transition: width 0.4s ease, height 0.4s ease !important;
  z-index: 0 !important;
}

.btn:hover::before {
  width: 300px !important;
  height: 300px !important;
}

.btn > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Button shine effect */
.btn::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent) !important;
  transition: left 0.5s ease !important;
  z-index: 2 !important;
}

.btn:hover::after {
  left: 100% !important;
}

/* Button press feedback */
.btn:active {
  transform: translateY(1px) scale(0.98) !important;
  transition: transform 0.1s ease !important;
}

/* ============================================
   2. CARD MICRO-INTERACTIONS
   ============================================ */

/* Subtle card tilt effect */
.stat-card,
.service-card,
.team-member {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s ease !important;
}

.stat-card:hover {
  transform: translateY(-8px) rotateX(5deg) !important;
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15) !important;
}

.service-card:hover {
  transform: translateY(-6px) rotateY(2deg) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.team-member:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 0 12px 25px rgba(124, 58, 237, 0.12) !important;
}

/* Card edge glow effect */
.stat-card::before,
.service-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: inherit !important;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(124, 58, 237, 0.1) 50%, 
    transparent 70%) !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
  z-index: -1 !important;
}

.stat-card:hover::before,
.service-card:hover::before {
  opacity: 1 !important;
}

/* ============================================
   3. NAVIGATION MICRO-INTERACTIONS
   ============================================ */

/* Navigation link underline animation */
.nav__link {
  position: relative !important;
}

.nav__link::after {
  content: '' !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 50% !important;
  width: 0 !important;
  height: 2px !important;
  background: var(--primary-color, #7c3aed) !important;
  transform: translateX(-50%) !important;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  width: 100% !important;
}

/* Mobile toggle animation enhancement */
.nav__toggle-line {
  transform-origin: center !important;
}

.nav__toggle:hover .nav__toggle-line {
  background-color: var(--primary-color, #7c3aed) !important;
}

.nav__toggle.active .nav__toggle-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg) !important;
  background-color: var(--primary-color, #7c3aed) !important;
}

.nav__toggle.active .nav__toggle-line:nth-child(2) {
  opacity: 0 !important;
  transform: scale(0) !important;
}

.nav__toggle.active .nav__toggle-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg) !important;
  background-color: var(--primary-color, #7c3aed) !important;
}

/* ============================================
   4. FORM MICRO-INTERACTIONS
   ============================================ */

/* Input field focus effects */
.form-group {
  position: relative !important;
}

.form-group input,
.form-group textarea {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.form-group input:focus,
.form-group textarea:focus {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15),
              0 0 0 3px rgba(124, 58, 237, 0.1) !important;
}

/* Label animation */
.form-group label {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.form-group input:focus + label,
.form-group textarea:focus + label {
  color: var(--primary-color, #7c3aed) !important;
  transform: translateY(-2px) !important;
}

/* Input validation pulse */
.form-group.error input,
.form-group.error textarea {
  animation: validationPulse 0.5s ease-in-out !important;
}

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

/* Success checkmark animation */
.form-group.success::after {
  content: '✓' !important;
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) scale(0) !important;
  color: var(--success-color, #10b981) !important;
  font-weight: bold !important;
  animation: checkmarkAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards !important;
}

@keyframes checkmarkAppear {
  0% {
    transform: translateY(-50%) scale(0) rotate(180deg);
  }
  100% {
    transform: translateY(-50%) scale(1) rotate(0deg);
  }
}

/* ============================================
   5. LOADING STATE MICRO-INTERACTIONS
   ============================================ */

/* Button loading state */
.btn.loading {
  position: relative !important;
  color: transparent !important;
  pointer-events: none !important;
}

.btn.loading::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top: 2px solid white !important;
  border-radius: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: spin 1s linear infinite !important;
}

/* Content placeholder shimmer */
.placeholder {
  background: linear-gradient(90deg, 
    rgba(124, 58, 237, 0.1) 25%, 
    rgba(124, 58, 237, 0.2) 50%, 
    rgba(124, 58, 237, 0.1) 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s ease-in-out infinite !important;
}

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

/* ============================================
   6. SCROLL-TRIGGERED MICRO-INTERACTIONS
   ============================================ */

/* Parallax effect for background elements */
.hero::before,
.about::before {
  transform: translateZ(0) !important;
  will-change: transform !important;
}

/* Progress indicator for scroll */
.scroll-progress {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, 
    var(--primary-color, #7c3aed), 
    var(--secondary-color, #0891b2)) !important;
  z-index: 1001 !important;
  transition: width 0.1s ease !important;
}

/* ============================================
   7. CONTACT INFO MICRO-INTERACTIONS
   ============================================ */

/* Contact item hover effects */
.contact__info-item {
  position: relative !important;
  overflow: hidden !important;
}

.contact__info-item::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(124, 58, 237, 0.1), 
    transparent) !important;
  transition: left 0.5s ease !important;
}

.contact__info-item:hover::before {
  left: 100% !important;
}

.contact__info-item:hover {
  transform: translateX(8px) !important;
  border-left: 4px solid var(--primary-color, #7c3aed) !important;
}

/* Icon rotation on hover */
.contact__info-icon {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.contact__info-item:hover .contact__info-icon {
  transform: rotate(5deg) scale(1.1) !important;
}

/* ============================================
   8. STATISTICS ANIMATION ENHANCEMENTS
   ============================================ */

/* Number counting animation */
.stat-card__number {
  position: relative !important;
}

.stat-card__number.counting::after {
  content: '' !important;
  position: absolute !important;
  bottom: -4px !important;
  left: 0 !important;
  width: 100% !important;
  height: 2px !important;
  background: var(--primary-color, #7c3aed) !important;
  transform: scaleX(0) !important;
  animation: progressBar 2s ease-out forwards !important;
}

@keyframes progressBar {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

/* ============================================
   9. LANGUAGE SWITCHER MICRO-INTERACTIONS
   ============================================ */

/* Dropdown slide animation */
.language-dropdown {
  transform: translateY(-10px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.language-dropdown.show {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Language button hover effect */
.lang-btn {
  position: relative !important;
  overflow: hidden !important;
}

.lang-btn::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(124, 58, 237, 0.1) !important;
  transition: left 0.3s ease !important;
}

.lang-btn:hover::before {
  left: 0 !important;
}

/* ============================================
   10. ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus ring pulse animation */
*:focus-visible {
  animation: focusPulse 2s ease-in-out infinite !important;
}

@keyframes focusPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--white-color, #ffffff), 
                0 0 0 4px rgba(124, 58, 237, 0.2) !important;
  }
  50% {
    box-shadow: 0 0 0 1px var(--white-color, #ffffff), 
                0 0 0 6px rgba(124, 58, 237, 0.4) !important;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .btn:hover,
  .stat-card:hover,
  .service-card:hover {
    transform: none !important;
  }
  
  *:focus-visible {
    animation: none !important;
  }
}

/* ============================================
   11. TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

/* Enhanced touch feedback */
@media (hover: none) and (pointer: coarse) {
  .btn:active,
  .nav__link:active,
  .contact__info-item:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  .stat-card:hover,
  .service-card:hover,
  .team-member:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* Simplified touch interactions */
  .btn:hover::before,
  .btn:hover::after {
    display: none !important;
  }
}