/* Modern UI Enhancements for Process King USA */

/* ============================================
   Floating Action Button (FAB)
   ============================================ */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 24px;
  position: relative;
  overflow: hidden;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.fab:active {
  transform: scale(0.95);
}

.fab-phone {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.fab-phone:hover {
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.fab-label {
  position: absolute;
  right: 70px;
  background: #1e293b;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fab-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #1e293b;
}

.fab:hover .fab-label {
  opacity: 1;
}

/* Mobile FAB adjustments */
@media (max-width: 768px) {
  .fab-container {
    bottom: 20px;
    right: 16px;
    gap: 10px;
  }
  
  .fab {
    width: 56px;
    height: 56px;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
  }
  
  .fab-label {
    display: none; /* Hide labels on mobile */
  }
}

@media (max-width: 480px) {
  .fab-container {
    bottom: 16px;
    right: 12px;
  }
  
  .fab {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  background: rgba(30, 41, 59, 1);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 88px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 80px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   Scroll Animations
   ============================================ */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.scroll-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.scroll-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger animations for child elements */
.scroll-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.scroll-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.scroll-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.scroll-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.scroll-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }

.scroll-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-fade-in,
  .scroll-slide-left,
  .scroll-slide-right,
  .scroll-scale,
  .scroll-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Enhanced Card Designs
   ============================================ */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #28a745);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Glassmorphism effect for value section */
.value-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Social Proof Widget
   ============================================ */
.social-proof {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  padding: 32px 24px;
  margin: 60px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 1000px;
  border: 1px solid rgba(203, 213, 225, 0.5);
}

.social-proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.social-proof-number {
  font-size: 2rem;
  font-weight: 700;
  color: #007bff;
  line-height: 1;
}

.social-proof-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.social-proof-divider {
  width: 1px;
  height: 40px;
  background: #cbd5e1;
}

@media (max-width: 768px) {
  .social-proof {
    padding: 20px 16px;
    gap: 20px;
    margin: 40px auto;
    border-radius: 12px;
  }
  
  .social-proof-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
  }
  
  .social-proof-number {
    font-size: 1.75rem;
  }
  
  .social-proof-label {
    font-size: 0.8125rem;
  }
  
  .social-proof-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .social-proof {
    padding: 16px 12px;
    gap: 16px;
    margin: 32px auto;
  }
  
  .social-proof-item {
    flex: 1 1 100%;
    min-width: auto;
  }
  
  .social-proof-number {
    font-size: 1.5rem;
  }
  
  .social-proof-label {
    font-size: 0.75rem;
  }
}

/* ============================================
   Enhanced Micro-interactions
   ============================================ */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after,
.btn-secondary:active::after {
  width: 300px;
  height: 300px;
}

/* Pulse animation for CTAs */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(0, 123, 255, 0.4);
  }
}

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

/* ============================================
   Modern Gradient Backgrounds
   ============================================ */
.modern-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-gradient-alt {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.modern-gradient-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

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

/* ============================================
   Smooth Transitions
   ============================================ */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states */
*:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 3px;
  border-radius: 4px;
}

