.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 110px; /* ligeramente más arriba que el de volver arriba */
    background: #25d366;
    color: #fff;
    font-size: 28px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 9998; /* justo debajo del botón volver arriba */
    transition: all 0.4s ease;
}

/*  Hover en escritorio */
.whatsapp-float:hover {
    transform: translateX(0%) scale(1.1);
    background: #1ebe57;
    box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

/*  Tooltip elegante (solo escritorio) */
.whatsapp-float::after {
    content: "Chatear por WhatsApp";
    position: absolute;
    right: 65px;
    background-color: #ffffff; /* fondo neutro */
    color: #121a77;            /* azul institucional */
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.whatsapp-float:hover::after {
    opacity: 1;
    transform: translateY(0);
}
.whatsapp-float::before {
    content: "";
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #ffffff;
    opacity: 0;
    transition: all 0.3s ease;
}
.whatsapp-float:hover::before {
    opacity: 1;
}

/*  Animación de entrada */
@keyframes whatsappPop {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/*  Estado oculto (usado por el JS al hacer scroll) */
.whatsapp-float.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px);
}

/*  Texto solo para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================================
    Ajuste para móviles
   =================================================== */
@media (max-width: 576px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 26px;
        bottom: 105px; /*  se separa del botón de volver arriba */
        right: 15px;
        opacity: 1 !important;
        display: flex !important;
        visibility: visible !important;
    }
}
