/* ===== BOTÓN FLOTANTE DE CONTACTO ===== */

.contact-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  animation: fadeInFloat 0.7s cubic-bezier(.33,1,.68,1) 0.2s backwards;
}

@keyframes fadeInFloat {
  from { 
    opacity: 0; 
    transform: translateY(50px) scale(.8);
  }
  to { 
    opacity: 1; 
    transform: none;
  }
}

/* Botón principal */
.contact-float-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-primary, #02a99d);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(2,169,157,0.12), 0 1.5px 4px rgba(11,50,60,0.10);
  transition: box-shadow 0.27s cubic-bezier(.33,1,.68,1), transform 0.17s cubic-bezier(.33,1,.68,1);
  will-change: transform, box-shadow;
}

.contact-float-btn:hover,
.contact-float-btn:focus {
  transform: scale(1.09) translateY(-2px);
}

.icon-user {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  transition: transform 0.19s cubic-bezier(.33,1,.68,1);
}

/* Menú desplegable */
.contact-float-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) translateX(-9px) scale(.96);
  transition: opacity 0.32s cubic-bezier(.33,1,.68,1), transform 0.22s cubic-bezier(.33,1,.68,1);
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 16px rgba(11,50,60,0.10));
}

.contact-float-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) translateX(-9px);
}

/* Enlaces de contacto */
.contact-float-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(2,169,157,0.09);
  border: none;
  background: #fff;
  transition: background 0.15s cubic-bezier(.33,1,.68,1), 
              box-shadow 0.19s cubic-bezier(.33,1,.68,1), 
              transform 0.19s cubic-bezier(.33,1,.68,1);
  will-change: transform, opacity;
  color: #0b323c;
  opacity: 0.96;
  outline: none;
}

/* Quitar outline de focus para evitar que se vea "seleccionado" */
.contact-float-link:focus {
  outline: none !important;
  box-shadow: 0 2px 8px rgba(2,169,157,0.09) !important;
}

/* Colores específicos */
.contact-float-link.whatsapp {
  background: #25D366;
}

.contact-float-link.email {
  background: #fff;
}

/* Efectos hover */
.contact-float-link:hover,
.contact-float-link:focus {
  transform: scale(1.12) translateY(-2px);
}

/* Asegurar que hover funcione incluso con focus activo */
.contact-float-link:focus:hover {
  transform: scale(1.12) translateY(-2px);
}

.contact-float-link:active {
  transform: scale(0.96);
}

/* Íconos dentro de los enlaces */
.icon-contact {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  transition: transform 0.19s cubic-bezier(.33,1,.68,1);
}

.contact-float-link:hover .icon-contact,
.contact-float-link:focus .icon-contact {
  transform: scale(1.18);
}

/* Responsive */
@media (max-width: 900px) {
  .contact-float { 
    right: 15px; 
    bottom: 15px; 
  }
  
  .contact-float-btn {
    width: 56px;
    height: 56px;
  }
  
  .icon-user { 
    width: 22px; 
    height: 22px; 
  }
}

@media (max-width: 600px) {
  .contact-float { 
    right: 12px; 
    bottom: 20px; 
  }
  
  .contact-float-btn {
    width: 52px;
    height: 52px;
  }
  
  .contact-float-menu { 
    gap: 8px;
    bottom: 62px;
  }
  
  .contact-float-link { 
    width: 36px; 
    height: 36px; 
  }
  
  .icon-contact { 
    width: 18px; 
    height: 18px; 
  }
  
  .icon-user { 
    width: 20px; 
    height: 20px; 
  }
}