/* Contenedor principal alineado a la IZQUIERDA */
.social-bubbles {
    position: fixed;
    left: 20px;       /* Alineación izquierda */
    right: auto;      /* Asegura que no haya conflicto con estilos de derecha */
    bottom: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible; /* Cambiado a visible para que se vea el tooltip si sobresale */
    text-decoration: none;
    /* Animación de entrada por defecto */
    animation: slideInLeft 0.5s ease-out backwards; 
}

.social-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Efecto de brillo al pasar el mouse */
.social-bubble::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none; /* Importante para no interferir con el click */
}

.social-bubble:hover::before {
    width: 300px;
    height: 300px;
}

.social-bubble i {
    font-size: 28px;
    color: #fff;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.social-bubble:hover i {
    transform: rotate(360deg);
}

/* --- ESTILOS ESPECÍFICOS Y ANIMACIONES COMBINADAS --- */

/* WhatsApp */
.social-bubble.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    /* Combinamos: Entrada (slideIn) + Pulso (pulse) con retraso */
    animation: slideInLeft 0.5s ease-out backwards, pulse-whatsapp 2s infinite 1s;
}

/* Messenger */
.social-bubble.messenger {
    background: linear-gradient(135deg, #0084FF 0%, #006AFF 100%);
    /* Combinamos: Entrada + Pulso con más retraso */
    animation: slideInLeft 0.5s ease-out 0.2s backwards, pulse-messenger 2s infinite 1.2s;
}

/* Tooltip (Etiqueta de texto) */
/* Al estar a la izquierda, el tooltip debe salir hacia la DERECHA (left: 70px) */
.social-bubble::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 70px;          /* Posiciona el texto a la derecha de la burbuja */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;  /* Mejor que solo opacity para accesibilidad */
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
}

.social-bubble:hover::after {
    opacity: 1;
    visibility: visible;
    left: 75px; /* Pequeño movimiento al aparecer */
}

/* Keyframes */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1); }
    100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
}

@keyframes pulse-messenger {
    0% { box-shadow: 0 4px 15px rgba(0, 132, 255, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(0, 132, 255, 0.7), 0 0 0 10px rgba(0, 132, 255, 0.1); }
    100% { box-shadow: 0 4px 15px rgba(0, 132, 255, 0.4); }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .social-bubbles {
        left: 15px;
        bottom: 15px;
        gap: 12px;
    }
    
    .social-bubble {
        width: 55px;
        height: 55px;
    }
    
    .social-bubble i {
        font-size: 24px;
    }
    
    /* En móviles ocultamos el tooltip para que no estorbe */
    .social-bubble::after {
        display: none;
    }
}