/* =============================================
   BOTÓN FLOTANTE DE WHATSAPP
   Agregar en el CSS global de cada página
   ============================================= */

.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.whatsapp-tooltip {
  background: #1A1A2E;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  position: relative;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: 14px;
  bottom: -6px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1A1A2E;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  position: relative;
  animation: waBounceIn 0.7s cubic-bezier(0.34,1.56,0.64,1) 1s both;
}

.whatsapp-btn:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.55), 0 4px 12px rgba(0,0,0,0.2);
}

.whatsapp-btn:active { transform: scale(0.96); }

.whatsapp-btn svg {
  width: 32px; height: 32px;
  fill: #ffffff;
  transition: transform 0.3s ease;
}

.whatsapp-btn:hover svg { transform: rotate(-8deg) scale(1.1); }

.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37,211,102,0.4);
  animation: waPulse 2.5s ease-out infinite;
}

.whatsapp-badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 16px; height: 16px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: waBadgePop 0.5s cubic-bezier(0.34,1.56,0.64,1) 1.5s both;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes waBounceIn {
  from { opacity: 0; transform: scale(0) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes waBadgePop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .whatsapp-float { bottom: 20px; right: 20px; }
  .whatsapp-btn   { width: 54px; height: 54px; }
  .whatsapp-btn svg { width: 28px; height: 28px; }
}