/* ============================================
   Custom Animations - luckylifegear
   ============================================ */

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
  position: relative;
  z-index: 10;
}

.whatsapp-pulse {
  z-index: 0;
  animation: whatsapp-pulse-anim 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes whatsapp-pulse-anim {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 0; transform: scale(1.5); }
}

/* --- WhatsApp QR Modal --- */
.whatsapp-modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.whatsapp-modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.whatsapp-modal-box {
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.whatsapp-modal-overlay.active .whatsapp-modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Worker Photo Gallery --- */

.worker-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.worker-photo-wrap {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 123, 0, 0.15);
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.worker-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: brightness(1.02) contrast(1.06) saturate(1.05);
}

.worker-card:hover .worker-photo-wrap {
  transform: translateY(-6px);
  border-color: rgba(255, 155, 48, 0.4);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6),
              0 0 24px rgba(255, 123, 0, 0.2);
}

.worker-card:hover .worker-photo {
  transform: scale(1.08);
  filter: brightness(1.08) contrast(1.1) saturate(1.15);
}

/* Gradient overlay at bottom of photo */
.worker-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: linear-gradient(to top,
    rgba(10, 10, 18, 0.95) 0%,
    rgba(10, 10, 18, 0.6) 50%,
    transparent 100%);
  transition: opacity 0.3s ease;
}

.worker-station-num {
  font-size: 11px;
  font-weight: 800;
  color: #ff9b30;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.worker-station-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Warm glow on hover */
.worker-glow {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(ellipse at center 70%,
    rgba(255, 155, 48, 0.15) 0%,
    transparent 70%);
}

.worker-card:hover .worker-glow {
  opacity: 1;
  animation: worker-glow-pulse 2s ease-in-out infinite;
}

@keyframes worker-glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Worker info text below photo */
.worker-info {
  padding: 12px 4px 0;
}

/* Mobile: auto-highlight cycle */
.worker-card.mobile-dimmed {
  opacity: 0.4;
  transition: opacity 0.4s;
}

.worker-card.mobile-active .worker-photo-wrap {
  transform: translateY(-4px);
  border-color: rgba(255, 155, 48, 0.5);
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(255, 123, 0, 0.3);
}

.worker-card.mobile-active .worker-glow {
  opacity: 1;
}

.worker-card.mobile-active .worker-photo {
  filter: brightness(1.1) contrast(1.12) saturate(1.2);
}

/* === Metal Brushed Progress Bar === */
.factory-progress-metal {
  max-width: 900px;
  margin: 0 auto;
}

.progress-track {
  position: relative;
  height: 6px;
  background: linear-gradient(180deg, #4a4a52 0%, #6a6a72 30%, #8a8a92 50%, #6a6a72 70%, #3a3a42 100%);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(255, 255, 255, 0.05);
  overflow: visible;
}

/* Brushed metal texture overlay */
.progress-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0, transparent 1px,
    rgba(255, 255, 255, 0.03) 1px, rgba(255, 255, 255, 0.03) 2px);
  border-radius: 3px;
}

/* Flowing particle band */
.progress-particle-flow {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-particle-flow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 123, 0, 0.6) 20%,
    rgba(255, 155, 48, 0.9) 30%,
    rgba(255, 200, 100, 1) 35%,
    rgba(255, 155, 48, 0.9) 40%,
    rgba(255, 123, 0, 0.6) 50%,
    transparent 70%);
  animation: particle-flow 3s linear infinite;
  filter: blur(1px);
}

@keyframes particle-flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Progress stops */
.progress-stops {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -1px;
  position: relative;
  z-index: 1;
}

.progress-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.stop-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a4a52, #2a2a32);
  border: 2px solid #5a5a62;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.4s;
}

.progress-stop.active .stop-dot {
  background: radial-gradient(circle, #ffcc66 0%, #ff9b30 60%, #ff7b00 100%);
  border-color: #ffaa44;
  box-shadow: 0 0 12px rgba(255, 155, 48, 0.8), 0 0 24px rgba(255, 123, 0, 0.4);
  animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 155, 48, 0.8), 0 0 24px rgba(255, 123, 0, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 155, 48, 1), 0 0 36px rgba(255, 123, 0, 0.6); }
}

.stop-label {
  font-size: 10px;
  font-weight: 600;
  color: #6a6a72;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: color 0.4s;
}

.progress-stop.active .stop-label {
  color: #ff9b30;
  text-shadow: 0 0 8px rgba(255, 155, 48, 0.3);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #3a3a42, #4a4a52);
  margin: 0 -2px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* === Station Detail Cards === */
.station-card {
  background: rgba(30, 30, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.3s;
  cursor: default;
}

.station-card:hover,
.station-card.highlight {
  background: rgba(40, 40, 55, 0.8);
  border-color: rgba(255, 155, 48, 0.3);
  transform: translateY(-2px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .worker-photo, .worker-photo-wrap, .worker-glow,
  .progress-particle-flow::before {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Social Media Icons --- */
.social-icon svg {
  transition: transform 0.3s ease;
}

.social-icon:hover svg {
  transform: scale(1.15);
}

/* --- GEO Dashboard Styles --- */
.geo-stat-card {
  transition: all 0.3s ease;
}

.geo-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.geo-traffic-bar {
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visitor-badge-human {
  background: #dbeafe;
  color: #1e40af;
}

.visitor-badge-ai {
  background: #fef3c7;
  color: #92400e;
}

.visitor-badge-bot {
  background: #d1fae5;
  color: #065f46;
}
