/* ===========================
   BOTÓN FLOTANTE WHATSAPP
   =========================== */

.whatsapp-float-container {
  position: fixed;
  left: 20px;
  bottom: 100px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.whatsapp-float-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-100px);
  animation: fadeInSlideLeft 1s ease 2s forwards, pulseGlow 3s ease-in-out infinite 3s;
}

.whatsapp-float-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-toggle i {
  font-size: 28px;
  color: white;
  transition: transform 0.3s ease;
}

.whatsapp-float-toggle:hover i {
  transform: scale(1.1);
}

/* Efecto de pulsación */
.whatsapp-float-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease;
}

.whatsapp-float-toggle:active::before {
  transform: translate(-50%, -50%) scale(1.2);
}

/* Menú desplegable */
.whatsapp-float-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.whatsapp-float-menu.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.whatsapp-float-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

.whatsapp-float-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
  color: white;
  text-decoration: none;
}

.whatsapp-float-item i {
  font-size: 18px;
  flex-shrink: 0;
}

.whatsapp-float-item span {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
}

/* Efecto de brillo en hover */
.whatsapp-float-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.whatsapp-float-item:hover::before {
  left: 100%;
}

/* Animación de entrada */
@keyframes fadeInSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    transform: scale(1.05);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.whatsapp-float-item {
  animation: slideInLeft 0.3s ease forwards;
}

.whatsapp-float-item:nth-child(2) {
  animation-delay: 0.1s;
}

/* Responsive */
@media (max-width: 768px) {
  .whatsapp-float-container {
    left: 15px;
    bottom: 80px;
  }
  
  .whatsapp-float-toggle {
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-float-toggle i {
    font-size: 24px;
  }
  
  .whatsapp-float-item {
    font-size: 13px;
    padding: 10px 14px;
    min-width: 160px;
  }
  
  .whatsapp-float-item i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float-container {
    left: 10px;
    bottom: 70px;
  }
  
  .whatsapp-float-toggle {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float-toggle i {
    font-size: 22px;
  }
  
  .whatsapp-float-item {
    font-size: 12px;
    padding: 8px 12px;
    min-width: 140px;
  }
}

/* Mejoras para los botones de WhatsApp en la sección de contacto */
.contacto-whatsapp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.whatsapp-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 400px;
}

.contacto-grid .btn-whatsapp {
  width: 100%;
  padding: 15px 25px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.contacto-grid .btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

@media (min-width: 768px) {
  .whatsapp-buttons {
    flex-direction: row;
    gap: 20px;
  }
  
  .contacto-grid .btn-whatsapp {
    flex: 1;
  }
}
