/* =========================================== */
/* BUTTON STANDOUT ENHANCEMENTS 2026 */
/* Top 5 techniques to make buttons stand out */
/* Award-winning visual prominence */
/* =========================================== */

:root {
  --button-glow-color: rgba(138, 43, 226, 0.6);
  --button-glow-intense: rgba(138, 43, 226, 0.9);
  --button-gradient-start: #8A2BE2;
  --button-gradient-mid: #6A5ACD;
  --button-gradient-end: #8A2BE2;
  --button-dark-fade-color: rgba(0, 0, 0, 0.4);
  --button-dark-fade-intense: rgba(0, 0, 0, 0.6);
}

/* =========================================== */
/* 1. ANIMATED GRADIENT FLOW */
/* Flowing gradient animation */
/* =========================================== */

.btn-animated-gradient {
  background: linear-gradient(90deg, 
    var(--button-gradient-start) 0%, 
    var(--button-gradient-mid) 50%, 
    var(--button-gradient-end) 100%) !important;
  background-size: 200% 100% !important;
  animation: gradient-flow 3s ease infinite;
  position: relative;
  overflow: hidden;
}

.btn-animated-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  animation: shimmer-sweep 2s ease-in-out infinite;
  z-index: 1;
}

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

@keyframes shimmer-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* =========================================== */
/* 2. PULSING GLOW SHADOW */
/* Breathing glow effect */
/* =========================================== */

.btn-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 20px var(--button-glow-color),
              0 0 40px rgba(138, 43, 226, 0.3) !important;
}

.btn-pulse-glow:hover {
  animation-duration: 1s;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--button-glow-color),
                0 0 40px rgba(138, 43, 226, 0.3),
                0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }
  50% {
    box-shadow: 0 0 30px var(--button-glow-intense),
                0 0 60px rgba(138, 43, 226, 0.5),
                0 0 80px rgba(138, 43, 226, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.2) !important;
  }
}

/* Enhanced pulse glow for primary buttons */
.btn-primary.btn-pulse-glow {
  --button-glow-color: rgba(99, 102, 241, 0.6);
  --button-glow-intense: rgba(99, 102, 241, 0.9);
}

/* =========================================== */
/* 3. BADGE COUNT ANIMATION */
/* Animated badge pulse */
/* =========================================== */

.btn .badge.badge-animated,
.btn .badge.badge-premium {
  animation: badge-pulse 2s ease-in-out infinite;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.btn:hover .badge.badge-animated,
.btn:hover .badge.badge-premium {
  animation: badge-bounce 0.6s ease;
}

@keyframes badge-bounce {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.2) rotate(-5deg);
  }
  50% {
    transform: scale(1.15) rotate(0deg);
  }
  75% {
    transform: scale(1.2) rotate(5deg);
  }
}

/* Badge glow effect */
.btn:hover .badge.badge-animated,
.btn:hover .badge.badge-premium {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5),
              0 0 30px rgba(138, 43, 226, 0.4);
}

/* =========================================== */
/* 4. ICON ANIMATION ON HOVER */
/* Playful icon interactions */
/* =========================================== */

.btn .bx-palette,
.btn .bx-briefcase,
.btn .bx-user,
.btn .bx-envelope,
.btn .bx-home,
.btn .bx-code-alt,
.btn .bx-rocket,
.btn .bx-book {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: inline-block;
}

.btn:hover .bx-palette {
  animation: paint-splatter 0.8s ease;
}

.btn:hover .bx-briefcase {
  animation: briefcase-bounce 0.6s ease;
}

.btn:hover .bx-user {
  animation: user-spin 0.6s ease;
}

.btn:hover .bx-envelope {
  animation: envelope-flip 0.6s ease;
}

.btn:hover .bx-rocket {
  animation: rocket-launch 0.8s ease;
}

@keyframes paint-splatter {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.3) rotate(-15deg);
  }
  50% {
    transform: scale(1.1) rotate(15deg);
  }
  75% {
    transform: scale(1.2) rotate(-10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes briefcase-bounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

@keyframes user-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes envelope-flip {
  0%, 100% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
}

@keyframes rocket-launch {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(-15deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* =========================================== */
/* 5. MAGNETIC PULL + SCALE TRANSFORM */
/* Enhanced magnetic effect */
/* =========================================== */

.btn-magnetic-enhanced {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
  position: relative;
}

.btn-magnetic-enhanced:hover {
  transform: scale(1.1) translateY(-4px) !important;
  box-shadow: 0 12px 40px rgba(138, 43, 226, 0.4),
              0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.btn-magnetic-enhanced:active {
  transform: scale(1.05) translateY(-2px) !important;
  transition: transform 0.1s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* Compatibility with existing magnetic classes */
.btn-magnetic-premium.btn-magnetic-enhanced,
.btn-magnetic.btn-magnetic-enhanced {
  /* Both classes work together */
}

/* =========================================== */
/* 6. DARK CIRCULAR FADE BEHIND BUTTON */
/* Creates depth and contrast */
/* =========================================== */

.btn-dark-fade {
  position: relative;
  z-index: 1;
  overflow: visible !important; /* Override any overflow: hidden */
}

/* Ensure wrapper also allows overflow */
.hero-cta-button-wrapper.btn-dark-fade {
  overflow: visible !important;
  position: relative;
}

/* Dark fade on wrapper or button itself */
.btn-dark-fade::after,
.hero-cta-button-wrapper.btn-dark-fade::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.45) 20%,
    rgba(0, 0, 0, 0.3) 35%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 65%,
    transparent 80%
  );
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-dark-fade:hover::after,
.hero-cta-button-wrapper.btn-dark-fade:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.55) 20%,
    rgba(0, 0, 0, 0.4) 35%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.1) 65%,
    transparent 80%
  );
}

/* Animated dark fade */
.btn-dark-fade-animated::after,
.hero-cta-button-wrapper.btn-dark-fade-animated::after {
  animation: dark-fade-pulse 3s ease-in-out infinite;
}

@keyframes dark-fade-pulse {
  0%, 100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Enhanced dark fade for ultimate button and wrapper */
.hero-cta-button-wrapper.btn-dark-fade::after {
  width: 250%;
  height: 250%;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.55) 15%,
    rgba(0, 0, 0, 0.4) 30%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05) 75%,
    transparent 90%
  );
  opacity: 1;
}

.hero-cta-button-wrapper.btn-dark-fade:hover::after {
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.65) 15%,
    rgba(0, 0, 0, 0.5) 30%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.2) 60%,
    rgba(0, 0, 0, 0.1) 75%,
    transparent 90%
  );
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.25);
}

/* =========================================== */
/* COMBINED ULTIMATE BUTTON */
/* All effects combined */
/* =========================================== */

.btn-standout-ultimate {
  /* Animated gradient */
  background: linear-gradient(90deg, 
    var(--button-gradient-start) 0%, 
    var(--button-gradient-mid) 50%, 
    var(--button-gradient-end) 100%) !important;
  background-size: 200% 100% !important;
  animation: gradient-flow 3s ease infinite,
             pulse-glow 2s ease-in-out infinite;
  
  /* Pulsing glow */
  box-shadow: 0 0 20px var(--button-glow-color),
              0 0 40px rgba(138, 43, 226, 0.3) !important;
  
  /* Shimmer effect */
  position: relative;
  overflow: visible; /* Changed to visible to allow dark fade to show */
  z-index: 1; /* Ensure button is above dark fade */
}

.btn-standout-ultimate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  animation: shimmer-sweep 2s ease-in-out infinite;
  z-index: 1;
}

.btn-standout-ultimate:hover {
  transform: scale(1.1) translateY(-4px) !important;
  animation-duration: 1s, 0.8s;
  box-shadow: 0 0 30px var(--button-glow-intense),
              0 0 60px rgba(138, 43, 226, 0.5),
              0 0 80px rgba(138, 43, 226, 0.3),
              0 12px 40px rgba(138, 43, 226, 0.4) !important;
}

/* =========================================== */
/* RESPONSIVE ADJUSTMENTS */
/* =========================================== */

@media (max-width: 768px) {
  .btn-pulse-glow {
    animation-duration: 3s;
  }
  
  .btn-animated-gradient {
    animation-duration: 4s;
  }
  
  .btn-standout-ultimate {
    animation-duration: 4s, 3s;
  }
  
  .btn-magnetic-enhanced:hover {
    transform: scale(1.05) translateY(-2px) !important;
  }
}

/* =========================================== */
/* ACCESSIBILITY */
/* =========================================== */

@media (prefers-reduced-motion: reduce) {
  .btn-animated-gradient,
  .btn-pulse-glow,
  .btn .badge.badge-animated,
  .btn .badge.badge-premium,
  .btn .bx-palette,
  .btn .bx-briefcase,
  .btn .bx-user,
  .btn .bx-envelope,
  .btn .bx-rocket,
  .btn-standout-ultimate,
  .btn-dark-fade-animated {
    animation: none !important;
  }
  
  .btn-magnetic-enhanced:hover {
    transform: scale(1.05) !important;
  }
  
  .btn-dark-fade-animated::after,
  .hero-cta-button-wrapper.btn-dark-fade-animated::after {
    animation: none !important;
  }
}

/* =========================================== */
/* PERFORMANCE OPTIMIZATIONS */
/* =========================================== */

.btn-animated-gradient,
.btn-pulse-glow,
.btn-magnetic-enhanced,
.btn-standout-ultimate {
  will-change: transform, box-shadow, background-position;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.btn-dark-fade::after,
.hero-cta-button-wrapper.btn-dark-fade::after {
  will-change: opacity, transform;
  backface-visibility: hidden;
  transform: translateZ(0) translate(-50%, -50%);
}
