/* --- Contenedor Principal --- */
.burbuja-refiere {
  position: fixed !important;
  right: 20px !important;
  bottom: 160px !important;
  z-index: 9999 !important;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* --- El Texto (La Barra Azul) --- */
.burbuja-refiere .bur-text-content {
  background-color: #1a5c98; /* Azul GDC */
  color: white;

  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

  /* AJUSTE CLAVE 1: Margen negativo para que la barra se meta bajo el círculo */
  margin-right: -10px;

  /* AJUSTE CLAVE 2: Mucho padding derecho para empujar el texto a la izquierda */
  padding-right: 75px;
  padding-left: 25px;

  height: 48px; /* Un poco más alto para centrar mejor */

  /* Flexbox para alinear el texto internamente */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end; /* Alinea el texto hacia la derecha (hacia el icono) */

  /* Estado inicial: oculto */
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;

  /* Transición suave */
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* Tu animación automática */
  animation: saludoInicial 6s ease 1s forwards;
}

/* Estilos de las letras */
.burbuja-refiere .bur-txt-1 {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  font-family: "Segoe UI", sans-serif;
  line-height: 1.1;
}

.burbuja-refiere .bur-txt-2 {
  color: #e0e0e0;
  font-weight: 400;
  font-size: 11px;
  font-family: sans-serif;
  text-transform: uppercase;
  margin-top: 2px;
}

/* --- El Icono (Círculo Blanco) --- */
.burbuja-refiere .bur-icon-content {
  position: relative;
  width: 64px; /* Un pelín más grande */
  height: 64px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10; /* ENCIMA del texto */
  transition: transform 0.3s ease;
  flex-shrink: 0;
  border: 3px solid #1a5c98; /* Borde azul para que combine */
}

.burbuja-refiere .bur-icon-img img {
  width: 36px;
  height: auto;
  display: block;
}

/* --- ESTADOS Y ANIMACIONES --- */

/* HOVER MANUAL */
.burbuja-refiere:hover .bur-text-content {
  /* AJUSTE CLAVE 3: Ancho suficiente para padding + texto */
  max-width: 320px !important;
  opacity: 1 !important;
  padding-right: 75px !important; /* Mantiene el empuje */
  animation: none;
}

.burbuja-refiere:hover .bur-icon-content {
  transform: scale(1.1);
}

/* ANIMACIÓN AUTOMÁTICA */
@keyframes saludoInicial {
  0% {
    max-width: 0;
    opacity: 0;
  }
  10% {
    max-width: 320px;
    opacity: 1;
  } /* Abre */
  85% {
    max-width: 320px;
    opacity: 1;
  } /* Espera */
  100% {
    max-width: 0;
    opacity: 0;
  } /* Cierra */
}

/* ------------------------------------------------ Contenedor Principal (HIPOTECA) ----------------------------------------------------- */
.burbuja-whatsapp {
  position: fixed !important;
  right: 20px !important;
  /* La ponemos más abajo (la otra está en 160px) */
  bottom: 80px !important;
  z-index: 9999 !important;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* --- El Texto (Pastilla VERDE) --- */
.burbuja-whatsapp .bur-text-content {
  /* Color Verde Institucional / WhatsApp */
  background-color: #25d366;
  color: white;

  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

  /* LA MISMA LÓGICA DE ESPACIO */
  margin-right: -10px; /* Se mete bajo el círculo */
  padding-right: 60px; /* Empuja el texto a la izquierda */
  padding-left: 25px;

  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;

  /* Estado inicial oculto */
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;

  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* Animación automática: Le damos 1.5s de retraso para que salga DESPUÉS de la azul */
  animation: saludoInicial 6s ease 1.5s forwards;
}

/* Estilos de las letras */
.burbuja-whatsapp .bur-txt-1 {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  font-family: "Segoe UI", sans-serif;
  line-height: 1.1;
}

.burbuja-whatsapp .bur-txt-2 {
  color: #f1f1f1;
  font-weight: 400;
  font-size: 11px;
  font-family: sans-serif;
  text-transform: uppercase;
  margin-top: 2px;
}

/* --- El Icono (Círculo Blanco) --- */
.burbuja-whatsapp .bur-icon-content {
  position: relative;
  width: 64px;
  height: 64px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  /* Borde verde para combinar */
  border: 3px solid #25d366;
}

.burbuja-whatsapp .bur-icon-img img {
  width: 36px; /* Ajusta según tu logo de SOC */
  height: auto;
  display: block;
}

/* --- INTERACCIÓN --- */
.burbuja-whatsapp:hover .bur-text-content {
  /* Ajustamos el ancho máximo necesario */
  max-width: 320px !important;
  opacity: 1 !important;
  padding-right: 75px !important;
  animation: none;
}

.burbuja-whatsapp:hover .bur-icon-content {
  transform: scale(1.1);
}

/* ----------------------------------------------------WHATS APP---------------------------------------------------------- */

/* --- Contenedor Principal (CONTACTO) --- */
.burbuja-contacto {
  position: fixed !important;
  right: 30px !important;
  bottom: 20px !important;
  z-index: 99999 !important;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* --- El Texto (Pastilla) --- */
.burbuja-contacto .bur-text-content {
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

  /* Ajustes de espacio */
  margin-right: -25px;
  padding-right: 55px;
  padding-left: 20px;
  height: 40px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;

  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.burbuja-contacto .bur-txt-1 {
  font-weight: 800;
  font-size: 13px;
  font-family: sans-serif;
  line-height: 1.1;
}

.burbuja-contacto .bur-txt-2 {
  font-size: 9px;
  text-transform: uppercase;
}

/* --- El Icono (Círculo) --- */
.burbuja-contacto .bur-icon-content {
  position: relative;
  width: 45px;
  height: 45px;
  background-color: #25d366;
  border-radius: 50%;

  /* FLEXBOX PARA CENTRAR */
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 10;
  border: 2px solid #ff6b00; /* Borde Naranja */
  animation: latidoNaranja 2s infinite;
}

/* --- CORRECCIÓN DE CENTRADO DEL ÍCONO --- */
.burbuja-contacto i {
  font-size: 26px; /* Ajustado para el circulo de 50px */
  color: white;

  /* ESTO ARREGLA EL DESFASE HACIA ABAJO */
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block; /* Elimina comportamientos raros de inline */

  /* Opcional: si visualmente aún se ve bajo, usa esto: */
  /* padding-bottom: 2px; */
}

/* --- ANIMACIÓN LATIDO NARANJA --- */
@keyframes latidoNaranja {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 0, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
    transform: scale(1);
  }
}
